Smbd 2.0.7 crash, security=share, HP-UX 11.0, 64 bits
Marc_Jacobsen at hp.com
Tue Oct 17 17:23:34 GMT 2000
Laurent Menu wrote:
> I tried to fix this but I can't get it : when in security=share model on
> a HP-UX 11 64 bits (9000/800/L2000-44), smbd crashes in an amazing way :
> - from a PC NT 4.0 point of view :
> net use \\openmail\essai1 toto1
> => OK
> net use \\openmail\essai2 toto2
> => crash ! Error 59
> ( Creating other connections will work, then crash, then work and so on
> - from the server point of view : first connection is OK, the second
> kill the smbd process with a #11 signal (seg fault ?)
> - smbd is OK with security=server.
> As far as I've drilled down the problem, the smbd process dies on the
> second call to the initgroups() function in setup_groups()
> (smbd/password.c) :
> - the first call to init_group is OK for the essai1 connection,
> - the second connection (to essai2) dumps the core
> The amazing details are :
> - it seems the crash occurs in the OS level function initgroups()
> - the same smbd 2.0.7 binary does *not* crash on a 32 bit platform
> I asked HP support about that and had no solution. No real support
> 'cause they distribute their (as far as I know) own copy of samba :
> CIF. [ From my point of view they'd better support the actual
> developpment : SAMBA! It's another sort of problem ! ] :-(
> I guess a way to bypass the problem would be to completely rewrite the
> setup_groups with no calls to initgroups and getgroups. I'd like to
> avoid that.
> I included in this message :
> - the step1 log file corresponding to the first connection (essai1)
> - the step2 log file corresponding to the crashing second connection
> - the setup_groups function extracted from the password.c file cause I
> added a bunch of DEBUG lines and some other garbage to tracks the
> origin of the core dump
> - both smb.conf and smb.openmail.conf (I use a lot of netbios aliases)
> Am I missing something ?
> Is there some other solution to the problem except patching ?:
> - compilation options ?
> - configuration option to avoid the second call to initgroups ?
> - patch to the initgroups() function ?
> thank you for your help,
> Laurent Menu
Well, you shouldn't need to rewrite setup_groups() with no calls to
initgroups(), Samba has it's own definition of initgroups() for OS'es that don't
include it. You could try renaming initgroups() (the Samba defined version),
and changing the calls to call it. (initgroups() is only found in 5 places in
the source as far as I can tell). You will also have to remove/comment out the
include/config.h file line:
#define HAVE_INITGROUPS 1
so that the renamed initgroups() function gets compilied in.
More information about the samba