DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUGĀ· RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT <http://issues.apache.org/bugzilla/show_bug.cgi?id=43596>. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED ANDĀ· INSERTED IN THE BUG DATABASE.
http://issues.apache.org/bugzilla/show_bug.cgi?id=43596 Summary: Chroot patch Product: Apache httpd-2 Version: 2.2.6 Platform: Other OS/Version: Linux Status: NEW Severity: enhancement Priority: P2 Component: Core AssignedTo: [email protected] ReportedBy: [EMAIL PROTECTED] This patch adds new configuration directive named "ChrootDir". For example: ChrootDir /var/www-chroot Chroot is called before changing to the non-privileged user. . . . if( NULL != unixd_config.chroot_dir ) { if(geteuid()) { ap_log_error(APLOG_MARK, APLOG_ALERT,errno,NULL, "Cannot chroot when not started as root"); return -1; } if( chdir( unixd_config.chroot_dir ) != 0 ) { ap_log_error(APLOG_MARK, APLOG_ALERT, errno,NULL, "Can't chdir to %s", unixd_config.chroot_dir); return -1; } if( chroot( unixd_config.chroot_dir ) != 0 ) { ap_log_error(APLOG_MARK, APLOG_ALERT, errno,NULL, "Can't chroot to %s", unixd_config.chroot_dir); return -1; } if( chdir( "/" ) != 0 ) { ap_log_error(APLOG_MARK, APLOG_ALERT, errno,NULL, "Can't chdir to new root"); return -1; } } . . . setuid(unixd_config.user_id) == -1)) . . . I use this patch from version 2.0.50 to 2.2.6 and have no problems. -- Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug, or are watching the assignee. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
