authsrv: fix chap
use OCHAPREPLYLEN instead of sizeof(reply) (no padding). exit after sending ticket response to force eof as factotum unconditionally reads tailing secret hash (as of mschap).
This commit is contained in:
parent
87c2d23c8f
commit
2bd59d9cb3
1 changed files with 5 additions and 1 deletions
|
@ -588,8 +588,9 @@ chap(Ticketreq *tr)
|
|||
/*
|
||||
* get chap reply
|
||||
*/
|
||||
if(readn(0, &reply, sizeof(reply)) < 0)
|
||||
if(readn(0, &reply, OCHAPREPLYLEN) < 0)
|
||||
exits(0);
|
||||
|
||||
safecpy(tr->uid, reply.uid, sizeof(tr->uid));
|
||||
if(tr->uid[0] == 0)
|
||||
exits(0);
|
||||
|
@ -625,6 +626,9 @@ chap(Ticketreq *tr)
|
|||
tickauthreply(tr, &hkey);
|
||||
|
||||
syslog(0, AUTHLOG, "chap-ok %s %s", tr->uid, raddr);
|
||||
|
||||
/* no secret after ticket */
|
||||
exits(0);
|
||||
}
|
||||
|
||||
enum {
|
||||
|
|
Loading…
Reference in a new issue