mirror of
https://git.FreeBSD.org/ports.git
synced 2024-12-27 05:10:36 +00:00
874e935564
Update net/freeradius to 1.0.0 from 0.9.3 and take maintainership. PR: ports/70603 Submitted by: Andrew Thompson <andy@fud.org.nz>
20 lines
570 B
Plaintext
20 lines
570 B
Plaintext
--- src/modules/rlm_mschap/rlm_mschap.c.orig Thu Aug 19 10:20:28 2004
|
|
+++ src/modules/rlm_mschap/rlm_mschap.c Thu Aug 19 10:21:16 2004
|
|
@@ -220,10 +220,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);
|
|
}
|