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.
2007-07-30 Corinna Vinschen <corinna@vinschen.de>
+ * 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.
+
+2007-07-30 Corinna Vinschen <corinna@vinschen.de>
+
* syscalls.cc (stat_worker): Don't call build_fh_pc with invalid pc.
2007-07-29 Christopher Faylor <me+cygwin@cgf.cx>
if (!pc.has_acls () || !allow_ntsec)
{
+cant_access_acl:
switch (cmd)
{
struct __stat64 st;
{
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)
{
debug_printf ("got %d error from build_fh_name", fh->error ());
set_errno (fh->error ());
}
+ else if (!fh->exists ())
+ set_errno (ENOENT);
else
res = fh->facl (cmd, nentries, aclbufp);
get_info_from_sd (sd, attribute, uidret, gidret);
return 0;
}
+ else
+ {
+ if (uidret)
+ *uidret = ILLEGAL_UID;
+ if (gidret)
+ *gidret = ILLEGAL_GID;
+
+ return -1;
+ }
}
if (uidret)