From: Patrick McHardy <kaber@trash.net>
To: James Morris <jmorris@namei.org>
Cc: selinux@tycho.nsa.gov, netdev@vger.kernel.org,
netfilter-devel@lists.netfilter.org,
Stephen Smalley <sds@tycho.nsa.gov>,
Daniel J Walsh <dwalsh@redhat.com>
Subject: Re: [RFC][SECMARK 03/08] Add xtables SECMARK target
Date: Wed, 10 May 2006 08:03:31 +0200 [thread overview]
Message-ID: <44618233.5020704@trash.net> (raw)
In-Reply-To: <Pine.LNX.4.64.0605071134250.8588@d.namei>
James Morris wrote:
> This patch adds a SECMARK target to xtables, allowing
> the admin to apply security marks to packets via both
> iptables and ip6tables.
>
> The target currently handles SELinux security marking,
> but can be extended for other purposes as needed.
The netfilter parts all look fine too me (just one question,
see below). Shall I add the userspace parts to SVN or do you
want to do it yourself?
> +static int checkentry_selinux(struct xt_secmark_target_info *info)
> +{
> + int err;
> + struct xt_secmark_target_selinux_info *sel = &info->u.sel;
> +
> + err = selinux_string_to_sid(sel->selctx, &sel->selsid);
> + if (err) {
> + if (err == -EINVAL)
> + printk(KERN_INFO PFX "invalid SELinux context \'%s\'\n",
> + sel->selctx);
> + return 0;
> + }
> +
> + if (!sel->selsid) {
> + printk(KERN_INFO PFX "unable to map SELinux context \'%s\'\n",
> + sel->selctx);
> + return 0;
> + }
> +
> + return 1;
> +}
I wonder if the result of this check could be invalidated later
by removal of the selinux context and if it would matter, since
you reject contexts not known at initialization time.
next prev parent reply other threads:[~2006-05-10 6:03 UTC|newest]
Thread overview: 41+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-05-07 15:31 [RFC] SECMARK 1.0 James Morris
2006-05-07 15:33 ` [RFC] [SECMARK 01/08] Add secmark support to core networking James Morris
2006-05-07 15:34 ` [RFC][SECMARK 02/08] Export selinux_string_to_sid from SELinux James Morris
2006-05-07 15:35 ` [RFC][SECMARK 03/08] Add xtables SECMARK target James Morris
2006-05-10 6:03 ` Patrick McHardy [this message]
2006-05-10 13:30 ` James Morris
2006-05-11 7:06 ` Patrick McHardy
2006-05-07 15:36 ` [RFC][SECMARK 04/08] Add new flask definitions to SELinux James Morris
2006-05-07 15:37 ` [RFC][SECMARK 05/08] Add new packet controls " James Morris
2006-05-07 15:38 ` [RFC][SECMARK 06/08] Define a relabelto permission in the SELinux packet class James Morris
2006-05-07 15:39 ` [RFC][SECMARK 07/08] Add selinux_relabel_packet_permission() to SELinux API James Morris
2006-05-07 15:40 ` [RFC][SECMARK 08/08] Add selinux_relabel_packet_permission() check to xt_SECMARK James Morris
2006-05-08 17:54 ` Karl MacMillan
2006-05-08 21:19 ` James Morris
2006-05-07 15:42 ` [RFC][SECMARK userland 01/03] Add libselinux support James Morris
2006-05-07 15:43 ` [RFC][SECMARK userland 02/03] Add libipt_SECMARK James Morris
2006-05-07 15:44 ` [RFC][SECMARK userland 03/03] Add libip6t_SECMARK James Morris
2006-05-07 17:04 ` [RFC] SECMARK 1.0 Joshua Brindle
2006-05-07 17:43 ` James Morris
2006-05-08 17:41 ` Karl MacMillan
2006-05-08 21:29 ` James Morris
2006-05-09 13:24 ` Karl MacMillan
2006-05-09 16:40 ` James Morris
2006-05-09 17:06 ` Karl MacMillan
2006-05-09 18:56 ` James Morris
2006-05-09 17:11 ` Stephen Smalley
2006-05-07 17:44 ` James Morris
2006-05-14 6:03 ` [RFC] SECMARK 1.1 James Morris
2006-05-14 18:37 ` Patrick McHardy
2006-05-15 4:24 ` James Morris
2006-05-15 5:29 ` Patrick McHardy
2006-05-15 5:57 ` James Morris
2006-05-15 6:04 ` Patrick McHardy
2006-05-15 6:22 ` James Morris
2006-05-15 6:26 ` Patrick McHardy
2006-05-15 6:37 ` James Morris
2006-05-15 6:42 ` James Morris
2006-05-15 6:43 ` Patrick McHardy
2006-05-15 12:35 ` Karl MacMillan
2006-05-17 13:36 ` Thomas Bleher
2006-05-17 14:56 ` James Morris
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=44618233.5020704@trash.net \
--to=kaber@trash.net \
--cc=dwalsh@redhat.com \
--cc=jmorris@namei.org \
--cc=netdev@vger.kernel.org \
--cc=netfilter-devel@lists.netfilter.org \
--cc=sds@tycho.nsa.gov \
--cc=selinux@tycho.nsa.gov \
/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).