Getting a SUID daemon to dump core

From: Tod A. Sandman (sandmant@is.rice.edu)
Date: Fri Jun 24 2005 - 14:33:27 EDT


I have a SUID daemon, "dspam", that I fire up as root, and it
suid's to user "dspam". It segfaults after some time, and I
need to get a core file (but cannot get it to leave one).

I've tried
  ulimit -c unlimited
as root before I fire up the daemon. I have tried
  coreadm -e global -e process -e global-setid -e proc-setid
The dspam user owns the directory where the daemon resides
and from where I fire it up.

When it segfaults, no core file is left.
When I run gcore on it as user dspam, I get
  gcore: cannot grab 18158: permission denied

I'm using Solaris 9 (5.9 Generic_117171-17).

More debuuging info, in case it helps:

root@rita-blanca:/use/site/dspam-3.4.8/src> ulimit -a
core file size (blocks) unlimited
data seg size (kbytes) unlimited
file size (blocks) unlimited
open files 1024
pipe size (512 bytes) 10
stack size (kbytes) 8192
cpu time (seconds) unlimited
max user processes 9845
virtual memory (kbytes) unlimited

root@rita-blanca:/usr/site/dspam-3.4.8/src> coreadm
     global core file pattern:
       init core file pattern: core
            global core dumps: enabled
       per-process core dumps: enabled
      global setid core dumps: enabled
 per-process setid core dumps: enabled
     global core dump logging: enabled

root@rita-blanca:/usr/site/dspam-3.4.8/src> ls -lF dspam
-r-sr-sr-x 1 dspam antispam 1560016 Jun 22 14:11 dspam*

root@rita-blanca:/usr/site/dspam-3.4.8/src> ./dspam --daemon&
[1] 18158

root@rita-blanca:/usr/site/dspam-3.4.8/src> ps -ef | grep -- --daemon
   dspam 18158 2177 0 08:09:59 pts/39 0:00 ./dspam --daemon

root@rita-blanca:/usr/site/dspam-3.4.8/src> su dspam

dspam@rita-blanca:/usr/site/dspam-3.4.8/src> gcore 18158
gcore: cannot grab 18158: permission denied

Any help is greatly appreciated.

Tod Sandman
Sr. Systems Administrator
Middleware Development & Integration
Rice University
Voice: 713.348.5816
_______________________________________________
sunmanagers mailing list
sunmanagers@sunmanagers.org
http://www.sunmanagers.org/mailman/listinfo/sunmanagers



This archive was generated by hypermail 2.1.7 : Wed Apr 09 2008 - 23:30:57 EDT