diff options
author | christos <christos@pkgsrc.org> | 2016-11-07 00:41:57 +0000 |
---|---|---|
committer | christos <christos@pkgsrc.org> | 2016-11-07 00:41:57 +0000 |
commit | 3262e136c7a6d81e9608d71db2022cb73ce044a7 (patch) | |
tree | 6160f3a59e439d9d78a85738a9ece53ff5e0d777 /net/netatalk3 | |
parent | 432cc5c1e615bd1b3c44a5ad2ce349a2712af267 (diff) | |
download | pkgsrc-3262e136c7a6d81e9608d71db2022cb73ce044a7.tar.gz |
Add new patches
Diffstat (limited to 'net/netatalk3')
-rw-r--r-- | net/netatalk3/patches/patch-bin_ad_ad__cp.c | 13 | ||||
-rw-r--r-- | net/netatalk3/patches/patch-bin_afppasswd_afppasswd.c | 40 | ||||
-rw-r--r-- | net/netatalk3/patches/patch-config.h.in | 25 | ||||
-rw-r--r-- | net/netatalk3/patches/patch-config_Makefile.in | 34 | ||||
-rw-r--r-- | net/netatalk3/patches/patch-config_pam_Makefile.in | 33 | ||||
-rw-r--r-- | net/netatalk3/patches/patch-distrib_initscripts_Makefile.in | 22 | ||||
-rw-r--r-- | net/netatalk3/patches/patch-distrib_initscripts_netatalk.xml.tmpl | 15 | ||||
-rw-r--r-- | net/netatalk3/patches/patch-etc_afpd_quota.c | 161 | ||||
-rw-r--r-- | net/netatalk3/patches/patch-etc_cnid__dbd_cnid__metad.c | 13 | ||||
-rw-r--r-- | net/netatalk3/patches/patch-etc_uams_uams__randnum.c | 131 | ||||
-rw-r--r-- | net/netatalk3/patches/patch-include_atalk_acl.h | 12 | ||||
-rw-r--r-- | net/netatalk3/patches/patch-include_atalk_util.h | 13 | ||||
-rw-r--r-- | net/netatalk3/patches/patch-libatalk_util_getiface.c | 45 | ||||
-rw-r--r-- | net/netatalk3/patches/patch-macros_quota-check.m4 | 21 |
14 files changed, 578 insertions, 0 deletions
diff --git a/net/netatalk3/patches/patch-bin_ad_ad__cp.c b/net/netatalk3/patches/patch-bin_ad_ad__cp.c new file mode 100644 index 00000000000..e667416ddc9 --- /dev/null +++ b/net/netatalk3/patches/patch-bin_ad_ad__cp.c @@ -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 --git a/net/netatalk3/patches/patch-bin_afppasswd_afppasswd.c b/net/netatalk3/patches/patch-bin_afppasswd_afppasswd.c new file mode 100644 index 00000000000..5dec432f943 --- /dev/null +++ b/net/netatalk3/patches/patch-bin_afppasswd_afppasswd.c @@ -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 --git a/net/netatalk3/patches/patch-config.h.in b/net/netatalk3/patches/patch-config.h.in new file mode 100644 index 00000000000..dec19e80d38 --- /dev/null +++ b/net/netatalk3/patches/patch-config.h.in @@ -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 --git a/net/netatalk3/patches/patch-config_Makefile.in b/net/netatalk3/patches/patch-config_Makefile.in new file mode 100644 index 00000000000..5953377bc8c --- /dev/null +++ b/net/netatalk3/patches/patch-config_Makefile.in @@ -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 --git a/net/netatalk3/patches/patch-config_pam_Makefile.in b/net/netatalk3/patches/patch-config_pam_Makefile.in new file mode 100644 index 00000000000..43bacd1061c --- /dev/null +++ b/net/netatalk3/patches/patch-config_pam_Makefile.in @@ -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 --git a/net/netatalk3/patches/patch-distrib_initscripts_Makefile.in b/net/netatalk3/patches/patch-distrib_initscripts_Makefile.in new file mode 100644 index 00000000000..e1707030c5e --- /dev/null +++ b/net/netatalk3/patches/patch-distrib_initscripts_Makefile.in @@ -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 --git a/net/netatalk3/patches/patch-distrib_initscripts_netatalk.xml.tmpl b/net/netatalk3/patches/patch-distrib_initscripts_netatalk.xml.tmpl new file mode 100644 index 00000000000..f2dc42fdc3b --- /dev/null +++ b/net/netatalk3/patches/patch-distrib_initscripts_netatalk.xml.tmpl @@ -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 --git a/net/netatalk3/patches/patch-etc_afpd_quota.c b/net/netatalk3/patches/patch-etc_afpd_quota.c new file mode 100644 index 00000000000..8fd3143e828 --- /dev/null +++ b/net/netatalk3/patches/patch-etc_afpd_quota.c @@ -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); ++ ++ seteuid( prevuid ); ++ ++ if (qv.qv_usage >= qv.qv_hardlimit || ++ (qv.qv_usage >= qv.qv_softlimit && now > qv.qv_expiretime)) { ++ + *bfree = 0; +- *btotal = dbtob(ufsq[QUOTA_LIMIT_BLOCK].ufsqe_cur); +- break; +- default: +- *bfree = dbtob(ufsq[QUOTA_LIMIT_BLOCK].ufsqe_hardlimit - +- ufsq[QUOTA_LIMIT_BLOCK].ufsqe_cur); +- *btotal = dbtob(ufsq[QUOTA_LIMIT_BLOCK].ufsqe_hardlimit); +- break; ++ *btotal = dbtob(qv.qv_usage); ++ } ++ else { ++ *bfree = dbtob(qv.qv_hardlimit - qv.qv_usage); ++ *btotal = dbtob(qv.qv_hardlimit); ++ } ++ + } + return 1; + } + + int uquota_getvolspace(const AFPObj *obj, struct vol *vol, VolSpace *bfree, VolSpace *btotal, const u_int32_t bsize) + { +- int uretq, gretq; ++ int uret, gret; + VolSpace ubfree, ubtotal; + VolSpace gbfree, gbtotal; ++ uret = getfreespace(vol, &ubfree, &ubtotal, ++ uuid, QUOTA_IDTYPE_USER); ++ if (uret == 1) { ++ LOG(log_info, logtype_afpd, "quota_get(%s, user): %d %d", ++ vol->v_path, (int)ubfree, (int)ubtotal); ++ } + +- uretq = getfreespace(obj, vol, &ubfree, &ubtotal, +- uuid, QUOTADICT_CLASS_USER); +- LOG(log_info, logtype_afpd, "getfsquota(%s): %d %d", +- vol->v_path, (int)ubfree, (int)ubtotal); + if (obj->ngroups >= 1) { +- gretq = getfreespace(vol, &ubfree, &ubtotal, +- obj->groups[0], QUOTADICT_CLASS_GROUP); ++ gret = getfreespace(vol, &gbfree, &gbtotal, ++ groups[0], QUOTA_IDTYPE_GROUP); ++ if (gret == 1) { ++ LOG(log_info, logtype_afpd, "quota_get(%s, group): %d %d", ++ vol->v_path, (int)gbfree, (int)gbtotal); ++ } + } else +- gretq = -1; +- if (uretq < 1 && gretq < 1) { /* no quota for this fs */ ++ gret = 0; ++ if (uret < 1 && gret < 1) { /* no quota for this fs */ + return AFPERR_PARAM; + } +- if (uretq < 1) { +- /* use group quotas */ ++ if (uret < 1) { ++ /* no user quotas, but group quotas; use them */ + *bfree = gbfree; + *btotal = gbtotal; +- } else if (gretq < 1) { +- /* use user quotas */ ++ } else if (gret < 1) { ++ /* no group quotas, but user quotas; use them */ + *bfree = ubfree; + *btotal = ubtotal; + } else { +- /* return smallest remaining space of user and group */ ++ /* both; return smallest remaining space of user and group */ + if (ubfree < gbfree) { + *bfree = ubfree; + *btotal = ubtotal; diff --git a/net/netatalk3/patches/patch-etc_cnid__dbd_cnid__metad.c b/net/netatalk3/patches/patch-etc_cnid__dbd_cnid__metad.c new file mode 100644 index 00000000000..7367ec90505 --- /dev/null +++ b/net/netatalk3/patches/patch-etc_cnid__dbd_cnid__metad.c @@ -0,0 +1,13 @@ +$NetBSD: patch-etc_cnid__dbd_cnid__metad.c,v 1.1 2016/11/07 00:41:58 christos Exp $ + +--- etc/cnid_dbd/cnid_metad.c.orig 2014-05-22 01:33:45.000000000 -0400 ++++ etc/cnid_dbd/cnid_metad.c 2016-11-06 09:31:53.239252178 -0500 +@@ -534,7 +534,7 @@ + while (1) { + rqstfd = usockfd_check(srvfd, &set); + /* Collect zombie processes and log what happened to them */ +- if (sigchild) while ((pid = waitpid(-1, &status, WNOHANG)) > 0) { ++ while ((pid = waitpid(-1, &status, WNOHANG)) > 0) { + for (i = 0; i < maxvol; i++) { + if (srv[i].pid == pid) { + srv[i].pid = 0; diff --git a/net/netatalk3/patches/patch-etc_uams_uams__randnum.c b/net/netatalk3/patches/patch-etc_uams_uams__randnum.c new file mode 100644 index 00000000000..4ca38cea64c --- /dev/null +++ b/net/netatalk3/patches/patch-etc_uams_uams__randnum.c @@ -0,0 +1,131 @@ +$NetBSD: patch-etc_uams_uams__randnum.c,v 1.1 2016/11/07 00:41:58 christos Exp $ + +--- etc/uams/uams_randnum.c.orig 2014-01-04 16:42:35.000000000 +0100 ++++ etc/uams/uams_randnum.c 2015-08-10 16:38:08.000000000 +0200 +@@ -24,18 +24,18 @@ + #include <atalk/afp.h> + #include <atalk/uam.h> + + +-#include <des.h> ++#include <openssl/des.h> + + #ifdef USE_CRACKLIB + #include <crack.h> + #endif /* USE_CRACKLIB */ + + #define PASSWDLEN 8 + +-static C_Block seskey; +-static Key_schedule seskeysched; ++static DES_cblock seskey; ++static DES_key_schedule seskeysched; + static struct passwd *randpwd; + static uint8_t randbuf[8]; + + /* hash to a 16-bit number. this will generate completely harmless +@@ -123,9 +123,9 @@ + const int set) + { + uint8_t key[DES_KEY_SZ*2]; + char buf[MAXPATHLEN + 1], *p; +- Key_schedule schedule; ++ DES_key_schedule schedule; + FILE *fp; + unsigned int i, j; + int keyfd = -1, err = 0; + off_t pos; +@@ -180,19 +180,20 @@ + for (i = j = 0; i < strlen((char *) key); i += 2, j++) + 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 (set) { + /* NOTE: this takes advantage of the fact that passwd doesn't + * get used after this call if it's being set. */ +- ecb_encrypt((C_Block *) passwd, (C_Block *) passwd, schedule, +- DES_ENCRYPT); ++ DES_ecb_encrypt((DES_cblock *) passwd, (DES_cblock *) passwd, ++ &schedule, DES_ENCRYPT); + } else { + /* decrypt the password */ +- ecb_encrypt((C_Block *) p, (C_Block *) p, schedule, DES_DECRYPT); ++ DES_ecb_encrypt((DES_cblock *) p, (DES_cblock *) p, ++ &schedule, DES_DECRYPT); + } + memset(&schedule, 0, sizeof(schedule)); + } + +@@ -339,12 +340,12 @@ + ibuf += sizeof(sessid); + + /* encrypt. this saves a little space by using the fact that + * des can encrypt in-place without side-effects. */ +- key_sched((C_Block *) seskey, seskeysched); ++ DES_key_sched((DES_cblock *) seskey, &seskeysched); + memset(seskey, 0, sizeof(seskey)); +- ecb_encrypt((C_Block *) randbuf, (C_Block *) randbuf, +- seskeysched, DES_ENCRYPT); ++ DES_ecb_encrypt((DES_cblock *) randbuf, (DES_cblock *) randbuf, ++ &seskeysched, DES_ENCRYPT); + memset(&seskeysched, 0, sizeof(seskeysched)); + + /* test against what the client sent */ + if (memcmp( randbuf, ibuf, sizeof(randbuf) )) { /* != */ +@@ -383,12 +384,12 @@ + for (i = 0; i < sizeof(seskey); i++) + seskey[i] <<= 1; + + /* encrypt randbuf */ +- key_sched((C_Block *) seskey, seskeysched); ++ DES_key_sched((DES_cblock *) seskey, &seskeysched); + memset(seskey, 0, sizeof(seskey)); +- ecb_encrypt( (C_Block *) randbuf, (C_Block *) randbuf, +- seskeysched, DES_ENCRYPT); ++ DES_ecb_encrypt( (DES_cblock *) randbuf, (DES_cblock *) randbuf, ++ &seskeysched, DES_ENCRYPT); + + /* test against client's reply */ + if (memcmp(randbuf, ibuf, sizeof(randbuf))) { /* != */ + memset(randbuf, 0, sizeof(randbuf)); +@@ -398,10 +399,10 @@ + ibuf += sizeof(randbuf); + memset(randbuf, 0, sizeof(randbuf)); + + /* encrypt client's challenge and send back */ +- ecb_encrypt( (C_Block *) ibuf, (C_Block *) rbuf, +- seskeysched, DES_ENCRYPT); ++ DES_ecb_encrypt( (DES_cblock *) ibuf, (DES_cblock *) rbuf, ++ &seskeysched, DES_ENCRYPT); + memset(&seskeysched, 0, sizeof(seskeysched)); + *rbuflen = sizeof(randbuf); + + *uam_pwd = randpwd; +@@ -434,17 +435,19 @@ + sizeof(seskey), 0)) != AFP_OK) + return err; + + /* use old passwd to decrypt new passwd */ +- key_sched((C_Block *) seskey, seskeysched); ++ DES_key_sched((DES_cblock *) seskey, &seskeysched); + ibuf += PASSWDLEN; /* new passwd */ + ibuf[PASSWDLEN] = '\0'; +- ecb_encrypt( (C_Block *) ibuf, (C_Block *) ibuf, seskeysched, DES_DECRYPT); ++ DES_ecb_encrypt( (DES_cblock *) ibuf, (DES_cblock *) ibuf, ++ &seskeysched, DES_DECRYPT); + + /* now use new passwd to decrypt old passwd */ +- key_sched((C_Block *) ibuf, seskeysched); ++ DES_key_sched((DES_cblock *) ibuf, &seskeysched); + ibuf -= PASSWDLEN; /* old passwd */ +- ecb_encrypt((C_Block *) ibuf, (C_Block *) ibuf, seskeysched, DES_DECRYPT); ++ DES_ecb_encrypt((DES_cblock *) ibuf, (DES_cblock *) ibuf, & ++ seskeysched, DES_DECRYPT); + if (memcmp(seskey, ibuf, sizeof(seskey))) + err = AFPERR_NOTAUTH; + else if (memcmp(seskey, ibuf + PASSWDLEN, sizeof(seskey)) == 0) + err = AFPERR_PWDSAME; diff --git a/net/netatalk3/patches/patch-include_atalk_acl.h b/net/netatalk3/patches/patch-include_atalk_acl.h new file mode 100644 index 00000000000..5251c78cbe0 --- /dev/null +++ b/net/netatalk3/patches/patch-include_atalk_acl.h @@ -0,0 +1,12 @@ +$NetBSD: patch-include_atalk_acl.h,v 1.1 2016/11/07 00:41:58 christos Exp $ + +--- include/atalk/acl.h.orig 2014-07-03 01:16:05.000000000 -0400 ++++ include/atalk/acl.h 2016-11-06 11:20:13.660540431 -0500 +@@ -61,6 +61,7 @@ + #else /* HAVE_ACLS=no */ + + #define O_NETATALK_ACL 0 ++#define O_IGNORE 0 + #define chmod_acl chmod + + #endif /* HAVE_ACLS */ diff --git a/net/netatalk3/patches/patch-include_atalk_util.h b/net/netatalk3/patches/patch-include_atalk_util.h new file mode 100644 index 00000000000..2a68089f5b2 --- /dev/null +++ b/net/netatalk3/patches/patch-include_atalk_util.h @@ -0,0 +1,13 @@ +$NetBSD: patch-include_atalk_util.h,v 1.1 2016/11/07 00:41:58 christos Exp $ + +--- include/atalk/util.h.orig 2014-08-07 07:11:55.000000000 -0400 ++++ include/atalk/util.h 2016-11-06 09:33:20.246331563 -0500 +@@ -115,7 +115,7 @@ + * OpenBSD currently does not use the second arg for dlopen(). For + * future compatibility we define DL_LAZY */ + #ifdef __NetBSD__ +-#define mod_open(a) dlopen(a, RTLD_LAZY) ++#define mod_open(a) dlopen(a, RTLD_LAZY|RTLD_GLOBAL) + #elif defined(__OpenBSD__) + #define mod_open(a) dlopen(a, DL_LAZY) + #else /* ! __NetBSD__ && ! __OpenBSD__ */ diff --git a/net/netatalk3/patches/patch-libatalk_util_getiface.c b/net/netatalk3/patches/patch-libatalk_util_getiface.c new file mode 100644 index 00000000000..34fb148a284 --- /dev/null +++ b/net/netatalk3/patches/patch-libatalk_util_getiface.c @@ -0,0 +1,45 @@ +$NetBSD: patch-libatalk_util_getiface.c,v 1.1 2016/11/07 00:41:58 christos Exp $ + +--- libatalk/util/getiface.c.orig 2013-04-09 12:56:18.000000000 +0000 ++++ libatalk/util/getiface.c +@@ -12,6 +12,11 @@ + #include <stdlib.h> + #include <string.h> + #include <stdint.h> ++ ++#ifdef HAVE_GETIFADDRS ++#include <ifaddrs.h> ++#endif ++ + #include <sys/types.h> + #include <sys/socket.h> + #include <sys/ioctl.h> +@@ -70,6 +75,28 @@ static int getifaces(const int sockfd, c + *list = new; + return i; + ++#elif defined(HAVE_GETIFADDRS) ++ struct ifaddrs *ifa, *a; ++ int i; ++ char **new; ++ ++ if (!list) ++ return 0; ++ if (getifaddrs(&ifa) == -1) ++ return 0; ++ for (i = 0, a = ifa; a != NULL; a = a->ifa_next, i++) ++ continue; ++ new = malloc((i + 1) * sizeof(char *)); ++ if (new == NULL) { ++ freeifaddrs(ifa); ++ return 0; ++ } ++ for (i = 0, a = ifa; a != NULL; a = a->ifa_next) ++ if (addname(new, &i, a->ifa_name) < 0) ++ break; ++ freeifaddrs(ifa); ++ *list = new; ++ return i; + #else + struct ifconf ifc; + struct ifreq ifrs[ 64 ], *ifr, *nextifr; diff --git a/net/netatalk3/patches/patch-macros_quota-check.m4 b/net/netatalk3/patches/patch-macros_quota-check.m4 new file mode 100644 index 00000000000..914c77bcdce --- /dev/null +++ b/net/netatalk3/patches/patch-macros_quota-check.m4 @@ -0,0 +1,21 @@ +$NetBSD: patch-macros_quota-check.m4,v 1.1 2016/11/07 00:41:58 christos Exp $ + +--- macros/quota-check.m4.orig 2013-06-24 16:47:02.000000000 +0000 ++++ macros/quota-check.m4 +@@ -9,13 +9,9 @@ AC_DEFUN([AC_NETATALK_CHECK_QUOTA], [ + QUOTA_LIBS="" + netatalk_cv_quotasupport="yes" + AC_CHECK_LIB(rpcsvc, main, [QUOTA_LIBS="-lrpcsvc"]) +- AC_CHECK_HEADERS([rpc/rpc.h rpc/pmap_prot.h rpcsvc/rquota.h],[],[ +- QUOTA_LIBS="" +- netatalk_cv_quotasupport="no" +- AC_DEFINE(NO_QUOTA_SUPPORT, 1, [Define if quota support should not compiled]) +- ]) +- AC_CHECK_LIB(quota, getfsquota, [QUOTA_LIBS="-lquota -lprop -lrpcsvc" +- AC_DEFINE(HAVE_LIBQUOTA, 1, [define if you have libquota])], [], [-lprop -lrpcsvc]) ++ AC_CHECK_HEADERS([rpc/rpc.h rpc/pmap_prot.h rpcsvc/rquota.h],[],[]) ++ AC_CHECK_LIB(quota, quota_open, [QUOTA_LIBS="-lquota -lrpcsvc" ++ AC_DEFINE(HAVE_LIBQUOTA, 1, [define if you have libquota])], [], [-lrpcsvc]) + else + netatalk_cv_quotasupport="no" + AC_DEFINE(NO_QUOTA_SUPPORT, 1, [Define if quota support should not compiled]) |