svn commit: samba r20520 - in branches/SAMBA_4_0/source/auth: .
metze at samba.org
metze at samba.org
Thu Jan 4 09:47:50 GMT 2007
Author: metze
Date: 2007-01-04 09:47:49 +0000 (Thu, 04 Jan 2007)
New Revision: 20520
WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=20520
Log:
allow the caller to pass NULL if it doesn't want a session info
this can be used when we start to support the FAST BIND LDAP Control
metze
Modified:
branches/SAMBA_4_0/source/auth/auth_simple.c
Changeset:
Modified: branches/SAMBA_4_0/source/auth/auth_simple.c
===================================================================
--- branches/SAMBA_4_0/source/auth/auth_simple.c 2007-01-03 21:11:44 UTC (rev 20519)
+++ branches/SAMBA_4_0/source/auth/auth_simple.c 2007-01-04 09:47:49 UTC (rev 20520)
@@ -26,6 +26,10 @@
#include "auth/auth.h"
#include "lib/events/events.h"
+/*
+ It's allowed to pass NULL as session_info,
+ when the caller doesn't need a session_info
+*/
_PUBLIC_ NTSTATUS authenticate_username_pw(TALLOC_CTX *mem_ctx,
struct event_context *ev,
struct messaging_context *msg,
@@ -82,12 +86,15 @@
return nt_status;
}
- nt_status = auth_generate_session_info(tmp_ctx, server_info, session_info);
+ if (session_info) {
+ nt_status = auth_generate_session_info(tmp_ctx, server_info, session_info);
- if (NT_STATUS_IS_OK(nt_status)) {
- talloc_steal(mem_ctx, *session_info);
+ if (NT_STATUS_IS_OK(nt_status)) {
+ talloc_steal(mem_ctx, *session_info);
+ }
}
+ talloc_free(tmp_ctx);
return nt_status;
}
More information about the samba-cvs
mailing list