[7795] in Athena Bugs
Bug in release 7.3 kadmind server
daemon@ATHENA.MIT.EDU (Theodore Ts'o)
Thu Jul 25 19:29:31 1991
Date: Thu, 25 Jul 91 19:29:33 -0400
From: tytso@ATHENA.MIT.EDU (Theodore Ts'o)
To: bugs@ATHENA.MIT.EDU
Cc: mar@ATHENA.MIT.EDU
Reply-To: tytso@ATHENA.MIT.EDU
The code which services the check_password request of the kadmind server
is broken; this doesn't really affect the release, since the patch
doesn't touch any client programs; however, for completeness sake, this
patch should be applied to the Kerberos sources:
I forgot to test the check_password code when I added the password
string checking feature; before that point, the password string was
being ignored, and so the admin server didn't notice that the password
string was incorrect.
This patch is now running on the Kerberos server, so the check_password
request which is used by the new user registration program should work
now.
- Ted
<tytso@tsx-11> {/afs/net/project/krb4/src/kadmin}, Level 2
86% rcsdiff -c kadm_server.c
RCS file: RCS/kadm_server.c,v
retrieving revision 4.3
diff -c -r4.3 kadm_server.c
*** /tmp/,RCSt1003112 Thu Jul 25 19:02:10 1991
--- kadm_server.c Thu Jul 25 18:58:43 1991
***************
*** 246,252 ****
char pword[MAX_KPW_LEN];
int no_pword = 0;
des_cblock newkey;
! int stvlen;
int retval;
extern char *malloc();
extern int kadm_approve_pw();
--- 246,252 ----
char pword[MAX_KPW_LEN];
int no_pword = 0;
des_cblock newkey;
! int stvlen = 0,status;
int retval;
extern char *malloc();
extern int kadm_approve_pw();
***************
*** 253,266 ****
/* take key off the stream, and check it */
! if ((stvlen = stv_long(dat, &keyhigh, 0, len)) < 0)
return(KADM_LENGTH_ERROR);
! if ((stvlen = stv_long(dat, &keylow, stvlen, len)) < 0)
return(KADM_LENGTH_ERROR);
! if ((stvlen = stv_string(dat, pword, stvlen, sizeof(pword), len)) < 0) {
no_pword++;
pword[0]='\0';
}
keylow = ntohl(keylow);
keyhigh = ntohl(keyhigh);
--- 253,269 ----
/* take key off the stream, and check it */
! if ((status = stv_long(dat, &keyhigh, 0, len)) < 0)
return(KADM_LENGTH_ERROR);
! stvlen += status;
! if ((status = stv_long(dat, &keylow, stvlen, len)) < 0)
return(KADM_LENGTH_ERROR);
! stvlen += status;
! if ((status = stv_string(dat, pword, stvlen, sizeof(pword), len)) < 0) {
no_pword++;
pword[0]='\0';
}
+ stvlen += status;
keylow = ntohl(keylow);
keyhigh = ntohl(keyhigh);