浏览代码

Merge pull request #3958 from ThomasWaldmann/fix-acl-proto-1.1

acl platform code: fix acl set return type (1.1-maint)
TW 7 年之前
父节点
当前提交
874e6b8971
共有 3 个文件被更改,包括 3 次插入3 次删除
  1. 1 1
      src/borg/platform/darwin.pyx
  2. 1 1
      src/borg/platform/freebsd.pyx
  3. 1 1
      src/borg/platform/linux.pyx

+ 1 - 1
src/borg/platform/darwin.pyx

@@ -13,7 +13,7 @@ cdef extern from "sys/acl.h":
 
     int acl_free(void *obj)
     acl_t acl_get_link_np(const char *path, int type)
-    acl_t acl_set_link_np(const char *path, int type, acl_t acl)
+    int acl_set_link_np(const char *path, int type, acl_t acl)
     acl_t acl_from_text(const char *buf)
     char *acl_to_text(acl_t acl, ssize_t *len_p)
     int ACL_TYPE_EXTENDED

+ 1 - 1
src/borg/platform/freebsd.pyx

@@ -22,7 +22,7 @@ cdef extern from "sys/acl.h":
 
     int acl_free(void *obj)
     acl_t acl_get_link_np(const char *path, int type)
-    acl_t acl_set_link_np(const char *path, int type, acl_t acl)
+    int acl_set_link_np(const char *path, int type, acl_t acl)
     acl_t acl_from_text(const char *buf)
     char *acl_to_text_np(acl_t acl, ssize_t *len, int flags)
     int ACL_TEXT_NUMERIC_IDS

+ 1 - 1
src/borg/platform/linux.pyx

@@ -26,7 +26,7 @@ cdef extern from "sys/acl.h":
 
     int acl_free(void *obj)
     acl_t acl_get_file(const char *path, int type)
-    acl_t acl_set_file(const char *path, int type, acl_t acl)
+    int acl_set_file(const char *path, int type, acl_t acl)
     acl_t acl_from_text(const char *buf)
     char *acl_to_text(acl_t acl, ssize_t *len)