mirror of
https://git.freebsd.org/ports.git
synced 2025-06-07 05:40:30 -04:00
* make PREFIX work PR: 50705 Submitted by: Gea-Suan Lin <gslin@netnews.NCTU.edu.tw> Approved by: maintainer timeout (2 weeks)
19 lines
571 B
Text
19 lines
571 B
Text
--- src/modules/rlm_mschap/rlm_mschap.c.orig Tue Apr 8 11:53:05 2003
|
|
+++ src/modules/rlm_mschap/rlm_mschap.c Tue Apr 8 11:53:32 2003
|
|
@@ -260,10 +260,15 @@
|
|
SHA1_CTX Context;
|
|
char hash[20];
|
|
|
|
+ const char *name;
|
|
+
|
|
+ name = strchr(user_name, '\\');
|
|
+ name = name == NULL ? user_name : name + 1;
|
|
+
|
|
SHA1Init(&Context);
|
|
SHA1Update(&Context, peer_challenge, 16);
|
|
SHA1Update(&Context, auth_challenge, 16);
|
|
- SHA1Update(&Context, user_name, strlen(user_name));
|
|
+ SHA1Update(&Context, name, strlen(name));
|
|
SHA1Final(hash, &Context);
|
|
memcpy(challenge, hash, 8);
|
|
}
|