* str_conv.c (krb5_string_to_keysalts): When parsing string, allow
authorEzra Peisach <epeisach@mit.edu>
Tue, 26 Jun 2001 19:59:45 +0000 (19:59 +0000)
committerEzra Peisach <epeisach@mit.edu>
Tue, 26 Jun 2001 19:59:45 +0000 (19:59 +0000)
for extra separator characters (like spaces) between keysalts.

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

src/lib/kadm5/ChangeLog
src/lib/kadm5/str_conv.c

index 62f96202f4ca53cc34280e557143aa74ae6264c5..6332e90eccaccae6a74474285b0c76fc3b0b935a 100644 (file)
@@ -1,3 +1,8 @@
+2001-06-26  Ezra Peisach  <epeisach@mit.edu>
+
+       * str_conv.c (krb5_string_to_keysalts): When parsing string, allow
+       for extra separator characters (like spaces) between keysalts.
+
 2001-06-21  Ezra Peisach  <epeisach@mit.edu>
 
        * admin_internal.h (_KADM5_CHECK_HANDLE): Change code to ecode in
index 99334e83c3658e05b6fd3a92aff0e0476fa60d2d..4a2a67873ed46281bfe525e04e0af190819107e9 100644 (file)
@@ -363,7 +363,22 @@ krb5_string_to_keysalts(string, tupleseps, ksaltseps, dups, ksaltp, nksaltp)
        if (ep)
            ep[-1] = trailchar;
        kp = ep;
-    }
+
+       /* Skip over extra separators - like spaces */
+       if (kp && *tseplist) {
+         septmp = tseplist;
+         while(*septmp && *kp) {
+           if(*septmp == *kp) {
+             /* Increment string - reset separator list */
+             kp++;
+             septmp = tseplist;
+           } else {
+             septmp++;
+           }
+         }
+         if (!*kp) kp = NULL;
+       }
+    } /* while kp */
     return(kret);
 }