mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* seteuid and /proc/<pid>/exe
@ 2013-01-10 17:32 Larrosa, Antonio
  0 siblings, 0 replies; only message in thread
From: Larrosa, Antonio @ 2013-01-10 17:32 UTC (permalink / raw)
  To: linux-kernel

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

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2013-01-10 18:01 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-01-10 17:32 seteuid and /proc/<pid>/exe Larrosa, Antonio

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