Subject: Re: Addition to force open to open only regular files
To: Simon Burge <>
From: Warner Losh <>
List: tech-kern
Date: 11/12/2000 14:35:34
In message <> Simon Burge writes:
: It's that act of opening and then closing a file that would, for
: example, cause a tape drive to rewind or eject.  By then it's too
: late - fstat() will only tell you that the tape device you just
: opened will eject when you close the device.

Right.  That's why you really need to be able to drop privs, open the
file, raise the privs.  Anything that doesn't allow this will be
doomed to failure.

Someone had said that there was an example of why seteuid() won't
work, but so far haven't forwarded those examples to me.