]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
debug: drop an '#if _SAMBA_BUILD_ == 3'
authorDouglas Bagnall <douglas.bagnall@catalyst.net.nz>
Thu, 26 May 2022 03:51:25 +0000 (15:51 +1200)
committerAndrew Bartlett <abartlet@samba.org>
Fri, 17 Jun 2022 01:28:30 +0000 (01:28 +0000)
Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
lib/util/debug.c

index 7f9231eac2e13b172da89122f94680c5baaf26d1..2f583f90f0af2da6449587c9ed838185c919f0ff 100644 (file)
@@ -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;
        }