* fhandler.cc (fhandler_base::facl): Drop CLASS_OBJ entry.

* fhandler_disk_file.cc (fhandler_disk_file::facl): Ditto in noacl case.
	* sec_acl.cc (getacl): Compute useful fake CLASS_OBJ and DEF_CLASS_OBJ
	permission bits based on how these values are generated on Linux.
	Add commants to explain what the code is doing.
	* security.cc (get_attribute_from_acl): Compute group permission based
	on the actual primary group permissions and all secondary user and group
	ACCESS_ALLOWED_ACEs to emulate Linux' behaviour more closely.
	(check_access): Fix typos im comment.
	* include/cygwin/acl.h (MIN_ACL_ENTRIES): Redefine as 3.
This commit is contained in:
Corinna Vinschen
2014-08-28 12:38:52 +00:00
parent c51ce2447a
commit 1a33a5c6d3
6 changed files with 78 additions and 27 deletions

View File

@@ -1,6 +1,6 @@
/* cygwin/acl.h header file for Cygwin.
Copyright 1999, 2000, 2001, 2002, 2010 Red Hat, Inc.
Copyright 1999, 2000, 2001, 2002, 2010, 2014 Red Hat, Inc.
Written by C. Vinschen.
This file is part of Cygwin.
@@ -25,7 +25,7 @@ extern "C" {
#define GETACL (0x1)
#define GETACLCNT (0x2)
#define MIN_ACL_ENTRIES (4) // minimal acl entries from GETACLCNT
#define MIN_ACL_ENTRIES (3) // minimal acl entries from GETACLCNT
#define MAX_ACL_ENTRIES (256) // max entries of each type
// Return values of aclcheck(3) in case of error */