hi all,
I don't agree ( or don't understand ... ) with the read right check for
user home directory instead of user webapp directory when tomcat4 try to
deploy a user webapp.
Example:
I'm the user legolas.
My home is /home/legolas
My webapp is in /home/legolas/public_html
With tomcat4.1.18, /home/legolas has to been readable for tomcat (
drwxr-xr-x ), but in fact it should be only executable ( drwrr-w--x ).
Changing the read access check to /home/legolas/public_html make it work
without the need for tomcat4 to be able to read the user homedir.
That the senses of this patch
PS: Sorry for the english ( fr/fr )
--- org/apache/catalina/startup/HomesUserDatabase.java 2002-12-19 14:51:48.000000000 +0100
+++ /home/legolas/HomesUserDatabase.java 2003-01-31 23:53:07.000000000 +0100
@@ -167,6 +167,7 @@
/**
* Initialize our set of users and home directories.
+ * User WEBAPP dir must be readable
*/
private void init() {
@@ -177,12 +178,13 @@
String homeBaseFiles[] = homeBaseDir.list();
for (int i = 0; i < homeBaseFiles.length; i++) {
- File homeDir = new File(homeBaseDir, homeBaseFiles[i]);
- if (!homeDir.isDirectory() || !homeDir.canRead())
+ File homeWebAppDir = new File(homeBaseDir, homeBaseFiles[i] + "/" + userConfig.getDirectoryName() );
+ File homeDir = new File(homeBaseDir, homeBaseFiles[i] );
+ if (!homeWebAppDir.isDirectory() || !homeWebAppDir.canRead())
continue;
homes.put(homeBaseFiles[i], homeDir.toString());
}
-
+
}
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]