mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* Doubt: core not dumped when binary give up root privileges.
@ 2003-08-22 19:25 Alexandre Pereira Nunes
  2003-08-23  1:25 ` Alexandre Pereira Nunes
  2003-08-26 16:04 ` Alan Cox
  0 siblings, 2 replies; 4+ messages in thread
From: Alexandre Pereira Nunes @ 2003-08-22 19:25 UTC (permalink / raw)
  To: linux-kernel


Hi,

I wrote a program which runs with uid 0, but later give up root privs by 
calling setreuid(x, x) where x is an unprivileged user.
Before doing that, it chdirs to a directory owned by that unprivileged 
user, with mode 700.

The program explicitly sets RLIMIT_CORE to RLIM_INFINITY when still 
running with uid 0.

If instead of calling the program as root, I call it from the non-priv 
uid in question, if it crashes, it dumps core on the mentioned dir. 
That's the desired behaviour, since I can then take the core and debug. 
But if I run it as root (in fact, I would have to), and it crashes (or 
is forced to ,by means of kill -SEGV), after it gives up root 
credentials, it won't leave a core dump file, which in turn means I 
cannot debug it later.

Any ideas?


Please CC-me since I'm not subscribed.

Thanks,

Alexandre


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2003-08-26 16:52 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-08-22 19:25 Doubt: core not dumped when binary give up root privileges Alexandre Pereira Nunes
2003-08-23  1:25 ` Alexandre Pereira Nunes
2003-08-26 16:04 ` Alan Cox
2003-08-26 16:52   ` Alexandre Pereira Nunes

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®