From: Paul Moore <paul@paul-moore.com>
To: Ole Kliemann <ole@plastictree.net>,
Richard Haines <richard_c_haines@btinternet.com>
Cc: selinux@tycho.nsa.gov
Subject: Re: RFC - Display context information using iproute2 ss utility
Date: Fri, 07 Feb 2014 16:50:22 -0500 [thread overview]
Message-ID: <4844959.FlXfI971DN@sifl> (raw)
In-Reply-To: <20140207170325.GA10040@telmora.telvanni>
On Friday, February 07, 2014 06:03:25 PM Ole Kliemann wrote:
> On Fri, Feb 07, 2014 at 04:22:37PM +0000, Richard Haines wrote:
> > I've been patching the iproute2 "ss" utility to display the SELinux
> > security contexts for process and sockets, however I'm not sure
> > whether the socket contexts are correct (I expected most to show
> > system_u:object_r:....).
> >
> > I'm taking the socket contexts from /proc/PID/fd as was mentioned in
> > a previous email regarding socket contexts - is this correct ??
>
> I was doing it that way and it seemed to work ...
What you will see is the label of the socket's associated inode, not the
actual socket label.
> ... I could even change the context using 'chcon /proc/PID/fd'.
Yes, you really shouldn't do that. I've actually got a patch kicking around
that I haven't had the time to test which will actually prevent you from
changing a socket's inode label.
> But I have no idea whether it is supposed to be a reliable way or
> any other methods exist. The whole sockfs thing kept me rather
> wondering...
It works as far as I know, it just turns out that it isn't quite what you
think it is :)
--
paul moore
www.paul-moore.com
next prev parent reply other threads:[~2014-02-07 21:50 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-02-07 16:22 RFC - Display context information using iproute2 ss utility Richard Haines
2014-02-07 17:03 ` Ole Kliemann
2014-02-07 21:50 ` Paul Moore [this message]
2014-02-09 16:27 ` Richard Haines
2014-02-11 23:17 ` Paul Moore
2014-02-17 20:10 ` Ole Kliemann
2014-02-17 21:38 ` Paul Moore
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=4844959.FlXfI971DN@sifl \
--to=paul@paul-moore.com \
--cc=ole@plastictree.net \
--cc=richard_c_haines@btinternet.com \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.