In r21175 (on the mskrb branch, merged in r21690) the result codes for
authorGreg Hudson <ghudson@mit.edu>
Tue, 29 Mar 2011 22:44:30 +0000 (22:44 +0000)
committerGreg Hudson <ghudson@mit.edu>
Tue, 29 Mar 2011 22:44:30 +0000 (22:44 +0000)
password quality and other errors were accidentally reversed.  Fix
them so that password quality errors generate a "soft" failure and
other errors generate a "hard" failure, as Heimdal and Microsoft do.
Also recognize KADM5_PASS_Q_GENERIC (added in 1.9) as a password
quality error.

ticket: 6888
target_version: 1.9.1
tags: pullup

git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@24755 dc483132-0cff-0310-8789-dd5450dbe970

src/kadmin/server/schpw.c

index 802584e75f21550f902d2bc246e9558ef09cfa64..d12c5075b1a0a047d7b54de87e1f5c227efa83ae 100644 (file)
@@ -330,15 +330,16 @@ process_chpw_request(context, server_handle, realm, keytab,
     case KADM5_PASS_REUSE:
     case KADM5_PASS_Q_CLASS:
     case KADM5_PASS_Q_DICT:
+    case KADM5_PASS_Q_GENERIC:
     case KADM5_PASS_TOOSOON:
-        numresult = KRB5_KPASSWD_HARDERROR;
+        numresult = KRB5_KPASSWD_SOFTERROR;
         break;
     case 0:
         numresult = KRB5_KPASSWD_SUCCESS;
         strlcpy(strresult, "", sizeof(strresult));
         break;
     default:
-        numresult = KRB5_KPASSWD_SOFTERROR;
+        numresult = KRB5_KPASSWD_HARDERROR;
         break;
     }