svn commit: samba r19424 - in branches/SAMBA_3_0/source/utils: .

jra at samba.org jra at samba.org
Fri Oct 20 08:14:39 GMT 2006


Author: jra
Date: 2006-10-20 08:14:38 +0000 (Fri, 20 Oct 2006)
New Revision: 19424

WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=19424

Log:
Protect against username == NULL
Jeremy.

Modified:
   branches/SAMBA_3_0/source/utils/net.c


Changeset:
Modified: branches/SAMBA_3_0/source/utils/net.c
===================================================================
--- branches/SAMBA_3_0/source/utils/net.c	2006-10-20 08:06:14 UTC (rev 19423)
+++ branches/SAMBA_3_0/source/utils/net.c	2006-10-20 08:14:38 UTC (rev 19424)
@@ -244,6 +244,9 @@
 {
 	char *user_and_realm = NULL;
 
+	if (!username) {
+		return NULL;
+	}
 	if (strchr_m(username, '@')) {
 		user_and_realm = SMB_STRDUP(username);
 	} else {
@@ -257,6 +260,7 @@
 /****************************************************************************
 connect to \\server\ipc$ using KRB5
 ****************************************************************************/
+
 NTSTATUS connect_to_ipc_krb5(struct cli_state **c,
 			struct in_addr *server_ip, const char *server_name)
 {



More information about the samba-cvs mailing list