diff options
author | YASUOKA Masahiko <yasuoka@cvs.openbsd.org> | 2014-07-12 20:07:08 +0000 |
---|---|---|
committer | YASUOKA Masahiko <yasuoka@cvs.openbsd.org> | 2014-07-12 20:07:08 +0000 |
commit | 76ab7731c8d7bf5b593e090c1dd49995443e175f (patch) | |
tree | c12d9a0bb4bb3cec87dc1fdc323d9e48a9e03c52 /usr.sbin/npppd | |
parent | 0316b0e310c928af0ee99031fd9f74a39350e35d (diff) |
Fix a potential bug. privsep.c didn't check the interface name
correctly if it's pppx.
Diffstat (limited to 'usr.sbin/npppd')
-rw-r--r-- | usr.sbin/npppd/npppd/privsep.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/usr.sbin/npppd/npppd/privsep.c b/usr.sbin/npppd/npppd/privsep.c index 6977644a2ac..5c79fa07b69 100644 --- a/usr.sbin/npppd/npppd/privsep.c +++ b/usr.sbin/npppd/npppd/privsep.c @@ -1,4 +1,4 @@ -/* $OpenBSD: privsep.c,v 1.11 2014/07/12 19:34:31 yasuoka Exp $ */ +/* $OpenBSD: privsep.c,v 1.12 2014/07/12 20:07:07 yasuoka Exp $ */ /* * Copyright (c) 2010 Yasuoka Masahiko <yasuoka@openbsd.org> @@ -1047,7 +1047,7 @@ static int privsep_npppd_check_get_if_addr(struct PRIVSEP_GET_IF_ADDR_ARG *arg) { if (strncmp(arg->ifname, "tun", 3) == 0 || - strncmp(arg->ifname, "pppx", 4)) + strncmp(arg->ifname, "pppx", 4) == 0) return (0); return (1); @@ -1057,7 +1057,7 @@ static int privsep_npppd_check_set_if_addr(struct PRIVSEP_SET_IF_ADDR_ARG *arg) { if (strncmp(arg->ifname, "tun", 3) == 0 || - strncmp(arg->ifname, "pppx", 4)) + strncmp(arg->ifname, "pppx", 4) == 0) return (0); return (1); @@ -1067,7 +1067,7 @@ static int privsep_npppd_check_del_if_addr(struct PRIVSEP_DEL_IF_ADDR_ARG *arg) { if (strncmp(arg->ifname, "tun", 3) == 0 || - strncmp(arg->ifname, "pppx", 4)) + strncmp(arg->ifname, "pppx", 4) == 0) return (0); return (1); @@ -1077,7 +1077,7 @@ static int privsep_npppd_check_get_if_flags(struct PRIVSEP_GET_IF_FLAGS_ARG *arg) { if (strncmp(arg->ifname, "tun", 3) == 0 || - strncmp(arg->ifname, "pppx", 4)) + strncmp(arg->ifname, "pppx", 4) == 0) return (0); return (1); @@ -1087,7 +1087,7 @@ static int privsep_npppd_check_set_if_flags(struct PRIVSEP_SET_IF_FLAGS_ARG *arg) { if (strncmp(arg->ifname, "tun", 3) == 0 || - strncmp(arg->ifname, "pppx", 4)) + strncmp(arg->ifname, "pppx", 4) == 0) return (0); return (1); |