1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-11-04 22:33:27 +00:00
freebsd-ports/www/apache-jserv/files/patch-ag
Jun Kuriyama c6e27288e4 Update to v1.1.
Submitted by:	greg@greg.rim.or.jp (Kensaku Masuda)
PR:		ports/16600

# I don't like to use directory ${PREFIX}/docs.  But it seems it is
# difficult to move it to somewhere.
2000-02-10 14:19:22 +00:00

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");
+ }
}
/**