Subject: Re: Addition to force open to open only regular files
To: Simon Burge <email@example.com>
From: Warner Losh <firstname.lastname@example.org>
Date: 11/12/2000 14:35:34
In message <20001112101416.C4AE71FF85@thoreau.thistledown.com.au> 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.