Diff for /embedaddon/rsync/lib/sysacls.c between versions 1.1.1.1 and 1.1.1.2

version 1.1.1.1, 2012/02/17 15:09:30 version 1.1.1.2, 2016/11/01 09:54:32
Line 2 Line 2
  * Unix SMB/CIFS implementation.   * Unix SMB/CIFS implementation.
  * Based on the Samba ACL support code.   * Based on the Samba ACL support code.
  * Copyright (C) Jeremy Allison 2000.   * Copyright (C) Jeremy Allison 2000.
 * Copyright (C) 2007-2008 Wayne Davison * Copyright (C) 2007-2015 Wayne Davison
  *   *
  * The permission functions have been changed to get/set all bits via   * The permission functions have been changed to get/set all bits via
  * one call.  Some functions that rsync doesn't need were also removed.   * one call.  Some functions that rsync doesn't need were also removed.
Line 80  SMB_ACL_T sys_acl_get_file( const char *path_p, SMB_AC Line 80  SMB_ACL_T sys_acl_get_file( const char *path_p, SMB_AC
         return acl_get_file( path_p, type);          return acl_get_file( path_p, type);
 }  }
   
 #if 0  
 SMB_ACL_T sys_acl_get_fd(int fd)  SMB_ACL_T sys_acl_get_fd(int fd)
 {  {
         return acl_get_fd(fd);          return acl_get_fd(fd);
 }  }
 #endif  
   
   int sys_acl_get_brand( SMB_ACL_T the_acl, int *brand_p)
   {
           return acl_get_brand_np(the_acl, brand_p);
   }
   
   int sys_acl_get_brand_file( const char *path_p, int *brand_p)
   {
           int fd;
           acl_t acl;
   
           if ((fd = open(path_p, O_RDONLY|O_NONBLOCK)) < 0)
                   return -1;
           if ((acl = acl_get_fd(fd)) == NULL) {
                   close(fd);
                   return -1;
           }
           close(fd);
           if (acl_get_brand_np(acl, brand_p) < 0) {
                   acl_free(acl);
                   return -1;
           }
   
           acl_free(acl);
           return 0;
   }
   
 #if defined(HAVE_ACL_GET_PERM_NP)  #if defined(HAVE_ACL_GET_PERM_NP)
 #define acl_get_perm(p, b) acl_get_perm_np(p, b)  #define acl_get_perm(p, b) acl_get_perm_np(p, b)
 #endif  #endif
Line 873  int sys_acl_get_tag_type(SMB_ACL_ENTRY_T entry_d, SMB_ Line 897  int sys_acl_get_tag_type(SMB_ACL_ENTRY_T entry_d, SMB_
   
 #define INITIAL_ACL_SIZE        16  #define INITIAL_ACL_SIZE        16
   
   #ifndef NACLENTRIES
   #define NACLENTRIES 0
   #endif
   
 SMB_ACL_T sys_acl_get_file(const char *path_p, SMB_ACL_TYPE_T type)  SMB_ACL_T sys_acl_get_file(const char *path_p, SMB_ACL_TYPE_T type)
 {  {
         SMB_ACL_T       acl_d;          SMB_ACL_T       acl_d;
Line 909  SMB_ACL_T sys_acl_get_file(const char *path_p, SMB_ACL Line 937  SMB_ACL_T sys_acl_get_file(const char *path_p, SMB_ACL
   
                 sys_acl_free_acl(acl_d);                  sys_acl_free_acl(acl_d);
   
                if ((count = acl(path_p, ACL_CNT, 0, NULL)) < 0) {                if ((count = acl(path_p, ACL_CNT, NACLENTRIES, NULL)) < 0) {
                         return NULL;                          return NULL;
                 }                  }
   

Removed from v.1.1.1.1  
changed lines
  Added in v.1.1.1.2


FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>