smbd panic after per-thread UID handling changes

Jeremy Allison jra at
Sun Jul 1 08:06:05 MDT 2012

On Sun, Jul 01, 2012 at 10:16:43AM +0200, steve wrote:
> Hi Jeremy, Andrew, everyone.
> This is on Linux, openSUSE 12.1:
>  uname -r
> 3.1.10-1.9-desktop
> samba --version
> Version 4.0.0beta3-GIT-8150f69
> rpm -q gcc
> gcc-4.6-15.1.3.i586
> >>
> >>If it fails again, after you've done what Andrew
> >>suggested,
> Failed again:
> smbclient //hh1/home -Usteve2
> Enter steve2's password:
> Domain=[MARINA] OS=[Unix] Server=[Samba 4.0.0beta3-GIT-8150f69]
> tree connect failed: NT_STATUS_IO_TIMEOUT
> with the same error:
> /usr/local/samba/sbin/smbd: Failed to set uid privileges to
> (-1,3000008) now set to (50888,50888)
> /usr/local/samba/sbin/smbd: PANIC (pid 24328): failed to set uid
> clean the tree again :
> >>
> >>git clean -x -f -d
> >>
> >>then do a waf reconfigure as root -
> >>amd mail me the contents of the bin/config.log file
> ./buildtools/bin/waf reconfigure
> File too big to mail. Here is a link to it:

Thanks for the info, but I asked you to do a waf
reconfigure as root, not as a normal user.

You didn't do that. Here is the info from the log:

In file included from ../test.c:877:0:
/home/steve/samba-master/source3/./lib/util_sec.c:45:0: warning: "bool" redefined [enabled by default]
/usr/lib/gcc/i586-suse-linux/4.6/include/stdbool.h:33:0: note: this is the location of the previous definition
['/usr/bin/gcc', '-I/home/steve/samba-master/source3', '-MD', '-Idefault', '-I..', '-Idefault', '-I..', '-I/usr/local/include', '-D_SAMBA_BUILD_=4', '-DHAVE_CONFIG_H=1', '-D_GNU_SOURCE=1', '-D_XOPEN_SOURCE_EXTENDED=1', '../test.c', '-c', '-o', 'default/test_1.o']
[2/2] Linking default/testprog
['/usr/bin/gcc', 'default/test_1.o', '-o', '/home/steve/samba-master/bin/.conf_check_0/testbuild/default/testprog', '-Wl,-no-undefined', '-Wl,--export-dynamic', '-L/usr/local/lib']

not running as root: checking for ENOSYS

returncode 0

So all that tells me is that your system calls syscall(SYS_setresuid,-1,-1,-1)
correctly, which isn't a complete test of the functions.

Can you do a "git clean -d -x -f" and re-run this as root and
send the link again please ?

My guess is this is a configuration error that is leaving
you with a system that won't change uids correctly. We can
fix this in the configure tests once we know what the exact
problem is.

In the meantime I'll push a patch to change the mechanism
used when thread-specific credentials are selected as non-root
back to using the setreuid mechanism from the setresuid mechanism,
as that was what you would have been using before the thread
specific changes went in.

But it's Sunday morning here so I might not get to that until



More information about the samba-technical mailing list