CVS update: samba/source/rpc_server

abartlet at samba.org abartlet at samba.org
Tue Jan 15 12:02:13 EST 2002


Date:	Mon Jan 14 17:02:12 2002
Author:	abartlet

Update of /data/cvs/samba/source/rpc_server
In directory va:/tmp/cvs-serv19930/rpc_server

Modified Files:
	srv_netlog_nt.c 
Log Message:
Change the passdb interface to use allocated strings.

These strings are allocated using talloc(), either using its own memory context
stored on the SAM_ACCOUNT or one supplied by the caller.

The pdb_init_sam() and pdb_free_sam() function have been modifed so that a call
to pdb_free_sam() will either clean up (remove hashes from memory) and destroy
the TALLOC_CTX or just clean up depending on who supplied it.

The pdb_init_sam and pdb_free_sam functions now also return an NTSTATUS, and I
have modified the 3 places that actually checked these returns.

The only nasty thing about this patch is the small measure needed to maintin
interface compatability - strings set to NULL are actually set to "".

This is becouse there are too many places in Samba that do strlen() on these
strings without checking if they are NULL pointers.

A supp patch will follow to set all strings to "" in pdb_default_sam().

Andrew Bartlett
 


Revisions:
srv_netlog_nt.c		1.46 => 1.47
	http://www.samba.org/cgi-bin/cvsweb/samba/source/rpc_server/srv_netlog_nt.c?r1=1.46&r2=1.47




More information about the samba-cvs mailing list