* SCM_CREDENTIALS and PID namespaces
@ 2009-07-06 23:13 Adam Langley
0 siblings, 0 replies; only message in thread
From: Adam Langley @ 2009-07-06 23:13 UTC (permalink / raw)
To: linux-kernel
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
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2009-07-06 23:13 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-07-06 23:13 SCM_CREDENTIALS and PID namespaces Adam Langley
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®