summaryrefslogtreecommitdiff
path: root/source3/smbd
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2001-11-11 11:18:45 +0000
committerAndrew Bartlett <abartlet@samba.org>2001-11-11 11:18:45 +0000
commit5edc5977866a5bfdf8e689e90b73483a7b1e3246 (patch)
treebf16e3663cff8a1517040ae9dc152dbffc2b5db6 /source3/smbd
parent63a8a2ebe880b4cf893ac3e97a5de52b74a39e1c (diff)
downloadsamba-5edc5977866a5bfdf8e689e90b73483a7b1e3246.tar.gz
samba-5edc5977866a5bfdf8e689e90b73483a7b1e3246.tar.bz2
samba-5edc5977866a5bfdf8e689e90b73483a7b1e3246.zip
Add back the not null checks in a better place.
Check the pdb_init_sam() for failure. (This used to be commit 1808cd5210258bddc349f13a7bcf20a3f46aa672)
Diffstat (limited to 'source3/smbd')
-rw-r--r--source3/smbd/auth_smbpasswd.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/source3/smbd/auth_smbpasswd.c b/source3/smbd/auth_smbpasswd.c
index 717e30eda7..70632fb5df 100644
--- a/source3/smbd/auth_smbpasswd.c
+++ b/source3/smbd/auth_smbpasswd.c
@@ -344,7 +344,13 @@ NTSTATUS check_smbpasswd_security(const auth_usersupplied_info *user_info, auth_
uint8 user_sess_key[16];
const uint8* lm_hash;
- pdb_init_sam(&sampass);
+ if (!user_info) {
+ return NT_STATUS_LOGON_FAILURE;
+ }
+
+ if (!pdb_init_sam(&sampass)) {
+ return NT_STATUS_NO_MEMORY;
+ }
/* get the account information */