From 950b96f290d0874e5a8e6d8bc693d4d03a3e88f2 Mon Sep 17 00:00:00 2001 From: Russ Allbery Date: Fri, 21 Aug 2009 19:11:58 -0700 Subject: [PATCH] Remove old disabled code to support truncated passwords ka_UserAuthenticateGeneral had code disabled with #ifdef OLDCRUFT to retry failed authentications by truncating the password to eight characters, with a comment that the truncating behavior of kpasswd was disabled in 1990. Nothing references this preprocessor define in the source tree. Delete the dead code. Reviewed-on: http://gerrit.openafs.org/336 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear --- src/kauth/user.c | 33 --------------------------------- 1 file changed, 33 deletions(-) diff --git a/src/kauth/user.c b/src/kauth/user.c index 20d6b2b05..e5c986c75 100644 --- a/src/kauth/user.c +++ b/src/kauth/user.c @@ -235,39 +235,6 @@ ka_UserAuthenticateGeneral(afs_int32 flags, char *name, char *instance, GetTickets(name, instance, realm, &key, lifetime, password_expires, dosetpag); } - -/* By the time 3.3 comes out, these "old-style" passwd programs should be - * well and truly obsolete. Any passwords set with such a program - * OUGHT to have been changed years ago. Having 2 -or- 3 - * authentication RPCs generated for every klog plays hob with the - * "failed login limits" code in the kaserver, and it's hard to - * explain to admins just how to set the limit properly. By removing - * this function, we can just double it internally in the kaserver, and - * not document anything. kpasswd had the TRUNCATEPASSWORD "feature" - * disabled on 10/02/90. - */ -#ifdef OLDCRUFT - if ((code == KABADREQUEST) && (strlen(password) > 8)) { - /* try with only the first 8 characters incase they set their password - * with an old style passwd program. */ - char pass8[9]; - strncpy(pass8, password, 8); - pass8[8] = 0; - ka_StringToKey(pass8, realm, &key); - memset(pass8, 0, sizeof(pass8)); - code = - GetTickets(name, instance, realm, &key, lifetime, - password_expires, dosetpag); - if (code == 0) { - fprintf(stderr, "%s %s\n%s %s\n%s\n", - "Warning: you have typed a password longer than 8", - "characters, but only the", - "first 8 characters were actually significant. If", - "you change your password", - "again this warning message will go away.\n"); - } - } -#endif /* OLDCRUFT */ } #ifndef AFS_NT40_ENV -- 2.39.5