]> arthur.barton.de Git - netatalk.git/commitdiff
Fixed conflicts from merge
authorFrank Lahm <franklahm@googlemail.com>
Wed, 20 Oct 2010 12:19:27 +0000 (14:19 +0200)
committerFrank Lahm <franklahm@googlemail.com>
Wed, 20 Oct 2010 12:19:27 +0000 (14:19 +0200)
1  2 
NEWS
VERSION
etc/afpd/acls.c
etc/afpd/afp_options.c
etc/afpd/filedir.c
etc/afpd/unix.c
etc/cnid_dbd/usockfd.c
include/atalk/acl.h
libatalk/acl/Makefile.am
libatalk/vfs/acl.c
libatalk/vfs/unix.c

diff --cc NEWS
index 7307e1c9f15614b74fdb6bad679e0a22fc11c458,d00d61dbe67f30d7b16f9ac286f982c7b5a3931d..4dfbf1464ac844835b21d5a9db0a417cc1f415bd
--- 1/NEWS
--- 2/NEWS
+++ b/NEWS
@@@ -1,21 -1,9 +1,27 @@@
 +Changes in 2.2
 +==============
 +
 +* UPD: AppleTalk ist disabled by default at configuration time. If needed
 +       use configure switch --enable-ddp.
 +* NEW: ad utility: ad cp
 +* NEW: ad utility: ad rm
 +* NEW: ad utility: ad mv
 +* NEW: afpd: dynamic directoy and CNID cache
 +* NEW: afpd: POSIX 1e ACL support
 +* NEW: afpd: automagic Zeroconf registration with avahi, registering both
 +       the service _afpovertcp._tcp and TimeMachine volumes with _adisk._tcp.
 +* FIX: afpd: Solaris 10 compatibilty fix: don't use SO_SNDTIMEO/SO_RCVTIMEO,
 +       use non-blocking IO and select instead.
 +* FIX: cnid_dbd: Solaris 10 compatibilty fix: don't use SO_SNDTIMEO/SO_RCVTIMEO,
 +       use non-blocking IO and select instead.
 +* REM: afile/achfile/apple_cm/apple_mv/apple_rm: use ad
 +
+ Changes in 2.1.5
+ ================
+ * UPD: afpd: support newlines in -loginmesg with \n escaping syntax
+ * UPD: afpd: support for changed chmod semantics on ZFS with ACLs
+        in onnv145+
  Changes in 2.1.4
  ================
  
diff --cc VERSION
index ed9e076d0649773651d68edf1ecf66b897704894,81f81f5662a1c607ab3182cd20fdb7e8859a8ee7..5977a0fdbd00815c1c0135deeb70d81140a67ca1
+++ b/VERSION
@@@ -1,1 -1,1 +1,1 @@@
- 2.2dev
 -2.1.5dev
++2.2dev
diff --cc etc/afpd/acls.c
index ca11a671ed7003eaee60456c1dbd2a482b092667,e7ee37ff3f98e5b4d3c1bddbb3b26ecd9b294894..d121e4d83ae95b9c24526d1508eba156a5586295
@@@ -89,128 -76,8 +89,16 @@@ static int check_group(char *name, uid_
      }
  
      return -1;
 +EC_CLEANUP:
 +    EC_EXIT;
  }
  
