debug: Restore the s3-style check in check_log_size()
authorVolker Lendecke <vl@samba.org>
Thu, 31 Mar 2011 15:02:27 +0000 (17:02 +0200)
committerVolker Lendecke <vlendec@samba.org>
Thu, 31 Mar 2011 17:42:38 +0000 (19:42 +0200)
This has caused me considerable grief.

Autobuild-User: Volker Lendecke <vlendec@samba.org>
Autobuild-Date: Thu Mar 31 19:42:38 CEST 2011 on sn-devel-104

lib/util/debug.c

index 2ff7cb2c588c07e1d994174603f23889be601ed2..9a6d30449b84ca6c984a2f5e51e536aefaa09941 100644 (file)
@@ -643,7 +643,12 @@ void check_log_size( void )
         *  loop check do a new check as root.
         */
 
-       if( geteuid() != 0) {
+#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