summaryrefslogtreecommitdiff
path: root/source3/auth
diff options
context:
space:
mode:
authorMichael Adam <obnox@samba.org>2010-01-12 12:25:32 +0100
committerMichael Adam <obnox@samba.org>2010-01-12 16:19:56 +0100
commit444ecac2d28e02c6cc6da8ed97010fc475e834e5 (patch)
tree2cb37496e8cf814943f66b8cce896c7afb4132d5 /source3/auth
parent373dcf45cf3d8782c6486958c2ee108e4c8ebba5 (diff)
downloadsamba-444ecac2d28e02c6cc6da8ed97010fc475e834e5.tar.gz
samba-444ecac2d28e02c6cc6da8ed97010fc475e834e5.tar.bz2
samba-444ecac2d28e02c6cc6da8ed97010fc475e834e5.zip
s3:auth: add comment to nulling out stolen sampass
Adding this comment makes me think, I could also have changed make_server_info_sam() talloc_move instead of talloc_steal, but that would have changed the signature... Well the comment is a first step. :-) Michael
Diffstat (limited to 'source3/auth')
-rw-r--r--source3/auth/auth_sam.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/source3/auth/auth_sam.c b/source3/auth/auth_sam.c
index 834ca977da..1dd8fc950e 100644
--- a/source3/auth/auth_sam.c
+++ b/source3/auth/auth_sam.c
@@ -486,6 +486,10 @@ static NTSTATUS check_sam_security(const struct auth_context *auth_context,
become_root();
nt_status = make_server_info_sam(server_info, sampass);
unbecome_root();
+ /*
+ * sampass has been stolen to server_info.
+ * So NULL it out to prevent segfaults.
+ */
sampass = NULL;
if (!NT_STATUS_IS_OK(nt_status)) {