pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/net/netatalk3/patches Add new patches



details:   https://anonhg.NetBSD.org/pkgsrc/rev/bb37015440ab
branches:  trunk
changeset: 354686:bb37015440ab
user:      christos <christos%pkgsrc.org@localhost>
date:      Mon Nov 07 00:41:57 2016 +0000

description:
Add new patches

diffstat:

 net/netatalk3/patches/patch-bin_ad_ad__cp.c                       |   13 +
 net/netatalk3/patches/patch-bin_afppasswd_afppasswd.c             |   40 ++
 net/netatalk3/patches/patch-config.h.in                           |   25 +
 net/netatalk3/patches/patch-config_Makefile.in                    |   34 ++
 net/netatalk3/patches/patch-config_pam_Makefile.in                |   33 ++
 net/netatalk3/patches/patch-distrib_initscripts_Makefile.in       |   22 +
 net/netatalk3/patches/patch-distrib_initscripts_netatalk.xml.tmpl |   15 +
 net/netatalk3/patches/patch-etc_afpd_quota.c                      |  161 ++++++++++
 net/netatalk3/patches/patch-etc_cnid__dbd_cnid__metad.c           |   13 +
 net/netatalk3/patches/patch-etc_uams_uams__randnum.c              |  131 ++++++++
 net/netatalk3/patches/patch-include_atalk_acl.h                   |   12 +
 net/netatalk3/patches/patch-include_atalk_util.h                  |   13 +
 net/netatalk3/patches/patch-libatalk_util_getiface.c              |   45 ++
 net/netatalk3/patches/patch-macros_quota-check.m4                 |   21 +
 14 files changed, 578 insertions(+), 0 deletions(-)

diffs (truncated from 634 to 300 lines):

