summaryrefslogtreecommitdiffstats
path: root/usr.sbin/authpf
diff options
context:
space:
mode:
authormiod <miod@openbsd.org>2013-01-19 16:58:16 +0000
committermiod <miod@openbsd.org>2013-01-19 16:58:16 +0000
commit0987cbc7e14bca4444b45884643792d354e0f683 (patch)
tree25b2966a44c0a871d61c4363abeac7a8003855e5 /usr.sbin/authpf
parentRB_INSERT does not remove existing elments; ok djm@ (diff)
downloadwireguard-openbsd-0987cbc7e14bca4444b45884643792d354e0f683.tar.xz
wireguard-openbsd-0987cbc7e14bca4444b45884643792d354e0f683.zip
fix build with gcc 2
Diffstat (limited to 'usr.sbin/authpf')
-rw-r--r--usr.sbin/authpf/authpf.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/usr.sbin/authpf/authpf.c b/usr.sbin/authpf/authpf.c
index b3be00fe0e0..dd556529b2d 100644
--- a/usr.sbin/authpf/authpf.c
+++ b/usr.sbin/authpf/authpf.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: authpf.c,v 1.117 2013/01/15 23:03:37 beck Exp $ */
+/* $OpenBSD: authpf.c,v 1.118 2013/01/19 16:58:16 miod Exp $ */
/*
* Copyright (C) 1998 - 2007 Bob Beck (beck@openbsd.org).
@@ -749,16 +749,16 @@ change_filter(int add, const char *luser, const char *ipsrc)
if (add) {
struct stat sb;
struct group *grent;
- if((grent = getgrgid(getgid())) == NULL) {
- syslog(LOG_ERR, "Group not found user %s, gid %d",
- luser, getgid());
- }
-
char *pargv[13] = {
"pfctl", "-p", "/dev/pf", "-q", "-a", "anchor/ruleset",
"-D", "user_id=X", "-D", "user_ip=X", "-f", "file", NULL
};
+ if((grent = getgrgid(getgid())) == NULL) {
+ syslog(LOG_ERR, "Group not found user %s, gid %d",
+ luser, getgid());
+ }
+
if (luser == NULL || !luser[0] || ipsrc == NULL || !ipsrc[0]) {
syslog(LOG_ERR, "invalid luser/ipsrc");
goto error;