diff options
author | Andrew Bartlett <abartlet@samba.org> | 2001-11-11 11:18:45 +0000 |
---|---|---|
committer | Andrew Bartlett <abartlet@samba.org> | 2001-11-11 11:18:45 +0000 |
commit | 1808cd5210258bddc349f13a7bcf20a3f46aa672 (patch) | |
tree | 784ad74ab8bb8af01226573eb04678157d31cfe4 | |
parent | 3eada888fddb1f0cb7c0ed7037eb1c60e7988ad9 (diff) | |
download | samba-1808cd5210258bddc349f13a7bcf20a3f46aa672.tar.gz samba-1808cd5210258bddc349f13a7bcf20a3f46aa672.tar.xz samba-1808cd5210258bddc349f13a7bcf20a3f46aa672.zip |
Add back the not null checks in a better place.
Check the pdb_init_sam() for failure.
-rw-r--r-- | source/auth/auth_sam.c | 8 | ||||
-rw-r--r-- | source/smbd/auth_smbpasswd.c | 8 |
2 files changed, 14 insertions, 2 deletions
diff --git a/source/auth/auth_sam.c b/source/auth/auth_sam.c index 717e30eda73..70632fb5dfb 100644 --- a/source/auth/auth_sam.c +++ b/source/auth/auth_sam.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 */ diff --git a/source/smbd/auth_smbpasswd.c b/source/smbd/auth_smbpasswd.c index 717e30eda73..70632fb5dfb 100644 --- a/source/smbd/auth_smbpasswd.c +++ b/source/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 */ |