netfilter-devel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jan Engelhardt <jengelh@medozas.de>
To: kaber@trash.net
Cc: netfilter-devel@vger.kernel.org
Subject: [PATCH 05/13] libxt_owner: remove ifdef IPT_COMM_OWNER
Date: Mon,  9 May 2011 11:37:03 +0200	[thread overview]
Message-ID: <1304933832-16412-6-git-send-email-jengelh@medozas.de> (raw)
In-Reply-To: <1304933832-16412-1-git-send-email-jengelh@medozas.de>

Ever since we keep a copy of the header files anyway, IPT_COMM_OWNER
is always available.

Signed-off-by: Jan Engelhardt <jengelh@medozas.de>
---
 extensions/libxt_owner.c |   20 --------------------
 1 files changed, 0 insertions(+), 20 deletions(-)

diff --git a/extensions/libxt_owner.c b/extensions/libxt_owner.c
index 5cc7b7a..f930cf4 100644
--- a/extensions/libxt_owner.c
+++ b/extensions/libxt_owner.c
@@ -65,7 +65,6 @@ enum {
 
 static void owner_mt_help_v0(void)
 {
-#ifdef IPT_OWNER_COMM
 	printf(
 "owner match options:\n"
 "[!] --uid-owner userid       Match local UID\n"
@@ -74,15 +73,6 @@ static void owner_mt_help_v0(void)
 "[!] --sid-owner sessionid    Match local SID\n"
 "[!] --cmd-owner name         Match local command name\n"
 "NOTE: PID, SID and command matching are broken on SMP\n");
-#else
-	printf(
-"owner match options:\n"
-"[!] --uid-owner userid       Match local UID\n"
-"[!] --gid-owner groupid      Match local GID\n"
-"[!] --pid-owner processid    Match local PID\n"
-"[!] --sid-owner sessionid    Match local SID\n"
-"NOTE: PID and SID matching are broken on SMP\n");
-#endif /* IPT_OWNER_COMM */
 }
 
 static void owner_mt6_help_v0(void)
@@ -110,9 +100,7 @@ static const struct option owner_mt_opts_v0[] = {
 	{.name = "gid-owner", .has_arg = true, .val = 'g'},
 	{.name = "pid-owner", .has_arg = true, .val = 'p'},
 	{.name = "sid-owner", .has_arg = true, .val = 's'},
-#ifdef IPT_OWNER_COMM
 	{.name = "cmd-owner", .has_arg = true, .val = 'c'},
-#endif
 	XT_GETOPT_TABLEEND,
 };
 
@@ -189,7 +177,6 @@ owner_mt_parse_v0(int c, char **argv, int invert, unsigned int *flags,
 		*flags      |= FLAG_SID_OWNER;
 		return true;
 
-#ifdef IPT_OWNER_COMM
 	case 'c':
 		xtables_param_act(XTF_ONLY_ONCE, "owner", "--cmd-owner", *flags & FLAG_COMM);
 		if (strlen(optarg) > sizeof(info->comm))
@@ -205,7 +192,6 @@ owner_mt_parse_v0(int c, char **argv, int invert, unsigned int *flags,
 		info->match |= IPT_OWNER_COMM;
 		*flags      |= FLAG_COMM;
 		return true;
-#endif
 	}
 	return false;
 }
@@ -394,11 +380,9 @@ owner_mt_print_item_v0(const struct ipt_owner_info *info, const char *label,
 		printf(" %u", (unsigned int)info->sid);
 		break;
 
-#ifdef IPT_OWNER_COMM
 	case IPT_OWNER_COMM:
 		printf(" %.*s", (int)sizeof(info->comm), info->comm);
 		break;
-#endif
 	}
 }
 
@@ -502,9 +486,7 @@ owner_mt_print_v0(const void *ip, const struct xt_entry_match *match,
 	owner_mt_print_item_v0(info, "owner GID match", IPT_OWNER_GID, numeric);
 	owner_mt_print_item_v0(info, "owner PID match", IPT_OWNER_PID, numeric);
 	owner_mt_print_item_v0(info, "owner SID match", IPT_OWNER_SID, numeric);
-#ifdef IPT_OWNER_COMM
 	owner_mt_print_item_v0(info, "owner CMD match", IPT_OWNER_COMM, numeric);
-#endif
 }
 
 static void
@@ -538,9 +520,7 @@ owner_mt_save_v0(const void *ip, const struct xt_entry_match *match)
 	owner_mt_print_item_v0(info, "--gid-owner", IPT_OWNER_GID, true);
 	owner_mt_print_item_v0(info, "--pid-owner", IPT_OWNER_PID, true);
 	owner_mt_print_item_v0(info, "--sid-owner", IPT_OWNER_SID, true);
-#ifdef IPT_OWNER_COMM
 	owner_mt_print_item_v0(info, "--cmd-owner", IPT_OWNER_COMM, true);
-#endif
 }
 
 static void
-- 
1.7.1


  parent reply	other threads:[~2011-05-09  9:37 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-05-09  9:36 guided option parser, run 5 Jan Engelhardt
2011-05-09  9:36 ` [PATCH 01/13] libxt_tos: add inversion support back again Jan Engelhardt
2011-05-09  9:37 ` [PATCH 02/13] libxtables: fix assignment in wrong offset (XTTYPE_UINT*RC) Jan Engelhardt
2011-05-09  9:37 ` [PATCH 03/13] libxt_u32: add missing call to xtables_option_parse Jan Engelhardt
2011-05-09  9:37 ` [PATCH 04/13] extensions: remove bogus use of XT_GETOPT_TABLEEND Jan Engelhardt
2011-05-09  9:37 ` Jan Engelhardt [this message]
2011-05-09  9:37 ` [PATCH 06/13] libxtables: output name of extension on rev detect failure Jan Engelhardt
2011-05-09  9:37 ` [PATCH 07/13] extensions: const annotations Jan Engelhardt
2011-05-09  9:37 ` [PATCH 08/13] libxt_statistic: streamline and document possible placement of negation Jan Engelhardt
2011-05-09  9:37 ` [PATCH 09/13] libxt_statistic: increase precision on create and dump Jan Engelhardt
2011-05-09  9:37 ` [PATCH 10/13] libxtables: XTTYPE_DOUBLE support Jan Engelhardt
2011-05-09  9:37 ` [PATCH 11/13] libxt_statistic: use guided option parser Jan Engelhardt
2011-05-09  9:37 ` [PATCH 12/13] libxt_IDLETIMER: " Jan Engelhardt
2011-05-09  9:37 ` [PATCH 13/13] libxt_NFLOG: " Jan Engelhardt
2011-05-09 18:24 ` guided option parser, run 5 Patrick McHardy

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1304933832-16412-6-git-send-email-jengelh@medozas.de \
    --to=jengelh@medozas.de \
    --cc=kaber@trash.net \
    --cc=netfilter-devel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).