Bug and solution: Wrong call for UID-Mapping on DEC-Unix v4.0e

Thomas Hopfner hopfner at lpr.e-technik.tu-muenchen.de
Mon Dec 13 11:06:43 GMT 1999


Hi there,

I recently installed samba-2.0.6 on a DEC Unix box (Version 4.0e) and
set it up to use ``security = server''.

I got the following problem:
Mappings were very slow and got the wrong permissions. At least no write
access was possible. In the log.smb the following messages were logged:

[1999/12/06 18:36:18, 1] smbd/server.c:(643)
  smbd version 2.0.6 started.
  Copyright Andrew Tridgell 1992-1998
[1999/12/06 18:36:18, 1] smbd/files.c:(215)
  file_init: Information only: requested 10000 open files, 4086 are available.
[...]
[1999/12/06 19:12:01, 1] smbd/service.c:(535)
  scrooge (129.187.151.136) connect to service hopfner as user hopfner (uid=134, gid=134) (pid 25986)
[1999/12/06 19:12:01, 0] lib/util_sec.c:(52)
  Failed to set uid privileges to (0,134) now set to (134,134)
[1999/12/06 19:12:01, 0] lib/util.c:(2456)
  PANIC: failed to set uid
[...]

the same output with "debug uid = yes":
[...]
[1999/12/13 10:15:21, 1, effective(134, 134), real(0, 0)] smbd/service.c:(535)
  scrooge (129.187.151.136) connect to service hopfner as user hopfner (uid=134, gid=134) (pid 26685)
[1999/12/13 10:15:21, 0, effective(134, 134), real(134, 0)] lib/util_sec.c:(52)
  Failed to set uid privileges to (0,134) now set to (134,134)
[1999/12/13 10:15:21, 0, effective(134, 134), real(134, 0)] lib/util.c:(2456)
  PANIC: failed to set uid
[...]

Configure guessed this system uses setresuid() and defined
``USE_SETREUID''. But this is only true for the XPG4-UNIX ``mode'',
which is not used by default.
The solution was to define ``USE_SETEUID'' and to undefine ``USE_SETRESUID''
in include/config.h. Of course the configure script should be changed,
but that is at least at the moment out of scope for me.

Can anybody patch the configure script accordingly, or give me a hint
what I have to look for to provide and submit a patch to the samba team?

THX,
	Tom.
-- 
________________________________________________________________________
Dipl.-Ing. Thomas Hopfner              http://www.rcs.ei.tum.de/~hopfner
Institute for Real-Time Computer Systems (RCS)      fon +49-89-289-23554
Technische Universit"at M"unchen, D-80290 M"unchen  fax +49-89-289-23555


More information about the samba-technical mailing list