Trapdoor UIDs revisited [2.0.6, pre2.0.7, Digital UNIX]

Graham Allan allan at physics.umn.edu
Thu Feb 24 01:17:39 GMT 2000


I just spent a little time investigating why I could never get Samba
2.0.6 or later to run properly on my Digital UNIX system. There have
been a couple of occurances of this on the main mailing list but no
solutions that I've seen. Attempting to connect to the share for NT
roaming profiles would result in a samba panic as it failed to set uid
privs successfully. 2.0.5a and earlier all worked fine.

Well, after searching through the archives I found some discussion from
last June on a similar issue with 2.0.4 and OpenBSD (hello Chris!). It
looks like this was the same problem. I always used to build samba as
myself, then install as root; but configure skips tests (which it does
warn about, I know) when run as non-root.

I don't know if this information is of any value, but here are my
results from running configure, and the final built samba, as either
myself and root. The final result was that building pre2.0.7 as root
works fine. It's also perhaps interesting that 2.0.6 and pre2.0.7 fail
in slightly different ways when built non-root; and that 2.0.5a worked
ok...

Graham Allan
Physics, University of Minnesota

I am using Digital's C compiler, not gcc, btw:

Compaq C V6.1-110 (dtk) cc Driver
Compaq C V6.1-110 (dtk) on Digital UNIX V4.0F  (Rev. 1229)

config pre2.0.7 as self:
------------------------

checking for root... no
configure: warning: running as non-root will disable some tests
checking for iface AIX... no
checking for iface ifconf... got 2 interfaces:
lo0        IP=127.0.0.1 NETMASK=255.0.0.0
tu0        IP=128.101.XXX.XXX NETMASK=255.255.255.0
yes
checking for setresuid... no
checking for setreuid... yes
checking for shared mmap... yes

config pre2.0.7 as root:
------------------------
checking for iface ifconf... got 2 interfaces:
lo0        IP=127.0.0.1 NETMASK=255.0.0.0
tu0        IP=128.101.XXX.XXX NETMASK=255.255.255.0
yes
checking for setresuid... no
checking for setreuid... Failed to set uid privileges to (0,1) now set to (1,0)
no
checking for seteuid... OK
yes
checking for shared mmap... yes

config 2.0.6 as self:
---------------------
configure: warning: running as non-root will disable some tests
checking for iface AIX... no
checking for iface ifconf... got 2 interfaces:
lo0        IP=127.0.0.1 NETMASK=255.0.0.0
tu0        IP=128.101.XXX.XXX NETMASK=255.255.255.0
yes
checking for setresuid... no
checking for setreuid... yes
checking for shared mmap... yes

config 2.0.6 as root:
---------------------
checking for root... yes
checking for iface AIX... no
checking for iface ifconf... got 2 interfaces:
lo0        IP=127.0.0.1 NETMASK=255.0.0.0
tu0        IP=128.101.XXX.XXX NETMASK=255.255.255.0
yes
checking for setresuid... no
checking for setreuid... OK
yes
checking for shared mmap... yes

run 2.0.6 built as self
-----------------------

[2000/02/23 00:59:45, 1] smbd/service.c:(535)
  ntbox (128.101.220.114) connect to service profiles as user allan (uid=5000,
 gid=5000) (pid 900)
[2000/02/23 00:59:49, 0] lib/util_sec.c:(52)
  Failed to set uid privileges to (0,5000) now set to (5000,5000)
[2000/02/23 00:59:49, 0] lib/util.c:(2456)
  PANIC: failed to set uid

run pre-2.0.7 built as self
---------------------------

2000/02/23 18:14:51, 1] smbd/service.c:(545)
  ntbox (128.101.220.114) connect to service profiles as user allan (uid=5000,
 gid=5000) (pid 23909)
[2000/02/23 18:14:51, 0] lib/util_sec.c:(54)
  Failed to set uid privileges to (0,5000) now set to (5000,0)
[2000/02/23 18:14:51, 0] lib/util.c:(2367)
  PANIC: failed to set uid
  
run pre-2.0.7 built as root - now works!
----------------------------------------

2000/02/23 18:48:23, 1] smbd/service.c:(521)
  ntbox (128.101.220.114) connect to service profiles as user allan (uid=5000, gid=5000) (pid 30745)
[2000/02/23 18:48:46, 1] smbd/service.c:(555)
  ntbox (128.101.220.114) closed connection to service profiles
  
run 2.0.6 built as root
-----------------------
not tested...


More information about the samba-technical mailing list