CVS update: samba/source/utils

abartlet at samba.org abartlet at samba.org
Wed Feb 25 22:01:02 GMT 2004


Date:	Wed Feb 25 22:01:02 2004
Author:	abartlet

Update of /home/cvs/samba/source/utils
In directory dp.samba.org:/tmp/cvs-serv23162/utils

Modified Files:
      Tag: SAMBA_3_0
	smbpasswd.c net.c 
Log Message:
I *hate* global variables...

OK, what was happening here was that we would invalidate global_sam_sid
when we set the sid into secrets.tdb, to force a re-read.

The problem was, we would do *two* writes into the TDB, and the second one
(in the PDC/BDC case) would be of a NULL pointer.  This caused smbd startups
to fail, on a blank TDB.

By using a local variable in the pdb_generate_sam_sid() code, we avoid this
particular trap.

I've also added better debugging for the case where this all matters, which
is particularly for LDAP, where it finds out a domain SID from the sambaDomain
object.

Andrew Bartlett


Revisions:
smbpasswd.c		1.140.2.19 => 1.140.2.20
	http://www.samba.org/cgi-bin/cvsweb/samba/source/utils/smbpasswd.c.diff?r1=1.140.2.19&r2=1.140.2.20
net.c		1.43.2.40 => 1.43.2.41
	http://www.samba.org/cgi-bin/cvsweb/samba/source/utils/net.c.diff?r1=1.43.2.40&r2=1.43.2.41


More information about the samba-cvs mailing list