🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: news.software.nntp
Article #36487

Re: setrlimit(RLIMIT_STACK, RLIM_INFINITY) error in INN 1.7.2 errlog (on RH5.2)

#36487
From: Arthur Hagen
Date: Mon, 12 Apr 1999 00:00
45 lines
2291 bytes
In article <yllnfykc9c.fsf@windlord.stanford.edu>, Russ Allbery <rra@stanford.edu> writes:
> Mark Walter <mark@guiware.com> writes:
> 
> > My errlog for INN 1.7.2 on RH5.2 is showing the following errors:
> 
> > /usr/lib/news/bin/startinnfeed: setrlimit(RLIMIT_STACK, RLIM_INFINITY):
> > Operation not permitted
> > /usr/lib/news/bin/startinnfeed: setrlimit(RLIMIT_NOFILE, RLIM_INFINITY):
> > Operation not permitted
> 
> startinnfeed should be setuid root.  Is it?

Even with startinnfeed suid root, you'll get this error on HP-UX
unless you've patched the source (or patched the kernel).
You can change the rlim_max parameter, but not the rlim_cur parameter.
So the rlim_cur parameter should be set to the value of getrlimit()
on HP-UX.

Here's a diff for startinnfeed.c fixing this for HP-UX for inn-2.2
(sorry, I don't have the 1.7.2 source, but I'm sure Mark will figure it
out from the diff.  Not a lot has changed in this part of startinnfeed
from 1.x to 2.x anyhow).

50c50,54
<   rl.rlim_cur = rl.rlim_max = RLIM_INFINITY;
---
>   /* rl.rlim_cur = rl.rlim_max = RLIM_INFINITY; */
>   /* Fix for HP-UX 10.20, which won't let us raise rlim_cur at this
>      time: */
>   getrlimit(RLIMIT_DATA,&rl);
>   rl.rlim_max = RLIM_INFINITY;
54a59,63
> 
>   /* Continuation of fix for HP-UX 10.20 as mentioned above */
>   getrlimit(RLIMIT_STACK,&rl);
>   rl.rlim_max = RLIM_INFINITY;
> 


Regards,
-- 
*Art

Technical Details
Message-ID: <hlmre7.bcs3.ln@flying.broomstick.com>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.nntp.mbox.zip!not-for-mail
References: <7er2ol$qtg$1@news1.guiware.com> <yllnfykc9c.fsf@windlord.stanford.edu>

Show Full Headers
Complete Article Headers
Message-ID: <hlmre7.bcs3.ln@flying.broomstick.com>
Subject: Re: setrlimit(RLIMIT_STACK, RLIM_INFINITY) error in INN 1.7.2 errlog (on RH5.2)
Date: Mon, 12 Apr 1999 00:00:00 +0000
From: art@flying.broomstick.com (Arthur Hagen)
References: <7er2ol$qtg$1@news1.guiware.com> <yllnfykc9c.fsf@windlord.stanford.edu>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.nntp.mbox.zip!not-for-mail
X-Deja-AN: 465316494
X-Complaints-To: abuse@globalone.no
X-Trace: bone.globalone.no 923885058 14009 194.52.172.70 (12 Apr 1999 02:44:18 GMT)
Organization: Broomstick Net Services
Reply-To: art@broomstick.com
NNTP-Posting-Date: 12 Apr 1999 02:44:18 GMT
Newsgroups: news.software.nntp