sec_initial_uid() check in debug.c:check_log_size()

Michael Adam obnox at
Wed Jul 6 02:48:26 MDT 2011

Hi Andrew,

Andrew Bartlett wrote:
> On Tue, 2011-07-05 at 08:21 +0200, Volker Lendecke wrote:
> > On Tue, Jul 05, 2011 at 11:11:40AM +1000, Andrew Bartlett wrote:
> > > In commit 644222a1e36d18f8a57f815e74a08a78c26abb89 you added back a
> > > sec_initial_uid() check for log rotation in the common debug code, with
> > > the message:
> > > 
> > > > debug: Restore the s3-style check in check_log_size()
> > > > This has caused me considerable grief.
> > > 
> > > Would it be possible for you to explain what exactly you were trying to
> > > do that caused this to be a problem, and what the problem was, so I can
> > > see if I can resolve it another way? 
> > 
> > IIRC make test did not re-open logs properly. Please keep
> > it that way.
> Ahh, that makes sense now.  Given that 'make test' now only logs to
> stdout, avoiding the need to reopen logs, can we remove the #ifdef
> _SAMBA_BUILD_ == 3?

This does not seem to be true. Running make test, I see logs of
this on standard output/error:

[2011/07/06 10:35:35,  0] ../lib/util/debug.c:572(reopen_logs_internal)
  Unable to open new log file '/data/samba/install/master/var/log.smbd': Permission denied

I am running "make test" (from source3) as non-root and the log file
/data/samba/install/master/var/log.smbd is the compiled-in
location of the log file in the install path. Now I have done
"make install" as root. So the permission is correctly denied.

The bug is that daemons started by "make test" try to open or
access those logs at all. "make test" should run completely
self-contained without accessing the install path at all.
My suspicion is that the recent debug and dynconfig changes broke
it. (I am not able to monitor all changes in the merging area
lately. It is just too much, so I am going to report problems
once I stumble across.)

What is more, why do smbd/nmbd/winbindd log to standard output (or error)
at startup as of recently? This his horrible! Firstly it clutters
make test output, making it mostly unreadable (for me), and secondly,
this should not happen when starting productive daemons either.
At least I am used to reading the debug output from the logs.

Cheers - Michael

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 206 bytes
Desc: not available
URL: <>

More information about the samba-technical mailing list