I compiled Samba 3.0.21a for mipsel / uclibc. smbd doesn't want to start; it quits with: [2006/01/19 12:29:09, 0] lib/util_sec.c:assert_gid(113) Failed to set gid privileges to (-1,65534) now set to (0,0) uid=(0,0) [2006/01/19 12:29:09, 0] lib/util.c:smb_panic2(1554) PANIC: failed to set gid To solve this problem I edited include/config.h, and added "#define USE_SETRESUID 1": /* Whether setresuid() is available */ /* #undef USE_SETRESUID */ #define USE_SETRESUID 1 Compiled, and now smbd starts correctly.
(In reply to comment #0) > I compiled Samba 3.0.21a for mipsel / uclibc. > > smbd doesn't want to start; it quits with: > > [2006/01/19 12:29:09, 0] lib/util_sec.c:assert_gid(113) > Failed to set gid privileges to (-1,65534) now set to (0,0) uid=(0,0) > [2006/01/19 12:29:09, 0] lib/util.c:smb_panic2(1554) > PANIC: failed to set gid > > To solve this problem I edited include/config.h, and added "#define > USE_SETRESUID 1": > > /* Whether setresuid() is available */ > /* #undef USE_SETRESUID */ > #define USE_SETRESUID 1 > > Compiled, and now smbd starts correctly. Seem cofigure has not properly detected the presence of setresgid() can you tell what does config.log say about that? You should see a failed check for setresgid/setresuid
It looks like this for setresuid: configure:13191: /home/data/wrt54/svn/white/openwrt/staging_dir_mipsel/bin/mipsel-linux-uclibc-gcc -c -Os -s -D_SAMBA_BUILD_ -I/home/data/wrt54/include conftest.c >&5 conftest.c: In function `main': conftest.c:98: error: `setresuid' undeclared (first use in this function) conftest.c:98: error: (Each undeclared identifier is reported only once conftest.c:98: error: for each function it appears in.) configure:13197: $? = 1 configure: failed program was: | /* confdefs.h. */ and a while later for setresgid: configure:13232: checking for setresgid declaration configure:13254: /home/data/wrt54/svn/white/openwrt/staging_dir_mipsel/bin/mipsel-linux-uclibc-gcc -c -Os -s -D_SAMBA_BUILD_ -I/home/data/wrt54/include conftest.c >&5 conftest.c: In function `main': conftest.c:98: error: `setresgid' undeclared (first use in this function) conftest.c:98: error: (Each undeclared identifier is reported only once conftest.c:98: error: for each function it appears in.) configure:13260: $? = 1 configure: failed program was: | /* confdefs.h. */ Then later: configure:13549: checking for real setresuid configure:13590: result: cross configure:13602: checking for real setresgid configure:13644: result: cross And: ac_cv_have_setresgid_decl=no ac_cv_have_setresuid_decl=no And the last ones: samba_cv_have_setresgid=cross samba_cv_have_setresuid=cross
Can you tell me in which header file setresuid() is defined in your system ?
Hmm, hard to tell, can I answer "none"? It's a cross-compilation build environment. It compiles for Linux/mipsel/uClibc. grepping for setresuid, seteuid, setreuid (even with ignoring the case) gives no results, though.
please file a new bug for similar issues with latest samba releases