From: Markku Savela <msa@moth.iki.fi>
To: linux-kernel@vger.kernel.org
Subject: Access to credentials of a process from another?
Date: Fri, 08 Aug 2008 11:31:56 +0300 [thread overview]
Message-ID: <87bq03vrer.fsf_-_@burp.tkv.asdf.org> (raw)
In-Reply-To: <aAZcn-22h-19@gated-at.bofh.it> (Markku Savela's message of "Wed\, 04 Jun 2008 13\:20\:19 +0200")
I looked with some interest the big credentials patch.
I have a desire to do following in user space
- have PID of another process
- want to check some aspect of credentials of this process from
another process (for example, currently whether the other process
has a specific group in its context).
In current Ubuntu release, to achieve this, I had to patch kernel
sys.c and write own kernel module which offered the API for this
function.
I notice that credentials (http://lwn.net/Articles/287091/) document
has some wording about accessing credentials from another
process. What is not clear yet (in document),
- is this possible from loadable module (e.g. are the required
symbols exported)?
- are there any plans to define some API for a user space application
to access this information?
I assume that in some cases, like Unix socket, the peers should
have same direct vay of reading each others credentials blobs from the
socket?
However, for example, in case of DBus this is murky, as the server and
client do not have direct connection to each other, and DBus would
need to pass some information. Currently, with some work, it is
possible for DBus server to get the clients PID. Thus, a function in
user space to get the credentials by PID would be sufficient.
Also, it is not acceptable to say that DBus should use it's "root"
powers and fake clients credentials on forwarded messages.
- First, not all DBus are root,
- second, server might want to see both credentials (DBus servers and
the originating client).
Finally, I don't like any text based /proc file solutions, for example
parsing output of "/proc/<pid>/status" is horrible (especially was not
option for me, because it does not give all groups anyway).
parent reply other threads:[~2008-08-08 8:45 UTC|newest]
Thread overview: expand[flat|nested] mbox.gz Atom feed
[parent not found: <aAZcn-22h-19@gated-at.bofh.it>]
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=87bq03vrer.fsf_-_@burp.tkv.asdf.org \
--to=msa@moth.iki.fi \
--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®