[SWLUG] how hard can it be... to get a core dump
Mark Summerfield
mark at qtrac.eu
Thu Sep 25 11:28:13 UTC 2008
On 2008-09-25, Dave Cridland wrote:
> On Thu Sep 25 08:16:19 2008, Mark Summerfield wrote:
> > and even if I use sysctl with -e I still end up with
> >
> > $ cat /proc/sys/fs/suid_dumpable
> >
> > printing 0.
>
> Ah... If it's a setuid program, we found it easiest to do it within
> the source:
It isn't a setuid program so there's no setuid() call... I just found a
list of instructions for making core dumps happen and followed them, and
the last one was to execute syctl, but I've no idea why or what it was
supposed to do.
> +#if defined (linux)
> + prctl(PR_SET_DUMPABLE, 1UL);
> +#endif
>
> That bit is just after the setuid() call.
>
> We assume that people who don't want core dumps will ulimit it away,
> you might want to make it optional.
>
> Dave.
--
Mark Summerfield, Qtrac Ltd, www.qtrac.eu
C++, Python, Qt, PyQt - training and consultancy
"C++ GUI Programming with Qt 4" - ISBN 0132354160
More information about the Swlug
mailing list