krshd.c: use the library routines to do v4 to v5 principal translation
authorRichard Basch <probe@mit.edu>
Mon, 25 Mar 1996 16:19:38 +0000 (16:19 +0000)
committerRichard Basch <probe@mit.edu>
Mon, 25 Mar 1996 16:19:38 +0000 (16:19 +0000)
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@7710 dc483132-0cff-0310-8789-dd5450dbe970

src/appl/bsd/ChangeLog
src/appl/bsd/krshd.c

index 4e4e7e64895772c503fc977e98a8b39f98e09f14..c90a1c9373f4fdf33e1bc1d743a683e0d1b2cf0c 100644 (file)
@@ -7,9 +7,14 @@ Sat Mar 23 17:20:00 1996  Sam Hartman  <hartmans@tertius.mit.edu>
        * krshd.c (doit): Don't use non-blocking IO; it is unnecessary and
        may cause problems.
 
+Fri Mar 22 13:27:40 1996  Richard Basch  <basch@lehman.com>
+
+       * krshd.c: use the library routines to do v4 to v5
+       principal translation, for a more accurate representation.
+
 Wed Mar 20 19:36:21 1996  Richard Basch  <basch@lehman.com>
 
-       * krlogind.c (recvauth): use the library routines to do v4 to v5
+       * krlogind.c: use the library routines to do v4 to v5
        principal translation, for a more accurate representation.
 
 Tue Mar 19 20:11:28 1996  Richard Basch  <basch@lehman.com>
index a7ba147fd194e922888a9456df9bba75e390ef59..eae3ab58403d92205555c59b839f8f97074d2a83 100644 (file)
@@ -1728,15 +1728,15 @@ krb5_authenticator *authenticator;
         * principal's name. 
          */
        strcpy(remuser, v4_kdata->pname);
-       kremuser = (char *) malloc(strlen(v4_kdata->pname) + 1 +
-                                  strlen(v4_kdata->pinst) + 1 +
-                                  strlen(v4_kdata->prealm) + 1);
-       sprintf(kremuser, "%s/%s@%s", v4_kdata->pname,
-               v4_kdata->pinst, v4_kdata->prealm);
+
+       status = krb5_425_conv_principal(bsd_context, v4_kdata->pname,
+                                        v4_kdata->pinst, v4_kdata->prealm,
+                                        &client);
+       if (status) return status;
+
+       status = krb5_unparse_name(bsd_context, client, &kremuser);
        
-       if (status = krb5_parse_name(bsd_context, kremuser, &client))
-         return(status);
-       return 0;
+       return status;
     }
 
     /* Must be V5  */