* string2key.c: Work around possible bug with AFS salts;
authorTom Yu <tlyu@mit.edu>
Fri, 16 Aug 2002 20:35:55 +0000 (20:35 +0000)
committerTom Yu <tlyu@mit.edu>
Fri, 16 Aug 2002 20:35:55 +0000 (20:35 +0000)
[krb5-clients/1146] from <Wolfgang.Friebel@cern.ch>.

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

src/lib/crypto/des/ChangeLog
src/lib/crypto/des/string2key.c

index 3e00ae86371b39d289d2ab5d6a15ab599a07ccde..d19cc47306f671453173093c13f67c9c1f8f0313 100644 (file)
@@ -1,3 +1,8 @@
+2002-08-16  Tom Yu  <tlyu@mit.edu>
+
+       * string2key.c: Work around possible bug with AFS salts;
+       [krb5-clients/1146] from <Wolfgang.Friebel@cern.ch>.
+
 2002-06-07  Miro Jurisic  <meeroh@mit.edu>
 
        * des_int.h: use "" includes for k5-int.h
index a400f070138cc62b533bcf5f8c71566d7b1795e4..74268a18b2c7f540c504430c762b3bc818d08a7e 100644 (file)
@@ -99,6 +99,9 @@ mit_des_string_to_key_int (keyblock, data, salt)
     if (salt) {
        if (salt->length == SALT_TYPE_AFS_LENGTH || salt->length == (unsigned) -1) {
            krb5_data salt2;
+           char *c;
+           c = strchr(salt->data, '@');
+           if (c != NULL) *c = '\0'; /* workaround from krb5-clients/1146 */
            salt2.data = salt->data;
            salt2.length = strlen (salt2.data);
            /* cheat and do AFS string2key instead */