summaryrefslogtreecommitdiffstats
path: root/usr.sbin/authpf
diff options
context:
space:
mode:
authorderaadt <deraadt@openbsd.org>2014-04-02 02:12:24 +0000
committerderaadt <deraadt@openbsd.org>2014-04-02 02:12:24 +0000
commitf265b59b94501142d5f99d7884d9081e2ab9f9c8 (patch)
tree295a1855acd2b5c310e569d33213114fdc3b5545 /usr.sbin/authpf
parentRemove -ggdb -g3, this shouldn't be here (diff)
downloadwireguard-openbsd-f265b59b94501142d5f99d7884d9081e2ab9f9c8.tar.xz
wireguard-openbsd-f265b59b94501142d5f99d7884d9081e2ab9f9c8.zip
use setresgid()
ok guenther millert
Diffstat (limited to 'usr.sbin/authpf')
-rw-r--r--usr.sbin/authpf/authpf.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.sbin/authpf/authpf.c b/usr.sbin/authpf/authpf.c
index d036bfa850c..0d294f1cef1 100644
--- a/usr.sbin/authpf/authpf.c
+++ b/usr.sbin/authpf/authpf.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: authpf.c,v 1.119 2013/04/02 06:04:50 guenther Exp $ */
+/* $OpenBSD: authpf.c,v 1.120 2014/04/02 02:12:24 deraadt Exp $ */
/*
* Copyright (C) 1998 - 2007 Bob Beck (beck@openbsd.org).
@@ -805,7 +805,7 @@ change_filter(int add, const char *luser, const char *ipsrc)
case 0:
/* revoke group privs before exec */
gid = getgid();
- if (setregid(gid, gid) == -1) {
+ if (setresgid(gid, gid, gid) == -1) {
err(1, "setregid");
}
execvp(PATH_PFCTL, pargv);