From: Douglas Bagnall Date: Thu, 26 May 2022 03:51:25 +0000 (+1200) Subject: debug: drop an '#if _SAMBA_BUILD_ == 3' X-Git-Tag: tevent-0.13.0~384 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b94c805783ecb2ed5dccdeb3747575aec579883b;p=thirdparty%2Fsamba.git debug: drop an '#if _SAMBA_BUILD_ == 3' Signed-off-by: Douglas Bagnall Reviewed-by: Andrew Bartlett --- diff --git a/lib/util/debug.c b/lib/util/debug.c index 7f9231eac2e..2f583f90f0a 100644 --- a/lib/util/debug.c +++ b/lib/util/debug.c @@ -1469,21 +1469,13 @@ void check_log_size( void ) { off_t maxlog; - /* - * We need to be root to check/change log-file, skip this and let the main - * loop check do a new check as root. - */ - -#if _SAMBA_BUILD_ == 3 - if (geteuid() != sec_initial_uid()) -#else - if( geteuid() != 0) -#endif - { - /* We don't check sec_initial_uid() here as it isn't - * available in common code and we don't generally - * want to rotate and the possibly lose logs in - * make test or the build farm */ + if (geteuid() != 0) { + /* + * We need to be root to change the log file (tests use a fake + * geteuid() from third_party/uid_wrapper). Otherwise we skip + * this and let the main smbd loop or some other process do + * the work. + */ return; }