diff options
author | Andrew Bartlett <abartlet@samba.org> | 2002-01-15 01:14:58 +0000 |
---|---|---|
committer | Andrew Bartlett <abartlet@samba.org> | 2002-01-15 01:14:58 +0000 |
commit | 90558370ab9019c425019083a6dcb129a808a5ed (patch) | |
tree | a8e22132dd0ca947000c46afb970c58d63c48ad6 /source3/auth | |
parent | dbee612f7150ee2921c37fa331b38b86d2d63937 (diff) | |
download | samba-90558370ab9019c425019083a6dcb129a808a5ed.tar.gz samba-90558370ab9019c425019083a6dcb129a808a5ed.tar.bz2 samba-90558370ab9019c425019083a6dcb129a808a5ed.zip |
Commit the auth associated changes I missed from the last commit.
Also set the default value of all the allocated strings to "" to avoid changing
the interface (becouse pdb_get...() would point to a null string, rather than a
null pointer and parts of samba rely on that).
Andrew Bartlett
(This used to be commit 5b4079f748e25f21162e21b439063249baf8dca6)
Diffstat (limited to 'source3/auth')
-rw-r--r-- | source3/auth/auth_sam.c | 6 | ||||
-rw-r--r-- | source3/auth/auth_util.c | 2 |
2 files changed, 5 insertions, 3 deletions
diff --git a/source3/auth/auth_sam.c b/source3/auth/auth_sam.c index 107e33c600..01f41fce44 100644 --- a/source3/auth/auth_sam.c +++ b/source3/auth/auth_sam.c @@ -353,8 +353,10 @@ static NTSTATUS check_sam_security(const struct auth_context *auth_context, return NT_STATUS_UNSUCCESSFUL; } - if (!pdb_init_sam(&sampass)) { - return NT_STATUS_NO_MEMORY; + /* Can't use the talloc version here, becouse the returned struct gets + kept on the server_info */ + if (!NT_STATUS_IS_OK(nt_status = pdb_init_sam(&sampass))) { + return nt_status; } /* get the account information */ diff --git a/source3/auth/auth_util.c b/source3/auth/auth_util.c index a747cf8a35..d2748e30d4 100644 --- a/source3/auth/auth_util.c +++ b/source3/auth/auth_util.c @@ -501,7 +501,7 @@ BOOL make_server_info_sam(auth_serversupplied_info **server_info, SAM_ACCOUNT *s BOOL make_server_info_pw(auth_serversupplied_info **server_info, const struct passwd *pwd) { SAM_ACCOUNT *sampass = NULL; - if (!pdb_init_sam_pw(&sampass, pwd)) { + if (!NT_STATUS_IS_OK(pdb_init_sam_pw(&sampass, pwd))) { return False; } return make_server_info_sam(server_info, sampass); |