newgrp sets core dump size limit to 0 on HP-UX 11

newgrp sets core dump size limit to 0 on HP-UX 11

Post by Christopher Allen Win » Sat, 26 Apr 2003 04:30:55



Hello,

I noticed today that using newgrp(1) on HP-UX 11.0 and 11.i results in the
hard limit for core dump size getting set to 0:

        hp% uname -a
        HP-UX hp B.11.11 U 9000/780 unknown
        hp% limit coredumpsize 12345
        hp% limit coredumpsize
        coredumpsize    12345 kbytes
        hp% limit -h coredumpsize
        coredumpsize    unlimited

        hp% newgrp users
        hp% limit coredumpsize
        coredumpsize    0 kbytes
        hp% limit -h coredumpsize
        coredumpsize    0 kbytes

Since it sets the hard limit to 0, it is not possible for to create a core
dump under any circumstances after running newgrp.

This seems to be hard coded in the newgrp binary, I did a system call
trace using tusc:

        # tusc /usr/bin/newgrp

        ... snip ...
        setrlimit(RLIMIT_CORE, 0x680f0804) ....................... = 0
        setgid(3) ................................................ = 0
        setresuid(0, 0, 0) ....................................... = 0
        setresuid(0, 0, 0) ....................................... = 0
        getpid() ................................................. = 21227 (21226)
        audwrite(0x680f0874) ..................................... = 0
        audswitch(0) ............................................. = 0
        setuid(0) ................................................ = 0
        execve("/sbin/sh", 0x680f0878, 0x680f0674) ............... = 0 [32-bit]
        ...

Note the call to setrlimit() right before it exec()s the shell.

/usr/bin/newgrp on HP-UX 10.20 does not seem to have this behavior. It
preserves the existing limits as you'd expect, and doesn't call
setrlimit(). However, 11.0 and 11.i both do.

Does anyone know if this is a feature or a bug?

Thanks,

Chris Wing

 
 
 

newgrp sets core dump size limit to 0 on HP-UX 11

Post by all mail refus » Sat, 26 Apr 2003 08:01:26




>I noticed today that using newgrp(1) on HP-UX 11.0 and 11.i results in the
>hard limit for core dump size getting set to 0:

Try switching groups in perl instead of with the newgrp(1) binary.

--
decoy mail addresses: obtain username via 0x4f/tcp or 0x50/tcp



 
 
 

newgrp sets core dump size limit to 0 on HP-UX 11

Post by Dennis Hand » Sat, 26 Apr 2003 20:18:30



: I noticed today that using newgrp(1) on HP-UX 11.0 and 11i results in the
: hard limit for core dump size getting set to 0:
: Does anyone know if this is a feature or a bug?

Someone else just mentioned patch PHCO_26235 for something else but it seem
to solve your problem instead.

PHCO_26235:
           1. newgrp command sets the core limits to 0.

 
 
 

newgrp sets core dump size limit to 0 on HP-UX 11

Post by Christopher Allen Win » Sat, 26 Apr 2003 22:31:20


Dennis:

Thanks! I didn't find anything in a usenet search but should have looked
on the HP site instead.

-Chris Wing


Quote:> Someone else just mentioned patch PHCO_26235 for something else but it seem
> to solve your problem instead.

> PHCO_26235:
>            1. newgrp command sets the core limits to 0.

 
 
 

1. Has HP-UX 11.x limit of 2GB for the dump volume (as 10.20 has) ?

For the HP-UX 10.20 to have the dump volume bigger than 2GB one has to
install some patches (PHCO_12822 for the savecore and PHKL_16388 for the
lvlnboot).

Does the HP-UX 11.x have the same limitation as HP-UX 10.20 has ? I.e. do
I need any patches to use larger dump volumes ?

TIA,
        Zenon

2. Colo(u)r pictures with PSfrag

3. how can I set the max file size limit on HPUX 11.0 using ulimit

4. 303 & 808 Emulator

5. Limiting Core Dumps to Zilch.

6. ActiveDirectory and Lotus Domino

7. ITO4.X opcmsg(3) causing core dump on 11.X

8. MultiPASS 2500

9. core size : how to limit ?

10. Limit core file sizes?

11. Limiting core size?

12. limiting size of core file