log wrapping bug (BUG#591)

Andrew Tridgell samba-bugs at samba.anu.edu.au
Fri Oct 10 02:45:02 GMT 1997

We've just fixed a bug in the log wrapping code in Samba. This code is used
when you set the "max log size" option in smb.conf

When the logs wrap an application writing to the server at the time
may receive an incorrect error code. This can have a variety of effects,
and can result in the application reporting an error message or even

The problem was the errno handling. A log message while running as non
root could cause wraparound which tried to do a log re-open. This would
fail as non-root and set errno to EACCESS. If this happens during
a operation that relies on errno (for example a getattr call) then EACCESS
gets returned to the client.

We will be releasing 1.9.17p3 shortly with a fix for this (and some other)
bugs. Meanwhile I suggest that you either stop using the "max log size"
option or add this line to the start of check_log_size() in util.c:

	if (getuid() != 0) return;

Cheers, Andrew

More information about the samba mailing list