CVS update: samba/source/smbd

abartlet at samba.org abartlet at samba.org
Sat Sep 29 23:08:26 EST 2001


Date:	Sat Sep 29 06:08:26 2001
Author:	abartlet

Update of /data/cvs/samba/source/smbd
In directory va:/tmp/cvs-serv15629/smbd

Modified Files:
	auth.c auth_smbpasswd.c auth_unix.c chgpasswd.c lanman.c 
Log Message:
Fix up a number of intertwined issues:

The big one is a global change to allow us to NULLify the free'ed pointer to a
former passdb object.  This was done to allow idra's SAFE_FREE() macro to do
its magic, and to satisfy the input test in pdb_init_sam() for a NULL pointer
to start with.

This NULL pointer test was what was breaking the adding of accounts up until
now, and this code has been reworked to avoid duplicating work - I hope this
will avoid a similar mess-up in future.

Finally, I fixed a few nasty bugs where the pdb_ fuctions's return codes were
being ignored.  Some of these functions malloc() and are permitted to fail.
Also, this caught a nasty bug where pdb_set_lanman_password(sam, NULL) acheived
precisely didilly-squat, just returning False.  Now that we check the returns
this bug was spotted.  This could allow different LM and NT passwords.

 - the pdbedit code needs to start checking these too, but I havn't had a
chance to fix it.

I have also fixed up where some of the password changing code was using the
pdb_set functions to store *internal* data.  I assume this is from a previous
lot of mass conversion work...

Most likally (and going on past experience) I have missed somthing, probably in
the LanMan password change code which I havn't yet been able to test, but this
lot is in much better shape than it was before.

If all this is too much to swallow (particularly for 2.2.2) then just adding a
sam_pass = NULL to the particular line of passdb.c should do the trick for the
ovbious bug.

Andrew Bartlett



Revisions:
auth.c		1.13 => 1.14
	http://www.samba.org/cgi-bin/cvsweb/samba/source/smbd/auth.c?r1=1.13&r2=1.14
auth_smbpasswd.c		1.13 => 1.14
	http://www.samba.org/cgi-bin/cvsweb/samba/source/smbd/auth_smbpasswd.c?r1=1.13&r2=1.14
auth_unix.c		1.7 => 1.8
	http://www.samba.org/cgi-bin/cvsweb/samba/source/smbd/auth_unix.c?r1=1.7&r2=1.8
chgpasswd.c		1.77 => 1.78
	http://www.samba.org/cgi-bin/cvsweb/samba/source/smbd/chgpasswd.c?r1=1.77&r2=1.78
lanman.c		1.56 => 1.57
	http://www.samba.org/cgi-bin/cvsweb/samba/source/smbd/lanman.c?r1=1.56&r2=1.57




More information about the samba-cvs mailing list