summaryrefslogtreecommitdiff
path: root/source4/auth/ntlm
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2010-05-04 16:44:08 +1000
committerAndrew Bartlett <abartlet@samba.org>2010-08-14 11:58:13 +1000
commit272e49e85c47d88ef0a84bce88e6f8d984f2eae4 (patch)
tree2a4bc4aef47de12de144edc35a4d5c5c75304649 /source4/auth/ntlm
parent61930f50cbace4741500d8b53fc11a4ef3e0d4f8 (diff)
downloadsamba-272e49e85c47d88ef0a84bce88e6f8d984f2eae4.tar.gz
samba-272e49e85c47d88ef0a84bce88e6f8d984f2eae4.tar.bz2
samba-272e49e85c47d88ef0a84bce88e6f8d984f2eae4.zip
s4:auth Move struct auth_usersupplied_info to a common location
This also changes the calling convention slightly - we should always allocate this with talloc_zero() to allow some elements to be optional. Some elements may only make sense in Samba3, which I hope will use this common structure. Andrew Bartlett
Diffstat (limited to 'source4/auth/ntlm')
-rw-r--r--source4/auth/ntlm/auth_simple.c2
-rw-r--r--source4/auth/ntlm/auth_util.c6
2 files changed, 4 insertions, 4 deletions
diff --git a/source4/auth/ntlm/auth_simple.c b/source4/auth/ntlm/auth_simple.c
index 9c8f7f64ac..65a08cd92b 100644
--- a/source4/auth/ntlm/auth_simple.c
+++ b/source4/auth/ntlm/auth_simple.c
@@ -56,7 +56,7 @@ _PUBLIC_ NTSTATUS authenticate_username_pw(TALLOC_CTX *mem_ctx,
return nt_status;
}
- user_info = talloc(tmp_ctx, struct auth_usersupplied_info);
+ user_info = talloc_zero(tmp_ctx, struct auth_usersupplied_info);
if (!user_info) {
talloc_free(tmp_ctx);
return NT_STATUS_NO_MEMORY;
diff --git a/source4/auth/ntlm/auth_util.c b/source4/auth/ntlm/auth_util.c
index 7da68a248b..605cd980c6 100644
--- a/source4/auth/ntlm/auth_util.c
+++ b/source4/auth/ntlm/auth_util.c
@@ -74,7 +74,7 @@ NTSTATUS map_user_info(TALLOC_CTX *mem_ctx,
domain = default_domain;
}
- *user_info_mapped = talloc(mem_ctx, struct auth_usersupplied_info);
+ *user_info_mapped = talloc_zero(mem_ctx, struct auth_usersupplied_info);
if (!*user_info_mapped) {
return NT_STATUS_NO_MEMORY;
}
@@ -124,7 +124,7 @@ NTSTATUS encrypt_user_info(TALLOC_CTX *mem_ctx, struct auth_context *auth_contex
{
uint8_t chal[8];
DATA_BLOB chall_blob;
- user_info_temp = talloc(mem_ctx, struct auth_usersupplied_info);
+ user_info_temp = talloc_zero(mem_ctx, struct auth_usersupplied_info);
if (!user_info_temp) {
return NT_STATUS_NO_MEMORY;
}
@@ -190,7 +190,7 @@ NTSTATUS encrypt_user_info(TALLOC_CTX *mem_ctx, struct auth_context *auth_contex
struct samr_Password lanman;
struct samr_Password nt;
- user_info_temp = talloc(mem_ctx, struct auth_usersupplied_info);
+ user_info_temp = talloc_zero(mem_ctx, struct auth_usersupplied_info);
if (!user_info_temp) {
return NT_STATUS_NO_MEMORY;
}