2005-04-16 18:15:07

by Ralf Hildebrandt

[permalink] [raw]
Subject: Coredump when program run as root?

I found this while trying to find out why squid doesn't produce a core
file:

http://lists.samba.org/archive/samba-technical/2002-August/023576.html

Most UNIX variants disable core dumps in programs that have changed their
uid or euid during operation. This includes Solaris and Linux.

Well, squid does exactly that. How can I still get a coredump? I really
need one. Kernel 2.6.11.7

--
Ralf Hildebrandt (i.A. des IT-Zentrum) [email protected]
Charite - Universit?tsmedizin Berlin Tel. +49 (0)30-450 570-155
Gemeinsame Einrichtung von FU- und HU-Berlin Fax. +49 (0)30-450 570-962
IT-Zentrum Standort CBF send no mail to [email protected]


2005-04-16 22:46:01

by Michael Tokarev

[permalink] [raw]
Subject: Re: Coredump when program run as root?

Ralf Hildebrandt wrote:
> I found this while trying to find out why squid doesn't produce a core
> file:
>
> http://lists.samba.org/archive/samba-technical/2002-August/023576.html
>
> Most UNIX variants disable core dumps in programs that have changed their
> uid or euid during operation. This includes Solaris and Linux.
>
> Well, squid does exactly that. How can I still get a coredump? I really
> need one. Kernel 2.6.11.7

Not in stock kernel, no.
There's a patch in -ac series which implements 'suid_dumpable' attribute.
It is included with RedHat kernels I think.
The fun stuff is that I wasn't able to use the functionality anyway (i
had similar but a bit worse problem) -- regardless of how hard i tried,
it didn't produce any core dumps ;)

/mjt

P.S. Hi, Ralf! The world is too small! ;)

2005-04-17 01:04:08

by Bodo Eggert

[permalink] [raw]
Subject: Re: Coredump when program run as root?

Ralf Hildebrandt <[email protected]> wrote:

> Most UNIX variants disable core dumps in programs that have changed their
> uid or euid during operation. This includes Solaris and Linux.
>
> Well, squid does exactly that. How can I still get a coredump? I really
> need one. Kernel 2.6.11.7

It cannot change the (e)uid if it is run as user. Maybe this helps.
--
Top 100 things you don't want the sysadmin to say:
78. Do you smell something?