summaryrefslogtreecommitdiff
path: root/usr.sbin/authpf
diff options
context:
space:
mode:
authorMiod Vallat <miod@cvs.openbsd.org>2013-01-19 16:58:17 +0000
committerMiod Vallat <miod@cvs.openbsd.org>2013-01-19 16:58:17 +0000
commit08b87de1bb899fd1d8d8524f9333cc09bf8f3561 (patch)
treec3db9f86ed109e29084b3b6ed7e8088f13226d35 /usr.sbin/authpf
parent7d4b9e6b7b7955d157fcac61e91496492d46ef60 (diff)
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;