diff options
author | Simo Sorce <idra@samba.org> | 2003-05-01 11:47:48 +0000 |
---|---|---|
committer | Simo Sorce <idra@samba.org> | 2003-05-01 11:47:48 +0000 |
commit | 75cace04fdcb672cc6c3c3ec8403206f2b222c50 (patch) | |
tree | a0e30d36b57bb698cd4af43c769c6deee0ca232d /source3/pam_smbpass | |
parent | ed454fe3d677a27e19b904f5d0d3199b62c9a1b0 (diff) | |
download | samba-75cace04fdcb672cc6c3c3ec8403206f2b222c50.tar.gz samba-75cace04fdcb672cc6c3c3ec8403206f2b222c50.tar.bz2 samba-75cace04fdcb672cc6c3c3ec8403206f2b222c50.zip |
*id_to_*id call reshape to return NTSTATUS errors
plus internal fixes
1st stage
(This used to be commit 6d036761e565bc93964bb3c939d5b7d78d5778a3)
Diffstat (limited to 'source3/pam_smbpass')
-rw-r--r-- | source3/pam_smbpass/pam_smb_passwd.c | 4 | ||||
-rw-r--r-- | source3/pam_smbpass/support.c | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/source3/pam_smbpass/pam_smb_passwd.c b/source3/pam_smbpass/pam_smb_passwd.c index 1d022af16c..3d82927e16 100644 --- a/source3/pam_smbpass/pam_smb_passwd.c +++ b/source3/pam_smbpass/pam_smb_passwd.c @@ -298,8 +298,8 @@ int pam_sm_chauthtok(pam_handle_t *pamh, int flags, uid_t uid; /* password updated */ - if (!sid_to_uid(pdb_get_user_sid(sampass), &uid)) { - _log_err( LOG_NOTICE, "Unable to get uid for user %s", + if (NT_STATUS_IS_ERR(sid_to_uid(sampass, &uid))) { + _log_err( LOG_NOTICE "Unable to get uid for user %s", pdb_get_username(sampass)); _log_err( LOG_NOTICE, "password for (%s) changed by (%s/%d)", user, uidtoname(getuid()), getuid()); diff --git a/source3/pam_smbpass/support.c b/source3/pam_smbpass/support.c index d3232237ac..32aba7dd5b 100644 --- a/source3/pam_smbpass/support.c +++ b/source3/pam_smbpass/support.c @@ -399,7 +399,7 @@ int _smb_verify_password( pam_handle_t * pamh, SAM_ACCOUNT *sampass, service ? service : "**unknown**", name); new->count = 1; } - if (!sid_to_uid(pdb_get_user_sid(sampass), &(new->id))) { + if (NT_STATUS_IS_ERR(sid_to_uid(pdb_get_user_sid(sampass, &(new->id), &type)))) { _log_err(LOG_NOTICE, "failed auth request by %s for service %s as %s", uidtoname(getuid()), |