diff options
author | Daniel Hartmeier <dhartmei@cvs.openbsd.org> | 2003-07-08 11:31:28 +0000 |
---|---|---|
committer | Daniel Hartmeier <dhartmei@cvs.openbsd.org> | 2003-07-08 11:31:28 +0000 |
commit | 53d1f343bc234aafae9425fca082a6a0e8478fcb (patch) | |
tree | 61f3f3d50d3eaf6738b81e9db34936f91854b431 /usr.sbin/authpf | |
parent | 0efe44324aa5c777a6c0da6c1712e8a0dfe6be9b (diff) |
Fix a bug that caused removal of previous users' rules when more then one
user loggged in concurrently. And fix a smaller bug which prevented
complete removal of a user's state entries on logout. Bug report and
testing by Ed Powers.
Diffstat (limited to 'usr.sbin/authpf')
-rw-r--r-- | usr.sbin/authpf/authpf.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/usr.sbin/authpf/authpf.c b/usr.sbin/authpf/authpf.c index 0656e30babf..975a999ee34 100644 --- a/usr.sbin/authpf/authpf.c +++ b/usr.sbin/authpf/authpf.c @@ -1,4 +1,4 @@ -/* $OpenBSD: authpf.c,v 1.64 2003/07/03 21:09:13 cedric Exp $ */ +/* $OpenBSD: authpf.c,v 1.65 2003/07/08 11:31:27 dhartmei Exp $ */ /* * Copyright (C) 1998 - 2002 Bob Beck (beck@openbsd.org). @@ -546,7 +546,7 @@ remove_stale_rulesets(void) pid = strtoul(prs.name, &s, 10); if (!prs.name[0] || errno || *s) return (1); - if (kill(pid, 0)) { + if (kill(pid, 0) && errno != EPERM) { int i; for (i = 0; i < PF_RULESET_MAX; ++i) { @@ -699,6 +699,7 @@ authpf_kill_states(void) syslog(LOG_ERR, "DIOCKILLSTATES failed (%m)"); /* Kill all states to ipsrc */ + psk.psk_af = AF_INET; memset(&psk.psk_src, 0, sizeof(psk.psk_src)); psk.psk_dst.addr.v.a.addr.v4 = target; memset(&psk.psk_dst.addr.v.a.mask, 0xff, |