From: kn Date: Fri, 20 Jul 2018 11:16:55 +0000 (+0000) Subject: Stop checking table commands for `create' X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=764778e2ff5eaf5e0fe907b51dfd0bc5a49b41b3;p=openbsd Stop checking table commands for `create' Tiny left over from 2003 when it was removed. Twist the logic by checking for `show' and `test' to make it even simpler. OK sashan henning --- diff --git a/sbin/pfctl/pfctl.c b/sbin/pfctl/pfctl.c index f74d9319e73..713b84b4f6d 100644 --- a/sbin/pfctl/pfctl.c +++ b/sbin/pfctl/pfctl.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pfctl.c,v 1.355 2018/07/10 09:30:49 henning Exp $ */ +/* $OpenBSD: pfctl.c,v 1.356 2018/07/20 11:16:55 kn Exp $ */ /* * Copyright (c) 2001 Daniel Hartmeier @@ -2491,7 +2491,7 @@ main(int argc, char *argv[]) argc -= optind; argv += optind; ch = *tblcmdopt; - mode = strchr("acdefkrz", ch) ? O_RDWR : O_RDONLY; + mode = strchr("st", ch) ? O_RDONLY : O_RDWR; } else if (argc != optind) { warnx("unknown command line argument: %s ...", argv[optind]); usage();