[1.7] bugs in faccessat

Eric Blake ebb9@byu.net
Fri Sep 25 03:35:00 GMT 2009


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

According to Eric Blake on 9/3/2009 9:58 AM:
> Second, it is not performing the proper checks when AT_EACCESS is set and the 
> applications' effective id differs from the real id (to fix this would require 
> adding a parameter to fhandler_base::fhaccess).

Actually, faccessat(,AT_EACCESS) was right, but access() and faccessat(,0)
were doing the wrong thing (using effective id instead of real id when
doing the permission check).  I think I got it all right, but please
double-check me.

2009-09-24  Eric Blake  <ebb9@byu.net>

	* fhandler.h (fhandler_base::fhaccess): Add parameter.
	* security.h (check_file_access, check_registry_access): Likewise.
	* security.cc (check_file_access, check_registry_access)
	(check_access): Implement new parameter.
	* fhandler.cc (fhandler_base::fhaccess): Likewise.
	(device_access_denied): Update caller.
	* syscalls.cc (access, faccessat): Update callers.

- --
Don't work too hard, make some time for fun as well!

Eric Blake             ebb9@byu.net
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (Cygwin)
Comment: Public key at home.comcast.net/~ericblake/eblake.gpg
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAkq8OmQACgkQ84KuGfSFAYD5ggCglYCjeUDkJF30Bn455/MoEkrn
ynkAn29rXYxx0RV47hEXpAqkVoFijiz2
=mWIO
-----END PGP SIGNATURE-----
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: cygwin.patch22
URL: <http://cygwin.com/pipermail/cygwin-patches/attachments/20090925/51139200/attachment.ksh>


More information about the Cygwin-patches mailing list