From 0430ec61dcb80e5aa11a547f03ce79800824b61b Mon Sep 17 00:00:00 2001 From: yasuoka Date: Sat, 12 Jul 2014 20:07:07 +0000 Subject: [PATCH] Fix a potential bug. privsep.c didn't check the interface name correctly if it's pppx. --- usr.sbin/npppd/npppd/privsep.c | 12 ++++++------ 1 file 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 @@ -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); -- 2.20.1