Making a setgid program dump core?

Making a setgid program dump core?

Post by Greg Ubb » Thu, 01 May 1997 04:00:00



    Does anyone know how the signal handler of a setgid program can
be written to make it dump core?  An undocumented "feature" of AIX
4.1.4 appears to be that setgid programs do not dump core, presumably
for the same reason setuid programs do not core -- security.  I have
a program that needs to run setgid, and it crashes every two weeks
or so, and I need to find a way to make the signal handler produce
a core file before it exits so I can debug the problem.  Doing a
setgid(getgid()) before the abort() does not convince it it's safe.

    If nothing else, is there some code around that can be used to
manually write out the process's memory state in core-dump format?

Greg

 
 
 

Making a setgid program dump core?

Post by Boyd Rober » Sat, 03 May 1997 04:00:00



>    Does anyone know how the signal handler of a setgid program can
>be written to make it dump core?  An undocumented "feature" of AIX
>4.1.4 appears to be that setgid programs do not dump core, presumably
>for the same reason setuid programs do not core -- security.

Why don't you turn of the setgid bit and then invoke it with su(1)?

    /bin/su <user> -c 'command args ...'

--

``Not only is UNIX dead, it's starting to smell really bad.'' -- rob

 
 
 

Making a setgid program dump core?

Post by Marc Wachowi » Tue, 06 May 1997 04:00:00


You might be able to get some helpful information by having the program
attach a de* to it and write some stuff to a file before crashing
(should work both with dbx and gdb).

---
GiS - Gesellschaft fuer integrierte Systemplanung mbH
Marc Wachowitz                  Tel. +49-6201-503-38
Junkersstr. 2                   Fax  +49-6201-503-66

 
 
 

1. What makes program core dump when output piped?

I have a program that runs fine except when I try to pipe the output
(to another program such as more or even redirecting the output to a
file).  I know that programs can detect and act differently if the
output is piped (like when you use 'ls' by itself and 'ls | more').
The program is written in C.  What should I be looking at to try and
fix this problem?  Should I be looking at I/O?

Paul

2. Smail and SLIP

3. dump core or not dump core

4. Installation of network card ( in PCMCIA)

5. core dumps core dumps everywhere...

6. 102er testkernelproblem with scasi driver

7. Dynamic Libraries: core dump after changes have been made

8. GCC Install problems

9. DP2 Java 1.3 makes core dump

10. Core dump not making proper filename

11. 2.5 + X makes Emacs dump core (+ patch)

12. making linux core dump

13. Solaris/Motif program dumps core when displaying non-Solaris X-servers