diff options
author | 2005-05-03 05:44:35 +0000 | |
---|---|---|
committer | 2005-05-03 05:44:35 +0000 | |
commit | 52da46bb785c4903539081bc28b73f7a8cbb04fd (patch) | |
tree | 55ac36b2146104fb0842c6c7193abe486ea759a7 /usr.sbin/httpd/src | |
parent | setresuid; ok deraadt@ (diff) | |
download | wireguard-openbsd-52da46bb785c4903539081bc28b73f7a8cbb04fd.tar.xz wireguard-openbsd-52da46bb785c4903539081bc28b73f7a8cbb04fd.zip |
setres[ug]id; ok deraadt@
Diffstat (limited to 'usr.sbin/httpd/src')
-rw-r--r-- | usr.sbin/httpd/src/main/http_main.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/usr.sbin/httpd/src/main/http_main.c b/usr.sbin/httpd/src/main/http_main.c index a97ed83c394..af0551a3807 100644 --- a/usr.sbin/httpd/src/main/http_main.c +++ b/usr.sbin/httpd/src/main/http_main.c @@ -1,4 +1,4 @@ -/* $OpenBSD: http_main.c,v 1.38 2005/02/09 12:13:09 henning Exp $ */ +/* $OpenBSD: http_main.c,v 1.39 2005/05/03 05:44:35 djm Exp $ */ /* ==================================================================== * The Apache Software License, Version 1.1 @@ -2947,8 +2947,8 @@ static void standalone_main(int argc, char **argv) is_chrooted = 1; setproctitle("parent [chroot %s]", ap_server_root); - if (setegid(ap_group_id) || setgid(ap_group_id) || - seteuid(ap_user_id) || setuid(ap_user_id)) { + if (setresgid(ap_group_id, ap_group_id, ap_group_id) != 0 || + setresuid(ap_user_id, ap_user_id, ap_user_id) != 0) { ap_log_error(APLOG_MARK, APLOG_CRIT, server_conf, "can't drop priviliges!"); exit(1); |