]> git.ipfire.org Git - thirdparty/krb5.git/commitdiff
Make password change work without default realm
authorGreg Hudson <ghudson@mit.edu>
Thu, 10 May 2012 17:34:01 +0000 (17:34 +0000)
committerTom Yu <tlyu@mit.edu>
Fri, 8 Jun 2012 19:05:59 +0000 (15:05 -0400)
This fix is not very general or clean, but is suitable for backporting
because it is minimally invasive.  A more comprehensive fix will
follow.

(cherry picked from commit b9ff95a51ef11742abc9687a70b6d8324eda6803)

ticket: 7165 (new)
version_fixed: 1.9.4
status: resolved

src/lib/krb5/krb/get_in_tkt.c

index 71d1e127fdfc21e7ecbb82e35953fc7354e43f19..d078dac400b8f839f3e76a20797304bf65a2d0d2 100644 (file)
@@ -468,6 +468,11 @@ build_in_tkt_name(krb5_context context,
     *server = NULL;
 
     if (in_tkt_service) {
+        /* Minimally invasive fix for inability to change password with no
+         * default realm, for backporting. */
+        if (strcmp(in_tkt_service, "kadmin/changepw") == 0)
+            in_tkt_service = "kadmin/changepw@";
+
         /* this is ugly, because so are the data structures involved.  I'm
            in the library, so I'm going to manipulate the data structures
            directly, otherwise, it will be worse. */