Patch for Samba 2.2.6 & 2.2.7 to work on OS X
Michael Bennett
michaelb777 at vt.edu
Thu Jan 16 06:08:00 GMT 2003
In version 2.2.6 there was a change in util_sec.c that causes Samba to fail
on OS X due to use of setregid(). Previously, Samba worked flawlessly on
OS X. Apparently this is also a problem in other BSD-based operating
systems, as this sparse bug report indicates in its headers:
http://bugs.samba.org/cgi-bin/samba-bugs/incoming?id=26016
<quote>
The function setregid() does not work correctly on our platform.
The error message (log.smbd) is as follows:
lib/util_sec.c:assert_gid(114)
Failed to set gid privileges to (0,32766) now set to (32766,32766) uid = (0,0)
lib/util.c:smb_panic(1094)
PANIC: failed to set gid
According to the man page (man setregid):
This function did not work correctly, and its purpose is now better served
by the use of the setegid() function."
</quote>
The problem reported is identical to the one I am having on OS X (unable to
browse or do anything requiring privs). There is a patch included in the
report that fixes the problem on OS X 10.2.3. I have also tested it
(successfully!) to make sure it doesn't break anything on Linux with
Slackware 8.1 (upgraded to 2.4.20).
So... comments? Does the patch Do The Right Thing? Think this patch or
something similar could get merged sometime? :)
Michael Bennett
mibenne2 at vt.edu
More information about the samba-technical
mailing list