Misc debugging cleanups [71, 74]
authorSam Hartman <hartmans@mit.edu>
Mon, 14 Oct 1996 06:29:15 +0000 (06:29 +0000)
committerSam Hartman <hartmans@mit.edu>
Mon, 14 Oct 1996 06:29:15 +0000 (06:29 +0000)
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@9164 dc483132-0cff-0310-8789-dd5450dbe970

src/appl/telnet/telnetd/ChangeLog
src/appl/telnet/telnetd/utility.c

index f18486b2fed833db02abaf37b552bdc737f21c03..f78f53f25801c38f59d7d89f1c4071b1dbee7d8d 100644 (file)
@@ -1,4 +1,9 @@
+Mon Oct 14 01:55:41 1996  Sam Hartman  <hartmans@mit.edu>
+
+       * utility.c (printsub): Patch from jhawk@bbnplannet.com to deal
+       with bug printing out authentication name. [71]
 Sat Sep 21 03:38:31 1996  Sam Hartman  <hartmans@mit.edu>
+(printsub): Fix encrypt promise bit option parsing [74]
 
        * utility.c (ttloop): Continue on eintr.
 
index 7b72e80a5ae073bf0cfe33df78646a5e1ccac0f6..eb31a76a171c2b3b6b600865e86824024c240b57 100644 (file)
@@ -982,11 +982,13 @@ printsub(direction, pointer, length)
                    nfrontp += strlen(nfrontp);
                    break;
                }
-               sprintf(nfrontp, "%s|%s",
+               sprintf(nfrontp, "%s|%s%s",
                        ((pointer[3] & AUTH_WHO_MASK) == AUTH_WHO_CLIENT) ?
                        "CLIENT" : "SERVER",
                        ((pointer[3] & AUTH_HOW_MASK) == AUTH_HOW_MUTUAL) ?
-                       "MUTUAL" : "ONE-WAY");
+                       "MUTUAL" : "ONE-WAY",
+                       ((pointer[3] & AUTH_ENCRYPT_MASK) == AUTH_ENCRYPT_ON) ?
+                       "|ENCRYPT" : "");
                nfrontp += strlen(nfrontp);
 
                auth_printsub(&pointer[1], length - 1, buf, sizeof(buf));
@@ -1009,11 +1011,13 @@ printsub(direction, pointer, length)
                        nfrontp += strlen(nfrontp);
                        break;
                    }
-                   sprintf(nfrontp, "%s|%s ",
+                   sprintf(nfrontp, "%s|%s%s ",
                        ((pointer[i] & AUTH_WHO_MASK) == AUTH_WHO_CLIENT) ?
                                                        "CLIENT" : "SERVER",
                        ((pointer[i] & AUTH_HOW_MASK) == AUTH_HOW_MUTUAL) ?
-                                                       "MUTUAL" : "ONE-WAY");
+                                                       "MUTUAL" : "ONE-WAY",
+                       ((pointer[3] & AUTH_ENCRYPT_MASK) == AUTH_ENCRYPT_ON) ?
+                       "|ENCRYPT" : "");
                    nfrontp += strlen(nfrontp);
                    ++i;
                }
@@ -1023,9 +1027,15 @@ printsub(direction, pointer, length)
                i = 2;
                sprintf(nfrontp, " NAME \"");
                nfrontp += strlen(nfrontp);
-               while (i < length)
-                   *nfrontp += pointer[i++];
-               *nfrontp += '"';
+               while (i < length) {
+                   if (isprint(pointer[i]))
+                       *nfrontp++ = pointer[i++];
+                   else {
+                       sprintf(nfrontp, "\"%03o",pointer[i++]);
+                       nfrontp += strlen(nfrontp);
+                   }
+               }
+               *nfrontp++ = '"';
                break;
 
            default: