svn commit: samba r4001 - in branches/SAMBA_4_0/source: libcli/auth librpc/rpc

metze at samba.org metze at samba.org
Mon Nov 29 14:46:17 GMT 2004


Author: metze
Date: 2004-11-29 14:46:17 +0000 (Mon, 29 Nov 2004)
New Revision: 4001

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

Log:
fix segfault fix auth failed

metze

Modified:
   branches/SAMBA_4_0/source/libcli/auth/gensec.c
   branches/SAMBA_4_0/source/librpc/rpc/dcerpc_auth.c


Changeset:
Modified: branches/SAMBA_4_0/source/libcli/auth/gensec.c
===================================================================
--- branches/SAMBA_4_0/source/libcli/auth/gensec.c	2004-11-29 12:01:46 UTC (rev 4000)
+++ branches/SAMBA_4_0/source/libcli/auth/gensec.c	2004-11-29 14:46:17 UTC (rev 4001)
@@ -443,6 +443,9 @@
 
 void gensec_end(struct gensec_security **gensec_security)
 {
+	if (!*gensec_security) {
+		return;
+	}
 	if ((*gensec_security)->ops) {
 		(*gensec_security)->ops->end(*gensec_security);
 	}

Modified: branches/SAMBA_4_0/source/librpc/rpc/dcerpc_auth.c
===================================================================
--- branches/SAMBA_4_0/source/librpc/rpc/dcerpc_auth.c	2004-11-29 12:01:46 UTC (rev 4000)
+++ branches/SAMBA_4_0/source/librpc/rpc/dcerpc_auth.c	2004-11-29 14:46:17 UTC (rev 4001)
@@ -113,6 +113,7 @@
 	talloc_destroy(mem_ctx);
 
 	if (!NT_STATUS_IS_OK(status)) {
+		gensec_end(&p->security_state.generic_state);
 		ZERO_STRUCT(p->security_state);
 	} else {
 		/* Authenticated connections use the generic session key */



More information about the samba-cvs mailing list