diff options
| author | 2011-10-11 22:53:00 +0000 | |
|---|---|---|
| committer | 2011-10-11 22:53:00 +0000 | |
| commit | c730dea46d0ea6934895cf88c5445d63f180838c (patch) | |
| tree | 1b1204dcea98747b9ea3fe1fff7fb561bc87da41 /usr.sbin/nginx/src/core/nginx.c | |
| parent | Update Digest module to 1.17 (security fix). (diff) | |
| download | wireguard-openbsd-c730dea46d0ea6934895cf88c5445d63f180838c.tar.xz wireguard-openbsd-c730dea46d0ea6934895cf88c5445d63f180838c.zip | |
Add a flag for nginx (-u) to be able to disable chroot and use a better
method for modifying the document root if chrooted, so currently this
allows the user to run the same configuration file with a chrooted and
an non-chrooted setup.
Diffstat (limited to 'usr.sbin/nginx/src/core/nginx.c')
| -rw-r--r-- | usr.sbin/nginx/src/core/nginx.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/usr.sbin/nginx/src/core/nginx.c b/usr.sbin/nginx/src/core/nginx.c index b8bab37e3f5..b578617bee2 100644 --- a/usr.sbin/nginx/src/core/nginx.c +++ b/usr.sbin/nginx/src/core/nginx.c @@ -238,6 +238,7 @@ main(int argc, char *const *argv) NGX_CONF_PATH ")" CRLF " -g directives : set global directives out of configuration " "file" CRLF + " -u : disable chroot(2)" CRLF ); } @@ -764,6 +765,10 @@ ngx_get_options(int argc, char *const *argv) ngx_log_stderr(0, "invalid option: \"-s %s\"", ngx_signal); return NGX_ERROR; + case 'u': + ngx_chrooted = 0; + break; + default: ngx_log_stderr(0, "invalid option: \"%c\"", *(p - 1)); return NGX_ERROR; |
