mirror of
https://git.FreeBSD.org/ports.git
synced 2024-11-08 23:06:56 +00:00
32 lines
1.1 KiB
Plaintext
32 lines
1.1 KiB
Plaintext
|
--- src/java/org/apache/jserv/JServConnection.java.orig Wed Feb 9 00:05:03 2000
|
||
|
+++ src/java/org/apache/jserv/JServConnection.java Wed Feb 9 00:15:59 2000
|
||
|
@@ -1062,6 +1062,14 @@
|
||
|
* known.
|
||
|
*/
|
||
|
public String getRemoteUser() {
|
||
|
+ String type = getAuthType();
|
||
|
+ if(type == null) {
|
||
|
+ return (String) env_vars.get("REMOTE_USER");
|
||
|
+ } else if(type.equalsIgnoreCase("SSL")) {
|
||
|
+ String name = (String)env_vars.get("SSL_CLIENT_DN");
|
||
|
+ name = name.replace('/', ',');
|
||
|
+ return name.substring(1);
|
||
|
+ }
|
||
|
return (String) env_vars.get("REMOTE_USER");
|
||
|
}
|
||
|
|
||
|
@@ -1072,7 +1080,12 @@
|
||
|
* @return this request's authentication scheme, or null if none.
|
||
|
*/
|
||
|
public String getAuthType() {
|
||
|
- return (String) env_vars.get("AUTH_TYPE");
|
||
|
+ String temp = (String) env_vars.get("SSL_CLIENT_DN");
|
||
|
+ if(temp != null && temp.equals("") == false) {
|
||
|
+ return "SSL";
|
||
|
+ } else {
|
||
|
+ return (String) env_vars.get("AUTH_TYPE");
|
||
|
+ }
|
||
|
}
|
||
|
|
||
|
/**
|