]> git.sur5r.net Git - bacula/bacula/blobdiff - bacula/src/filed/acl.c
Implement feature request #1939
[bacula/bacula] / bacula / src / filed / acl.c
index b83bd7a19ef63a643e33611e3831750e09bf6cb2..59eac94e277322721e8f4b51dfa12e3b17e7d4b8 100644 (file)
@@ -32,6 +32,7 @@
  *   - AIX (pre-5.3 and post 5.3 acls, acl_get and aclx_get interface)
  *   - Darwin
  *   - FreeBSD (POSIX and NFSv4/ZFS acls)
+ *   - GNU Hurd
  *   - HPUX
  *   - IRIX
  *   - Linux
@@ -543,7 +544,8 @@ static bacl_exit_code (*os_parse_acl_streams)
       defined(HAVE_FREEBSD_OS) || \
       defined(HAVE_IRIX_OS) || \
       defined(HAVE_OSF1_OS) || \
-      defined(HAVE_LINUX_OS)
+      defined(HAVE_LINUX_OS) || \
+      defined(HAVE_HURD_OS)
 
 #include <sys/types.h>
 
@@ -642,7 +644,8 @@ static int acl_count_entries(acl_t acl)
 {
    int count = 0;
 #if defined(HAVE_FREEBSD_OS) || \
-    defined(HAVE_LINUX_OS)
+    defined(HAVE_LINUX_OS) || \
+    defined(HAVE_HURD_OS)
    acl_entry_t ace;
    int entry_available;
 
@@ -684,7 +687,8 @@ static bool acl_is_trivial(acl_t acl)
    acl_entry_t ace;
    acl_tag_t tag;
 #if defined(HAVE_FREEBSD_OS) || \
-    defined(HAVE_LINUX_OS)
+    defined(HAVE_LINUX_OS) || \
+    defined(HAVE_HURD_OS)
    int entry_available;
 
    entry_available = acl_get_entry(acl, ACL_FIRST_ENTRY, &ace);
@@ -1275,7 +1279,8 @@ static bacl_exit_code (*os_parse_acl_streams)
                       freebsd_parse_acl_streams;
 
 #elif defined(HAVE_IRIX_OS) || \
-      defined(HAVE_LINUX_OS)
+      defined(HAVE_LINUX_OS) || \
+      defined(HAVE_HURD_OS)
 /*
  * Define the supported ACL streams for these OSes
  */
@@ -1293,6 +1298,13 @@ static int os_access_acl_streams[1] = {
 static int os_default_acl_streams[1] = {
    STREAM_ACL_LINUX_DEFAULT_ACL
 };
+#elif defined(HAVE_HURD_OS)
+static int os_access_acl_streams[1] = {
+   STREAM_ACL_HURD_ACCESS_ACL
+};
+static int os_default_acl_streams[1] = {
+   STREAM_ACL_HURD_DEFAULT_ACL
+};
 #endif
 
 static bacl_exit_code generic_build_acl_streams(JCR *jcr, FF_PKT *ff_pkt)