- /*
-   Remove any trivial ACE "in-place". Returns no of non-trivial ACEs
- */
- static int strip_trivial_aces(ace_t **saces, int sacecount)
- {
-     EC_INIT;
-     int i,j;
-     int nontrivaces = 0;
-     ace_t *aces = *saces;
-     ace_t *new_aces;
-     /* Count non-trivial ACEs */
-     for (i=0; i < sacecount; ) {
-         if ( ! (aces[i].a_flags & (ACE_OWNER | ACE_GROUP | ACE_EVERYONE)))
-             nontrivaces++;
-         i++;
-     }
-     /* malloc buffer for new ACL */
-     EC_NULL_LOG(new_aces = malloc(nontrivaces * sizeof(ace_t)));
-     /* Copy non-trivial ACEs */
-     for (i=0, j=0; i < sacecount; ) {
-         if ( ! (aces[i].a_flags & (ACE_OWNER | ACE_GROUP | ACE_EVERYONE))) {
-             memcpy(&new_aces[j], &aces[i], sizeof(ace_t));
-             j++;
-         }
-         i++;
-     }
-     free(aces);
-     *saces = new_aces;
-     LOG(log_debug7, logtype_afpd, "strip_trivial_aces: non-trivial ACEs: %d", nontrivaces);
-     return nontrivaces;
- EC_CLEANUP:
-     EC_EXIT;
- }
- /*
-   Remove non-trivial ACEs "in-place". Returns no of trivial ACEs.
- */
- static int strip_nontrivial_aces(ace_t **saces, int sacecount)
- {
-     EC_INIT;
-     int i,j;
-     int trivaces = 0;
-     ace_t *aces = *saces;
-     ace_t *new_aces;
-     /* Count trivial ACEs */
-     for (i=0; i < sacecount; ) {
-         if ((aces[i].a_flags & (ACE_OWNER | ACE_GROUP | ACE_EVERYONE)))
-             trivaces++;
-         i++;
-     }
-     /* malloc buffer for new ACL */
-     EC_NULL_LOG(new_aces = malloc(trivaces * sizeof(ace_t)));
-     /* Copy trivial ACEs */
-     for (i=0, j=0; i < sacecount; ) {
-         if ((aces[i].a_flags & (ACE_OWNER | ACE_GROUP | ACE_EVERYONE))) {
-             memcpy(&new_aces[j], &aces[i], sizeof(ace_t));
-             j++;
-         }
-         i++;
-     }
-     /* Free old ACEs */
-     free(aces);
-     *saces = new_aces;
-     LOG(log_debug7, logtype_afpd, "strip_nontrivial_aces: trivial ACEs: %d", trivaces);
-     return trivaces;
- EC_CLEANUP:
-     EC_EXIT;
- }
- /*
-   Concatenate ACEs
- */
- static ace_t *concat_aces(ace_t *aces1, int ace1count, ace_t *aces2, int ace2count)
- {
-     EC_INIT;
-     ace_t *new_aces = NULL;
-     int i, j;
-     /* malloc buffer for new ACL */
-     EC_NULL_LOG(new_aces = malloc((ace1count + ace2count) * sizeof(ace_t)));
-     /* Copy ACEs from buf1 */
-     for (i=0; i < ace1count; ) {
-         memcpy(&new_aces[i], &aces1[i], sizeof(ace_t));
-         i++;
-     }
-     j = i;
-     /* Copy ACEs from buf2 */
-     for (i=0; i < ace2count; ) {
-         memcpy(&new_aces[j], &aces2[i], sizeof(ace_t));
-         i++;
-         j++;
-     }
-     return new_aces;
- EC_CLEANUP:
-     if (new_aces)
-         free(new_aces);
-     return NULL;
- }
 +/********************************************************
 + * Solaris funcs
 + ********************************************************/
 +
 +#ifdef HAVE_SOLARIS_ACLS
 +
  /*
    Maps ACE array from Solaris to Darwin. Darwin ACEs are stored in network byte order.
    Return numer of mapped ACEs or -1 on error.
Simple merge
index 46c0bf309fbc4bb6152c8ce26e169c64231b007c,8b47cba7b51358a5ac1585c9dfe471071cca3754..b537001309d6b69c3ab69f84cb16e1f52d29e155
@@@ -39,11 -37,9 +37,12 @@@ char *strchr (), *strrchr ()
  #include <atalk/cnid.h>
  #include <atalk/logger.h>
  #include <atalk/unix.h>
 +#include <atalk/bstrlib.h>
 +#include <atalk/bstradd.h>
+ #include <atalk/acl.h>
  
  #include "directory.h"
 +#include "dircache.h"
  #include "desktop.h"
  #include "volume.h"
  #include "fork.h"
diff --cc etc/afpd/unix.c
Simple merge
Simple merge
index 142ec583c0ecc0baad84115f8c456279012b2dd4,c49ed0f49afdac9ace06dfb44c0f09f8d59b4a6d..95e3276c69e28465c7c98a6654b42c38bce138d3
  #include "config.h"
  #endif /* HAVE_CONFIG_H */
  
 -#ifdef HAVE_NFSv4_ACLS
 +#ifdef HAVE_SOLARIS_ACLS
  #include <sys/acl.h>
 -#endif  /* HAVE_NFSv4_ACLS */
 +#endif  /* HAVE_SOLARIS_ACLS */
  
 -/* Solaris NFSv4 ACL stuff */
 -#ifdef HAVE_NFSv4_ACLS
 +#ifdef HAVE_POSIX_ACLS
 +#include <sys/types.h>
 +#include <sys/acl.h>
 +#endif /* HAVE_POSIX_ACLS */
  
 -
 +#ifdef HAVE_SOLARIS_ACLS
