From: "Larrosa, Antonio" <antlarr@tedial.com>
To: <linux-kernel@vger.kernel.org>
Subject: seteuid and /proc/<pid>/exe
Date: Thu, 10 Jan 2013 18:32:33 +0100 [thread overview]
Message-ID: <7ce5db09b3a7556682a61a4fad23b2c8@tedial.com> (raw)
Hello,
I have a user with uid=1000 that runs a process, let's say with pid 42.
If I do a readlink on /proc/42/exe from another process run by that
same user,
it reads the link correctly.
If root calls readlink on that same link, it works correctly.
The problem is that I have another process that is run by root, and
then calls
seteuid(1000). When it tries to read that link, it fails with
"permission denied".
I could just seteuid(0), read the link and seteuid(1000) again
(I checked it and it works) but I wonder if that's really the expected
behaviour.
If any of the effective, real and saved uid of the process have
permissions to read the link,
is it expected that only because they're different, then the permission
is denied?
Thanks,
--
Antonio Larrosa
reply other threads:[~2013-01-10 18:01 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=7ce5db09b3a7556682a61a4fad23b2c8@tedial.com \
--to=antlarr@tedial.com \
--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
Powered by JetHome