aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorbrian <brian@FreeBSD.org>2002-07-05 08:07:02 +0800
committerbrian <brian@FreeBSD.org>2002-07-05 08:07:02 +0800
commit9790a4dae92f80c4614c95c7771ed5b55300c7a0 (patch)
tree205cee1ccfc33ac9f125f929fef38ec798513b52
parent2fde2babedced10dfc3f936db9d548b28e308689 (diff)
downloadfreebsd-ports-gnome-9790a4dae92f80c4614c95c7771ed5b55300c7a0.tar.gz
freebsd-ports-gnome-9790a4dae92f80c4614c95c7771ed5b55300c7a0.tar.zst
freebsd-ports-gnome-9790a4dae92f80c4614c95c7771ed5b55300c7a0.zip
Don't include any domain suffix when hashing the username -
as per rfc2759.
-rw-r--r--net/freeradius/files/patch-ab20
-rw-r--r--net/freeradius2/files/patch-ab20
2 files changed, 40 insertions, 0 deletions
diff --git a/net/freeradius/files/patch-ab b/net/freeradius/files/patch-ab
new file mode 100644
index 000000000000..cd74cc9ab4a4
--- /dev/null
+++ b/net/freeradius/files/patch-ab
@@ -0,0 +1,20 @@
+--- src/modules/rlm_mschap/rlm_mschap.c.orig Mon Jan 21 11:20:42 2002
++++ src/modules/rlm_mschap/rlm_mschap.c Fri Jul 5 00:44:19 2002
+@@ -258,11 +258,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);
+ }
diff --git a/net/freeradius2/files/patch-ab b/net/freeradius2/files/patch-ab
new file mode 100644
index 000000000000..cd74cc9ab4a4
--- /dev/null
+++ b/net/freeradius2/files/patch-ab
@@ -0,0 +1,20 @@
+--- src/modules/rlm_mschap/rlm_mschap.c.orig Mon Jan 21 11:20:42 2002
++++ src/modules/rlm_mschap/rlm_mschap.c Fri Jul 5 00:44:19 2002
+@@ -258,11 +258,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);
+ }