#ifdef ZERO_ZERO in source3/locking/brlock.c

Kenny Dinh kdinh at peaxy.net
Tue May 26 10:47:56 MDT 2015

Hi all,

I found this section of code in source4/torture/raw/lock.c,

/* XXX Samba 3 will fail this test. This is temporary(because this isn't
 * new to Win7, it succeeds in WinXP too), until I can come to a
 * resolution as to whether Samba should support this or not. There is
 * code to preference unlocking exclusive locks before shared locks,
 * but its wrapped with "#ifdef ZERO_ZERO". -zkirsch */
if (TARGET_IS_SAMBA3(tctx)) {
} else {

On samba 4.1, the preference of unlocking exclusive locks before shared
locks is still disabled by default.  This is the default behavior in
Windows 7 onward.  I couldn't find any reference in the code or from samba
bugzilla as to why the section of code was #ifdef'ed out with ZERO_ZERO.

Was there any reason not to enable this logic by default in samba 4.X?

More information about the samba-technical mailing list