writing daemons under SunOS 4.0?
Henry Troup
bnr-fos!leibniz!hwt at watmath.waterloo.edu
Tue Apr 4 12:01:45 AEST 1989
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?
utgpu!bnr-vpa!bnr-fos!hwt%bnr-public
hwt at bnr (BITNET/NETNORTH)
(613) 765-2337 (Voice)
[[ Making a program setuid only changes the "effective" uid, leaving the
"real" uid the same. This used to be sufficient to prevent kill from
killing it, but apparently not anymore. I wonder if that's a bug or more
SVID compliance? Have the program use "setreuid(0,0)" to set both the
real and effective uid to root. See the manual page setreuid(2) for more
details. --wnl ]]
More information about the Comp.sys.sun
mailing list