From: Adam Langley <agl@imperialviolet.org>
To: linux-kernel@vger.kernel.org
Subject: SCM_CREDENTIALS and PID namespaces
Date: Mon, 6 Jul 2009 16:13:48 -0700 [thread overview]
Message-ID: <396556a20907061613h48691c80m75e5bfe17c1069cb@mail.gmail.com> (raw)
Currently, the SCM_CREDENTIALS control message contains the PID of the
sending process, in the sender's PID namespace. This would seem to
violate the spirit of SCM_CREDENTIALS since, from the receiver's point
of view, the sender's PID in that namespace might be another process
entirely.
I started to write a patch for this, but then got hung up on the
semantics, so I'm asking here first.
Here's what I think should happen:
A received SCM_CREDENTIALS should contain the PID of the sending
process, in the receiver's namespace. Or -1 if the PID is not
representable.
If the sending process has exited, the pid should be -1. (We don't
want to hold a reference to a struct pid from the SKB, so we have to
do this).
When sending an SCM_CREDENTIALS message, if pid == getpid(), then the
PID acts as above. Otherwise, we pass the PID raw to the receiver. (A
process has to be CAP_SYS_ADMIN to fake its PID).
Seem reasonable?
AGL
--
Adam Langley agl@imperialviolet.org http://www.imperialviolet.org
reply other threads:[~2009-07-06 23:13 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=396556a20907061613h48691c80m75e5bfe17c1069cb@mail.gmail.com \
--to=agl@imperialviolet.org \
--cc=linux-kernel@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
all inboxes | Powered by JetHome®