Date: Wed, 16 Jan 2002 11:58:45 -0800 From: Terry Lambert <tlambert2@mindspring.com> To: "Crist J . Clark" <cjc@FreeBSD.ORG> Cc: Devon@jovi.net, FreeBSD@jovi.net, freebsd-questions@FreeBSD.ORG Subject: Re: kern/33904: secure mode bug Message-ID: <3C45DB75.34BEC0DA@mindspring.com> References: <200201142344.g0ENimK91227@freefall.freebsd.org> <20020115011230.D28767@blossom.cjclark.org> <200201151526.g0FFQFX02180@grant.org> <20020115133339.A31328@blossom.cjclark.org> <200201152202.g0FM2lE05944@grant.org> <20020115205321.D31328@blossom.cjclark.org>
next in thread | previous in thread | raw e-mail | index | archive | help
Redirected to -questions... "Crist J . Clark" wrote: > > (failure to set the time is not usually expected) > > > > Programs seem to handle it ok when user is not root. > > If the program checks if it is running under the superuser uid on its > own, it might not have exceptions to deal with these types of > problems. It's also fun to have programs tell you you need to be root > to do something when you are root. The code is broken, if it is not checking the return value of the system call. If the code is checking the return value of the system call and assuming all errors are because it's non-root, then it's missing EPERM -- and again, the code is broken. I think an "EADMIN" would be useful in this case as an error return, but, of course, the behaviour of the system call is documented to be different in init(8), and the user had to go out of their way to get to secure level 2, and one really expects that they read the manual page in order to figure out how to do this, and the resulting implications. -- Terry To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?3C45DB75.34BEC0DA>