Writing to A NON-Existing File in \"C\"

Root Boy Jim rbj at icst-cmr.arpa
Tue Apr 26 09:26:26 AEST 1988


   [access is ...]
   ... for setuid programs to determine whether the real user can access
   a file.  (It's the wrong way to do even that, because of the resulting
   window, but that's another can of worms.)

OK, now to address that window issue. As I understand it, the basic
objection to access is a window of vulnerability between deciding if
access to a file is okay, and actually doing something to that file,
(for the purposes of this discussion, let's say open) someone could
possibly substitute another file. I propose enclosing the whole mess
between two stat's, and testing whether the vital statistics match.
Then, you can assume it's the same file you asks about via access.

					   der Mouse

			   uucp: mouse at mcgill-vision.uucp
			   arpa: mouse at larry.mcrcim.mcgill.edu

	(Root Boy) Jim Cottrell	<rbj at icst-cmr.arpa>
	National Bureau of Standards
	Flamer's Hotline: (301) 975-5688
	The opinions expressed are solely my own
	and do not reflect NBS policy or agreement
	Now, let's SEND OUT for QUICHE!!



More information about the Comp.unix.wizards mailing list