[patch] null pointer handling in auth_domain

Ihar Viarheichyk i.viarheichyk at sam-solutions.net
Mon Jan 14 03:50:02 GMT 2002


Hello,

Here is a small patch which handes null pointer passing bug in auth_domain. 
This bug causes "INTERNAL ERROR: Signal 11" if guest user name is not
present in system.


-- 
Igor Vergeichik
ICQ 47298730

-------------- next part --------------
diff -urNk.orig samba.HEAD/source/auth/auth_domain.c.orig samba.HEAD/source/auth/auth_domain.c
--- samba.HEAD/source/auth/auth_domain.c.orig	Mon Jan 14 13:31:04 2002
+++ samba.HEAD/source/auth/auth_domain.c	Mon Jan 14 13:36:07 2002
@@ -241,7 +241,7 @@
 {
 	fstring remote_machine;
 	NET_USER_INFO_3 info3;
-	struct cli_state *cli;
+	struct cli_state *cli=NULL;
 	NTSTATUS nt_status = NT_STATUS_UNSUCCESSFUL;
 	struct passwd *pass;
 
@@ -265,7 +265,7 @@
 	if (!NT_STATUS_IS_OK(nt_status)) {
 		DEBUG(0,("domain_client_validate: Domain password server not available.\n"));
 		
-		cli_shutdown(cli);
+		if(cli) cli_shutdown(cli);
 		return nt_status;
 	}
 


More information about the samba-technical mailing list