🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.sys.sun
Article #12435

Re: writing daemons under SunOS 4.0

#12435
From: Mikel Lechner
Date: Wed, 03 May 1989 11:04
16 lines
1307 bytes
bnr-fos!leibniz!hwt@watmath.waterloo.edu (Henry Troup) writes:
>X-Sun-Spots-Digest: Volume 7, Issue 221, message 8 of 12
>I'm writing a daemon process under SunOS 4.0.  I've made the program
>setuid root, it immediately forks, and gets rid of its controlling
>terminal.  But I can still kill the process from the general user I
>started it from.  Is this the correct behaviour?

You can also do "setuid(geteuid())".  This sets both the effective and
real userids to the effective userid.  This is good practice in all setuid
programs unless they require the original user's permissions.


Mikel Lechner			UUCP:  ...!{decwrl,sun}!teraida!mikel
Teradyne EDA, Inc.		Phone: (408) 980-5200
5155 Old Ironsides Drive
Santa Clara, Ca 95054
Technical Details
Message-ID: <3706@teraida.UUCP>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!cornell!uw-beaver!rice!sun-spots-request
References: <359@bnr-fos.UUCP>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!cornell!uw-beaver!rice!sun-spots-request
From: ames!decwrl!teraida!mikel@uunet.uu.net (Mikel Lechner)
Newsgroups: comp.sys.sun
Subject: Re: writing daemons under SunOS 4.0
Keywords: Software
Message-ID: <3706@teraida.UUCP>
Date: 3 May 89 11:04:06 GMT
References: <359@bnr-fos.UUCP>
Sender: usenet@rice.edu
Organization: Teradyne EDA Inc., Santa Clara, Calif.
Lines: 16
Approved: Sun-Spots@rice.edu
Original-Date: 13 Apr 89 18:11:10 GMT
X-Sun-Spots-Digest: Volume 7, Issue 264, message 2 of 13