tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Kurt Miller" <>
Subject [PATCH] mod_jk - chroot and user issues
Date Tue, 10 Dec 2002 18:04:59 GMT
I recently created a port of mod_jk-1.2.1 for OpenBSD and needed to make
some minor patches to mod_jk. OpenBSD 3.2 has Apache 1.3.26 configured as
ServerType standalone, to chroot to /var/www and run as user www by default.
This combination requires a few minor patches so that mod_jk will continue
to work after an Apache restart.

Both jk_set_worker_file and jk_set_log_file need to call
ap_server_strip_chroot to account for the path changes while chrooted.

The log file is initially created as user/group = root/daemon, but after a
restart Apache is running as www/www so it doesn't have permission to reopen
the log file. In order to have the log file continue working after a
restart, I patched jk_init. Instead of setting conf->log to NULL when
jk_open_file_logger fails, I set it to main_log. In other words, if the new
log file can't be opened it falls back to the already open one. Other
possible solutions are to change the user and/or group of the log file to
match the Apache User/Group directives, however if the admin changes the log
file name the open will still fail unless the directory has write access for
the Apache User/Group.

I made some patches to allow the object files to be built
outside the source tree. I think these patches will work for other archs/OSs

Please review and consider commiting. Please cc me if replying. Thank You.


View raw message