diff -r 840588db1ebe -r bb37015440ab net/netatalk3/patches/patch-bin_ad_ad__cp.c
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/net/netatalk3/patches/patch-bin_ad_ad__cp.c       Mon Nov 07 00:41:57 2016 +0000
@@ -0,0 +1,13 @@
+$NetBSD: patch-bin_ad_ad__cp.c,v 1.1 2016/11/07 00:41:57 christos Exp $
+
+--- bin/ad/ad_cp.c.orig        2014-01-27 07:37:46.000000000 +0000
++++ bin/ad/ad_cp.c
+@@ -821,7 +821,7 @@ static int setfile(const struct stat *fs
+     islink = !fdval && S_ISLNK(fs->st_mode);
+     mode = fs->st_mode & (S_ISUID | S_ISGID | S_ISVTX | S_IRWXU | S_IRWXG | S_IRWXO);
+ 
+-#if defined(__FreeBSD__)
++#if defined(__FreeBSD__) || defined(__NetBSD__)
+     TIMESPEC_TO_TIMEVAL(&tv[0], &fs->st_atimespec);
+     TIMESPEC_TO_TIMEVAL(&tv[1], &fs->st_mtimespec);
+ #else
diff -r 840588db1ebe -r bb37015440ab net/netatalk3/patches/patch-bin_afppasswd_afppasswd.c
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/net/netatalk3/patches/patch-bin_afppasswd_afppasswd.c     Mon Nov 07 00:41:57 2016 +0000
@@ -0,0 +1,40 @@
+$NetBSD: patch-bin_afppasswd_afppasswd.c,v 1.1 2016/11/07 00:41:57 christos Exp $
+
+--- bin/afppasswd/afppasswd.c.orig     2013-04-09 12:56:17.000000000 +0000
++++ bin/afppasswd/afppasswd.c
+@@ -35,7 +35,7 @@
+ #include <pwd.h>
+ #include <arpa/inet.h>
+ 
+-#include <des.h>
++#include <openssl/des.h>
+ 
+ #ifdef USE_CRACKLIB
+ #include <crack.h>
+@@ -65,7 +65,7 @@ static char buf[MAXPATHLEN + 1];
+ static void convert_passwd(char *buf, char *newpwd, const int keyfd)
+ {
+   uint8_t key[HEXPASSWDLEN];
+-  Key_schedule schedule;
++  DES_key_schedule schedule;
+   unsigned int i, j;
+ 
+   if (!newpwd) {
+@@ -84,14 +84,14 @@ static void convert_passwd(char *buf, ch
+       key[j] = (unhex(key[i]) << 4) | unhex(key[i + 1]);
+     if (j <= DES_KEY_SZ)
+       memset(key + j, 0, sizeof(key) - j);
+-    key_sched((C_Block *) key, schedule);
++    DES_key_sched((DES_cblock *) key, &schedule);
+     memset(key, 0, sizeof(key));   
+     if (newpwd) {
+-      ecb_encrypt((C_Block *) newpwd, (C_Block *) newpwd, schedule,
++      DES_ecb_encrypt((DES_cblock *) newpwd, (DES_cblock *) newpwd, &schedule,
+                   DES_ENCRYPT);
+     } else {
+       /* decrypt the password */
+-      ecb_encrypt((C_Block *) buf, (C_Block *) buf, schedule, DES_DECRYPT);
++      DES_ecb_encrypt((DES_cblock *) buf, (DES_cblock *) buf, &schedule, DES_DECRYPT);
+     }
+     memset(&schedule, 0, sizeof(schedule));      
+   }
diff -r 840588db1ebe -r bb37015440ab net/netatalk3/patches/patch-config.h.in
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/net/netatalk3/patches/patch-config.h.in   Mon Nov 07 00:41:57 2016 +0000
@@ -0,0 +1,25 @@
+$NetBSD: patch-config.h.in,v 1.1 2016/11/07 00:41:57 christos Exp $
+
+--- config.h.in.orig   2014-08-29 06:32:48.000000000 -0400
++++ config.h.in        2016-11-06 09:19:31.553880005 -0500
+@@ -259,8 +259,8 @@
+ /* Define to 1 if you have the `getproplist' function. */
+ #undef HAVE_GETPROPLIST
+ 
+-/* Define to 1 if you have the `getusershell' function. */
+-#undef HAVE_GETUSERSHELL
++/* Define to 1 if you have the `getifaddrs' function. */
++#undef HAVE_GETIFADDRS
+ 
+ /* Define to 1 if you have the `getxattr' function. */
+ #undef HAVE_GETXATTR
+@@ -439,6 +439,9 @@
+ /* Define to 1 if you have the `renameat' function. */
+ #undef HAVE_RENAMEAT
+ 
++/* Define to 1 if you have the NetBSD quota library */
++#undef HAVE_LIBQUOTA
++
+ /* Define to 1 if you have the <rpcsvc/rquota.h> header file. */
+ #undef HAVE_RPCSVC_RQUOTA_H
+ 
diff -r 840588db1ebe -r bb37015440ab net/netatalk3/patches/patch-config_Makefile.in
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/net/netatalk3/patches/patch-config_Makefile.in    Mon Nov 07 00:41:57 2016 +0000
@@ -0,0 +1,34 @@
+$NetBSD: patch-config_Makefile.in,v 1.1 2016/11/07 00:41:57 christos Exp $
+
+--- config/Makefile.in.orig    2014-08-29 06:33:35.000000000 -0400
++++ config/Makefile.in 2016-11-06 09:20:59.084990262 -0500
+@@ -798,20 +798,22 @@
+       rm -f $(DESTDIR)$(localstatedir)/netatalk/CNID/README
+ @USE_DEBIAN_SYSV_TRUE@        rm -f $(DESTDIR)/etc/default/netatalk
+ 
++egconfdir = @prefix@/share/examples/netatalk
++
+ install-config-files: $(CONFFILES) $(GENFILES)
+-      $(mkinstalldirs) $(DESTDIR)$(pkgconfdir)
++      $(mkinstalldirs) $(DESTDIR)$(egconfdir)
+       @for f in $(CONFFILES) ; do \
+-              if test "x$(OVERWRITE_CONFIG)" = "xyes" -o ! -f $(DESTDIR)$(pkgconfdir)/$$f; then \
+-                      echo "$(INSTALL_DATA) $$f $(DESTDIR)$(pkgconfdir)"; \
+-                      $(INSTALL_DATA) $(srcdir)/$$f $(DESTDIR)$(pkgconfdir); \
++              if test "x$(OVERWRITE_CONFIG)" = "xyes" -o ! -f $(DESTDIR)$(egconfdir)/$$f; then \
++                      echo "$(INSTALL_DATA) $$f $(DESTDIR)$(egconfdir)"; \
++                      $(INSTALL_DATA) $(srcdir)/$$f $(DESTDIR)$(egconfdir); \
+               else \
+                       echo "not overwriting $$f"; \
+               fi; \
+       done
+       @for f in $(GENFILES); do \
+-              if test "x$(OVERWRITE_CONFIG)" = "xyes" -o ! -f $(DESTDIR)$(pkgconfdir)/$$f; then \
+-                      echo "$(INSTALL_DATA) $$f $(DESTDIR)$(pkgconfdir)"; \
+-                      $(INSTALL_DATA) $$f $(DESTDIR)$(pkgconfdir); \
++              if test "x$(OVERWRITE_CONFIG)" = "xyes" -o ! -f $(DESTDIR)$(egconfdir)/$$f; then \
++                      echo "$(INSTALL_DATA) $$f $(DESTDIR)$(egconfdir)"; \
++                      $(INSTALL_DATA) $$f $(DESTDIR)$(egconfdir); \
+               else \
+                       echo "not overwriting $$f"; \
+               fi; \
diff -r 840588db1ebe -r bb37015440ab net/netatalk3/patches/patch-config_pam_Makefile.in
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/net/netatalk3/patches/patch-config_pam_Makefile.in        Mon Nov 07 00:41:57 2016 +0000
@@ -0,0 +1,33 @@
+$NetBSD: patch-config_pam_Makefile.in,v 1.1 2016/11/07 00:41:57 christos Exp $
+
+Do not mess with the base system, we install the pam config to 
+examples/netatalk instead.
+
+--- config/pam/Makefile.in.orig        2014-08-29 06:33:35.000000000 -0400
++++ config/pam/Makefile.in     2016-11-06 09:23:14.358979157 -0500
+@@ -397,25 +397,9 @@
+       -rm -rf .libs _libs
+ install-pamDATA: $(pam_DATA)
+       @$(NORMAL_INSTALL)
+-      @list='$(pam_DATA)'; test -n "$(pamdir)" || list=; \
+-      if test -n "$$list"; then \
+-        echo " $(MKDIR_P) '$(DESTDIR)$(pamdir)'"; \
+-        $(MKDIR_P) "$(DESTDIR)$(pamdir)" || exit 1; \
+-      fi; \
+-      for p in $$list; do \
+-        if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+-        echo "$$d$$p"; \
+-      done | $(am__base_list) | \
+-      while read files; do \
+-        echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(pamdir)'"; \
+-        $(INSTALL_DATA) $$files "$(DESTDIR)$(pamdir)" || exit $$?; \
+-      done
+ 
+ uninstall-pamDATA:
+       @$(NORMAL_UNINSTALL)
+-      @list='$(pam_DATA)'; test -n "$(pamdir)" || list=; \
+-      files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
+-      dir='$(DESTDIR)$(pamdir)'; $(am__uninstall_files_from_dir)
+ tags: TAGS
+ TAGS:
+ 
diff -r 840588db1ebe -r bb37015440ab net/netatalk3/patches/patch-distrib_initscripts_Makefile.in
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/net/netatalk3/patches/patch-distrib_initscripts_Makefile.in       Mon Nov 07 00:41:57 2016 +0000
@@ -0,0 +1,22 @@
+$NetBSD: patch-distrib_initscripts_Makefile.in,v 1.1 2016/11/07 00:41:57 christos Exp $
+
+--- distrib/initscripts/Makefile.in.orig       2014-08-29 06:33:35.000000000 -0400
++++ distrib/initscripts/Makefile.in    2016-11-06 09:29:53.150749307 -0500
+@@ -620,7 +620,7 @@
+ 
+ info-am:
+ 
+-install-data-am: install-serviceDATA install-sysvSCRIPTS
++install-data-am: install-serviceDATA
+       @$(NORMAL_INSTALL)
+       $(MAKE) $(AM_MAKEFLAGS) install-data-hook
+ install-dvi: install-dvi-am
+@@ -747,7 +747,7 @@
+ @USE_SUSE_SYSV_TRUE@  rm -f $(DESTDIR)$(sysvdir)/$(sysv_SCRIPTS)
+ 
+ @USE_NETBSD_TRUE@netatalk: rc.netbsd
+-@USE_NETBSD_TRUE@     cp -f $< $@
++@USE_NETBSD_TRUE@     cp -f $? $@
+ @USE_NETBSD_TRUE@     chmod a+x $@
+ 
+ @USE_NETBSD_TRUE@install-data-hook:
diff -r 840588db1ebe -r bb37015440ab net/netatalk3/patches/patch-distrib_initscripts_netatalk.xml.tmpl
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/net/netatalk3/patches/patch-distrib_initscripts_netatalk.xml.tmpl Mon Nov 07 00:41:57 2016 +0000
@@ -0,0 +1,15 @@
+$NetBSD: patch-distrib_initscripts_netatalk.xml.tmpl,v 1.1 2016/11/07 00:41:57 christos Exp $
+
+pkgsrc-installed SMF manifests default to /pkgsrc FMRI
+
+--- distrib/initscripts/netatalk.xml.tmpl.orig 2013-04-09 12:56:17.000000000 +0000
++++ distrib/initscripts/netatalk.xml.tmpl
+@@ -2,7 +2,7 @@
+ <!DOCTYPE service_bundle SYSTEM "/usr/share/lib/xml/dtd/service_bundle.dtd.1">
+ <service_bundle type="manifest" name="netatalk">
+ 
+-    <service name="network/netatalk" type="service" version="1">
++    <service name="pkgsrc/netatalk" type="service" version="1">
+ 
+         <create_default_instance enabled="false"/>
+         
diff -r 840588db1ebe -r bb37015440ab net/netatalk3/patches/patch-etc_afpd_quota.c
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/net/netatalk3/patches/patch-etc_afpd_quota.c      Mon Nov 07 00:41:57 2016 +0000
@@ -0,0 +1,161 @@
+$NetBSD: patch-etc_afpd_quota.c,v 1.1 2016/11/07 00:41:57 christos Exp $
+
+--- etc/afpd/quota.c.orig      2013-04-09 12:56:18.000000000 +0000
++++ etc/afpd/quota.c
+@@ -36,10 +36,13 @@
+ 
+ static int
+ getfreespace(const AFPObj *obj, struct vol *vol, VolSpace *bfree, VolSpace *btotal,
+-           uid_t uid, const char *classq)
++           id_t id, int idtype)
+ {
+-      int retq;
+-      struct ufs_quota_entry ufsq[QUOTA_NLIMITS];
++      uid_t prevuid;
++      const char *msg;
++      struct quotahandle *qh;
++      struct quotakey qk;
++      struct quotaval qv;
+       time_t now;
+ 
+       if (time(&now) == -1) {
+@@ -48,64 +51,102 @@ getfreespace(const AFPObj *obj, struct v
+               return -1;
+       }
+ 
++      prevuid = geteuid();
++      if (prevuid == -1) {
++              LOG(log_info, logtype_afpd, "geteuid(): %s",
++                  strerror(errno));
++              return -1;
++      }
++
+     become_root();
+ 
+-      if ((retq = getfsquota(obj, vol, ufsq, uid, classq)) < 0) {
+-              LOG(log_info, logtype_afpd, "getfsquota(%s, %s): %s",
+-                  vol->v_path, classq, strerror(errno));
+-      }
+-
+-    unbecome_root();
+-
+-      if (retq < 1)
+-              return retq;
+-
+-      switch(QL_STATUS(quota_check_limit(ufsq[QUOTA_LIMIT_BLOCK].ufsqe_cur, 1,
+-          ufsq[QUOTA_LIMIT_BLOCK].ufsqe_softlimit,
+-          ufsq[QUOTA_LIMIT_BLOCK].ufsqe_hardlimit,
+-          ufsq[QUOTA_LIMIT_BLOCK].ufsqe_time, now))) {
+-      case QL_S_DENY_HARD:
+-      case QL_S_DENY_GRACE:
++      /*
++       * In a tidier world we might keep the quotahandle open for longer...
++       */
++      qh = quota_open(vol->v_path);
++      if (qh == NULL) {
++              if (errno == EOPNOTSUPP || errno == ENXIO) {
++                      /* no quotas on this volume */
++                      seteuid( prevuid );
++                      return 0;
++              }
++         
++              LOG(log_info, logtype_afpd, "quota_open(%s): %s", vol->v_path,
++                  strerror(errno));
++              seteuid( prevuid );
++              return -1;
++      }
++      qk.qk_idtype = idtype;
++      qk.qk_id = id;
++      qk.qk_objtype = QUOTA_OBJTYPE_BLOCKS;
++      if (quota_get(qh, &qk, &qv) < 0) {
++              if (errno == ENOENT) {
++                      /* no quotas for this id */
++                      quota_close(qh);
++                      seteuid( prevuid );
++                      return 0;
++              }
++              msg = strerror(errno);
++              LOG(log_info, logtype_afpd, "quota_get(%s, %s): %s",
++                  vol->v_path, quota_idtype_getname(qh, idtype), msg);
++              quota_close(qh);
++              seteuid( prevuid );
++              return -1;
++      }
++
++      quota_close(qh);
++



Home | Main Index | Thread Index | Old Index