[PATCH] Check result from ALL getsam21pwnam calls (SAMBA 2.2.0cvs)

Gerald Carter gcarter at valinux.com
Sat Apr 7 03:23:19 GMT 2001

On Sat, 7 Apr 2001, Andrew Bartlett wrote:

> In an older CVS version of samba, domain logons did a search of the
> entire smbpasswd file for NT domain logons.  Fortunately this behavior
> has changed, but I was still interested in chasing up a bug - samba
> would report 'smbpasswd file is corrupt' and would promptly die with
> SIG11.  (The actual case was for both domain logons and remote access
> from Win98 to a printer shared on that workstation).

The 'smbpasswd file is corrupt' message should have been fixed.

> I presumed what was happening was that while iterating over the
> smbpasswd file, something was calling getpwnam, and something else
> wasn't checking the results.

Yes.  This used to be the case.  Althought I'm not sure if I finished
the getsam32pw[uid|rid] loop.  I fix that over the weekend.
Thanks for reminding me.

>         become_root();
>         sam_pass = getsam21pwnam(nt_username);
>         smb_pass = getsmbpwnam(nt_username);
>         unbecome_root();

Ah.  yes.  Thanks.  I'll look into this one as well.  Much obliged. :-)

Cheers, jerry

More information about the samba-technical mailing list