*id_to_*id call reshape to return NTSTATUS errors
[ira/wip.git] / source3 / pam_smbpass / pam_smb_passwd.c
index 1d022af16c1619c49230100bb0e24b603d365688..3d82927e168d4f5f4f83fcb0bf34e80c829b8227 100644 (file)
@@ -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());