+ #define chmod nfsv4_chmod
  extern int get_nfsv4_acl(const char *name, ace_t **retAces);
 -#endif /* HAVE_NFSv4_ACLS */
+ extern int remove_acl(const char *name);
+ extern int strip_trivial_aces(ace_t **saces, int sacecount);
+ extern int strip_nontrivial_aces(ace_t **saces, int sacecount);
+ extern ace_t *concat_aces(ace_t *aces1, int ace1count, ace_t *aces2, int ace2count);
+ extern int nfsv4_chmod(char *name, mode_t mode);
 +#endif /* HAVE_SOLARIS_ACLS */
  
 +extern int remove_acl_vfs(const char *name);
  
  #endif  /* ATALK_ACL_H */
index d9c81990a88026bdcbe540e0ed2dbad7f7ba2744,fe9f63011ea808e1fec7187200d5a2c37d1fad6a..43db9dfc9897fc8488d1a70a99a0b2aa686f3a39
@@@ -8,7 -9,10 +8,9 @@@ libacl_la_SOURCES = 
        ldap.c          \
        uuid.c          \
        cache.c         \
-       ldap_config.c
+       ldap_config.c \
+       unix.c
  libacl_la_LDFLAGS = -lldap
 -
  endif
  
index 0c7879746fc038bb127b67214c80fc6d80aaf044,d9c7d1f6e5132a09bdea970d886183ef39f5b0af..1396ce34c809d98e5083f1b96ba16fe49180f266
  #include <atalk/afp.h>
  #include <atalk/util.h>
  #include <atalk/logger.h>
 +#include <atalk/errchk.h>
 +#include <atalk/acl.h>
 +
 +#ifdef HAVE_SOLARIS_ACLS
  
- /* Get ACL. Allocates storage as needed. Caller must free.
-  * Returns no of ACEs or -1 on error.  */
- int get_nfsv4_acl(const char *name, ace_t **retAces)
- {
-     int ace_count = -1;
-     ace_t *aces;
-     struct stat st;
-     *retAces = NULL;
-     /* Only call acl() for regular files and directories, otherwise just return 0 */
-     if (lstat(name, &st) != 0)
-         return -1;
-     if ( ! (S_ISREG(st.st_mode) || S_ISDIR(st.st_mode)))
-         return 0;
-     if ((ace_count = acl(name, ACE_GETACLCNT, 0, NULL)) == 0)
-         return 0;
-     if (ace_count == -1) {
-         LOG(log_error, logtype_afpd, "get_nfsv4_acl: acl('%s/%s', ACE_GETACLCNT): ace_count %i, error: %s",
-             getcwdpath(), name, ace_count, strerror(errno));
-         return -1;
-     }
-     aces = malloc(ace_count * sizeof(ace_t));
-     if (aces == NULL) {
-         LOG(log_error, logtype_afpd, "get_nfsv4_acl: malloc error");
-         return -1;
-     }
-     if ( (acl(name, ACE_GETACL, ace_count, aces)) == -1 ) {
-         LOG(log_error, logtype_afpd, "get_nfsv4_acl: acl(ACE_GETACL) error");
-         free(aces);
-         return -1;
-     }
-     LOG(log_debug9, logtype_afpd, "get_nfsv4_acl: file: %s -> No. of ACEs: %d", name, ace_count);
-     *retAces = aces;
-     return ace_count;
- }
  /* Removes all non-trivial ACLs from object. Returns full AFPERR code. */
 -int remove_acl(const char *name)
 +int remove_acl_vfs(const char *name)
  {
      int ret,i, ace_count, trivial_aces, new_aces_count;
      ace_t *old_aces = NULL;
Simple merge