diff options
author | laforge <laforge> | 2002-03-14 11:35:58 +0000 |
---|---|---|
committer | laforge <laforge> | 2002-03-14 11:35:58 +0000 |
commit | 01608a86ae513b512ec966845e86a8490dc502f8 (patch) | |
tree | 32821b41042796995881aabc74f6821e7603b288 /extensions/libip6t_owner.c | |
parent | b57c177708274e319680a5ac425fabbcbee7edb1 (diff) |
Fix 'iptables -p !' bug (segfault when `!' used without argument)
Diffstat (limited to 'extensions/libip6t_owner.c')
-rw-r--r-- | extensions/libip6t_owner.c | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/extensions/libip6t_owner.c b/extensions/libip6t_owner.c index 4eed251..8b511d9 100644 --- a/extensions/libip6t_owner.c +++ b/extensions/libip6t_owner.c @@ -55,8 +55,7 @@ parse(int c, char **argv, int invert, unsigned int *flags, struct passwd *pwd; struct group *grp; case '1': - if (check_inverse(optarg, &invert)) - optind++; + check_inverse(optarg, &invert, &optind, 0); if ((pwd = getpwnam(optarg))) ownerinfo->uid = pwd->pw_uid; @@ -72,8 +71,7 @@ parse(int c, char **argv, int invert, unsigned int *flags, break; case '2': - if (check_inverse(optarg, &invert)) - optind++; + check_inverse(optarg, &invert, &optind, 0); if ((grp = getgrnam(optarg))) ownerinfo->gid = grp->gr_gid; else { @@ -88,8 +86,7 @@ parse(int c, char **argv, int invert, unsigned int *flags, break; case '3': - if (check_inverse(optarg, &invert)) - optind++; + check_inverse(optarg, &invert, &optind, 0); ownerinfo->pid = strtoul(optarg, &end, 0); if (*end != '\0' || end == optarg) exit_error(PARAMETER_PROBLEM, "Bad OWNER PID value `%s'", optarg); @@ -100,8 +97,7 @@ parse(int c, char **argv, int invert, unsigned int *flags, break; case '4': - if (check_inverse(optarg, &invert)) - optind++; + check_inverse(optarg, &invert, &optind, 0); ownerinfo->sid = strtoul(optarg, &end, 0); if (*end != '\0' || end == optarg) exit_error(PARAMETER_PROBLEM, "Bad OWNER SID value `%s'", optarg); |