* fhandler_disk_file.cc (fhandler_disk_file::facl): If file can't be

opened for reading the ACLs, fall back to faking them.
	* sec_acl.cc (acl_worker): Handle non-existing files.
	* security.cc (get_file_attribute): Return ILLEGAL_UID/ILLEGAL_GID
	as owner/group for non-readable ACLs on file systems supporting them.
This commit is contained in:
Corinna Vinschen
2007-07-30 10:58:16 +00:00
parent 73151c54d5
commit 378692ee42
4 changed files with 26 additions and 2 deletions

View File

@@ -841,6 +841,7 @@ fhandler_disk_file::facl (int cmd, int nentries, __aclent32_t *aclbufp)
if (!pc.has_acls () || !allow_ntsec)
{
cant_access_acl:
switch (cmd)
{
struct __stat64 st;
@@ -895,9 +896,13 @@ fhandler_disk_file::facl (int cmd, int nentries, __aclent32_t *aclbufp)
{
if (!get_handle ())
{
query_open (cmd == SETACL ? query_write_control : query_read_attributes);
query_open (cmd == SETACL ? query_write_control : query_read_control);
if (!(oret = open (O_BINARY, 0)))
return -1;
{
if (cmd == GETACL || cmd == GETACLCNT)
goto cant_access_acl;
return -1;
}
}
switch (cmd)
{