shttpd

The shttpd-optenv patch

The shttpd-optenv patch makes shttpd treat the $ROOT, $UID, and $GID environment variables as optional: if they are not set, the programs continue to run with their original root directory, user ID, and group ID. This is necessary for non-root users who want to run their own servers, and for CGI programs that need access to the entire filesystem or that run with the ID of a user who authenticates over the HTTP connection. The variables can be set independently; e.g., $UID and $GID can be set without also setting $ROOT.