[PATCH] Check result from ALL getsam21pwnam calls (SAMBA 2.2.0cvs)
Andrew Bartlett
abartlet at pcug.org.au
Sat Apr 7 03:32:01 GMT 2001
Gerald Carter wrote:
>
> 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.
Just as a note, the smbpasswd file WAS corrupt, ie it had users who I
had deleted from the system but not from smbpasswd. I don't mind it
reminding me to clean out smbpasswd, but I do mind it going sig11 on the
prospect :-) (But as far as I can tell thats fixed now).
>
> >
> > 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
--
Andrew Bartlett
abartlet at pcug.org.au
More information about the samba-technical
mailing list