[Samba] get_users_in_group bug on Solaris

hugo hugo at aardvarks-and-platypus.com
Mon Nov 28 21:12:03 GMT 2005


Hi

I just compiled Samba 3.0.20b on Linux with a 2.6.11.12 kernel.

Adding users to domain groups works. The smbd daemon correctly calls the
script pointed to by the "add users to group script" option. The user is
added to the domain group under samba and under Linux.

However, the script is still not called when adding users to LOCAL groups.
What's the point of LOCAL groups - they don't seem to do anything? I know
what LOCAL groups are for under proper Windows but what purpose do they
serve for Samba - considering you can't add people to them
(automagically)?

However, it's proof at least that Samba-3 is definately broke on SOlaris.

Hugo

> Hi List
>
> I have been trying to setup a very basic (basic as in it's using the
> simple config from the HOWTO) to tryout 3.0.20b on Solaris 8.
>
> The problems I have had have all revolved around the new (samba-3) feature
> "add user to group script" option. I could be well off the mark here but I
> think I may have found a bug - everyone else clearly thinks I'm mad as the
> only replies I've had run along the lines of "well it works for me".
>
> Basically Samba never calls the script for local groups and is broken for
> domain groups.
>
> After some further testing and code spelunking (I'm not a programmer so I
> could be well wrong) I have found that the smb_add_user_group() function
> is never called when adding a user to a local group, but it is called when
> adding a user to a domain group. However, when adding a user to a DOMAIN
> group (samba does call the script and it works) but returns the
> NT_STATUS_MEMBER_NOT_IN_GROUP  error.
>
> I've tracked this problem with adding to Domain groups down to the
> get_users_in_group function in lib/util_getent.c
>
> The "broken" section is the #if section that starts
>
> #if !defined(BROKEN_GETGRNAM)
>
> Now according to the comments (not many in the files) TRU64 Unix has a
> Broken GETGRNAM function. This is Solaris 8 so I would've thought that
> BROKEN_GETGRNAM should *not* be defined.
>
> If I manually edit the code to remove the '!' to force it to call the
> "correct" section of code all of a sudden as if by magic I can add users
> to domain groups.
>
> I still have not figured out why the code is *never* called for adding to
> local groups but now assume it must be a similar "bug" - don't think I'd
> be so lucky that simply properly undefining BROKEN_GETGRNAM would sort
> this problem.
>
>
> Naturally I appreciate many people will simple dismiss this missive on the
> grounds "He's clearly mad - it works for me" but I suspect it probably
> only works on Linux and not SOlaris.
>
> I am pretty confident that it is not me who has loused things up. I only
> configured samba with:
>
> ./configure --with-acl-support
>
> and then compiled and installed.
>
> I have only tried my fix against 3.0.20b but in my investigations I have
> compiled 3.0.11, 3.0.12,3.0.14 all with Sun Workshop compiler 5.1 and GCC
> 3.x (whatever is the most recent on Sunfreeware). I have also used the
> 3.0.10 package from Sunfreeware.
>
> ALL exhibit exactly the same problems: the "add user to group script"
> funciton doesn't work (not at all for local groups, or properly for domain
> groups).
>
> I would really truly appreciate if someone could tell me why the
> smb_add_user_group() function is never ever called when adding users to
> local groups (ON SOLARIS) with a mind to fixing it. I'm not a developer, I
> don't know how debuggers work, and I hate crawling through C code - I have
> found what I have by several days worth of crawling through logs, grepping
> C code. I'm sure a developer could just say "OH, you want function <blah>
> in file <x>" in a matter of minutes (I know plenty of people spend days
> crawling through logs and C code but that kinda stuff would take me
> several life times).
>
> Help, please.
>
> Hugo
>
>
> --
> To unsubscribe from this list go to the following URL and read the
> instructions:  https://lists.samba.org/mailman/listinfo/samba
>





More information about the samba mailing list