]> git.eshelyaron.com Git - emacs.git/commitdiff
Port file-acl errno checking to non-GNU
authorPaul Eggert <eggert@cs.ucla.edu>
Sun, 6 Oct 2019 16:53:53 +0000 (09:53 -0700)
committerPaul Eggert <eggert@cs.ucla.edu>
Sun, 6 Oct 2019 16:54:25 +0000 (09:54 -0700)
Problem reported privately for FreeBSD 12 by Ashish Shukla.
* src/fileio.c (Ffile_acl): Treat EINVAL etc. like ENOTSUP if
acl_get_file fails, to port to FreeBSD 12 and other non-GNU
platforms.

src/fileio.c

index 45186d694016b9156ab39d2ae70fe43dd4f789db..781a71bcf358b5734ef59d6b8c3903c863d5298f 100644 (file)
@@ -3248,7 +3248,7 @@ Return nil if file does not exist.  */)
   acl_t acl = acl_get_file (SSDATA (ENCODE_FILE (absname)), ACL_TYPE_EXTENDED);
   if (acl == NULL)
     {
-      if (errno == ENOENT || errno == ENOTDIR || errno == ENOTSUP)
+      if (errno == ENOENT || errno == ENOTDIR || acl_errno_valid (errno))
        return Qnil;
       report_file_error ("Getting ACLs", absname);
     }