Article View: news.software.readers
Article #248Re: Two queries regarding C-News (one of which also hits rn)
From: Jerry Aguirre
Date: Tue, 02 Jul 1991 01:24
Date: Tue, 02 Jul 1991 01:24
21 lines
1921 bytes
1921 bytes
In article <1991Jun30.234027.19310@zoo.toronto.edu> henry@zoo.toronto.edu (Henry Spencer) writes: >Yes. In an off-the-shelf SunOS 3.2 (to name the example I have combat >experience with; I'm sure there are more) chown is not even in the normal >search path. I agree that peppering the code with chowns is not the solution. B news used to change UID to the news owner but that is a little harder for a shell script. But how hard its it to check if it is running as the wrong UID and abort with a nasty message if not? Alright so whoami et. al. are non portable. Does everything have to be a shell script? How about a small C program that does a stat of the active file and compares the owner's UID to the UID returned by geteuid. If they do not match then it prints an error message and returns a non-zero exit status. Add that to doexpire and the other scripts likely to be run by hand or crontab. The scripts can then exit if the returned status is non-zero. Is that portable enough? It is far better to have the commands abort than run as root!
Technical Details
Message-ID:
<50929@olivea.atc.olivetti.com>Path:
mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!archive!mbox2nntp-news.software.readers.mbox.zip!gmdzi!unido!math.fu-berlin.de!ox.com!yale.edu!think.com!samsung!olivea!jerryReferences:
<1991Jun28.170745.6774@zoo.toronto.edu> <1991Jun29.104655.11340@panix.uucp> <1991Jun30.234027.19310@zoo.toronto.edu>Show Full Headers
Complete Article Headers
Message-ID: <50929@olivea.atc.olivetti.com> Subject: Re: Two queries regarding C-News (one of which also hits rn) Date: Tue, 02 Jul 1991 01:24:21 +0000 From: jerry@olivey.ATC.Olivetti.Com (Jerry Aguirre) References: <1991Jun28.170745.6774@zoo.toronto.edu> <1991Jun29.104655.11340@panix.uucp> <1991Jun30.234027.19310@zoo.toronto.edu> Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!archive!mbox2nntp-news.software.readers.mbox.zip!gmdzi!unido!math.fu-berlin.de!ox.com!yale.edu!think.com!samsung!olivea!jerry Newsgroups: news.software.b,news.software.readers Sender: news@olivea.atc.olivetti.com Followup-To: news.software.b Organization: Olivetti ATC; Cupertino, CA Lines: 21