diff options
author | tron <tron> | 2015-08-24 19:59:57 +0000 |
---|---|---|
committer | tron <tron> | 2015-08-24 19:59:57 +0000 |
commit | 777050ed6d6edd02539a566b438d31c65fd215f9 (patch) | |
tree | 599b1f0dfbe63ba7075e9c552885de7019c6033b | |
parent | 717625abab5693318bd026aed8c26ba1b6d155bd (diff) | |
download | pkgsrc-777050ed6d6edd02539a566b438d31c65fd215f9.tar.gz |
Pullup ticket #4800 - requested by manu
net/netatalk30: build fix
Revisions pulled up:
- net/netatalk30/Makefile 1.6
- net/netatalk30/distinfo 1.3
- net/netatalk30/patches/patch-etc_uams_uams__randnum.c 1.2
---
Module Name: pkgsrc
Committed By: fhajny
Date: Fri Aug 7 09:52:23 UTC 2015
Modified Files:
pkgsrc/net/netatalk30: Makefile
Log Message:
netatalk requires libevent 2.x, the builtin one on NetBSD<7 is older.
Fixes pkg/50084.
---
Module Name: pkgsrc
Committed By: manu
Date: Mon Aug 10 15:09:42 UTC 2015
Modified Files:
pkgsrc/net/netatalk30: distinfo
pkgsrc/net/netatalk30/patches: patch-etc_uams_uams__randnum.c
Log Message:
Fix build problem with libdes migration
This package was partially migrated from libdes to OpenSSL and therefore
still exhibited some build failites: bin/afppasswd/afppasswd.c was
patched
but not etc/uams/uams_randnum.c. Update the later to work around the
problem.
-rw-r--r-- | net/netatalk30/Makefile | 3 | ||||
-rw-r--r-- | net/netatalk30/distinfo | 4 | ||||
-rw-r--r-- | net/netatalk30/patches/patch-etc_uams_uams__randnum.c | 126 |
3 files changed, 126 insertions, 7 deletions
diff --git a/net/netatalk30/Makefile b/net/netatalk30/Makefile index d76df3fd621..8d53dc7ad12 100644 --- a/net/netatalk30/Makefile +++ b/net/netatalk30/Makefile @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.5 2015/06/16 14:26:31 fhajny Exp $ +# $NetBSD: Makefile,v 1.5.2.1 2015/08/24 19:59:57 tron Exp $ DISTNAME= netatalk-3.0.8 PKGNAME= ${DISTNAME:C/-/30-/} @@ -84,6 +84,7 @@ post-install: ${INSTALL_DATA} ${WRKSRC}/config/pam/netatalk ${DESTDIR}${EGDIR}/netatalk.pam .endif +BUILDLINK_API_DEPENDS.libevent+= libevent>=2 .include "../../devel/libevent/buildlink3.mk" .include "../../lang/python/application.mk" .include "../../security/libgcrypt/buildlink3.mk" diff --git a/net/netatalk30/distinfo b/net/netatalk30/distinfo index 93657874784..d0fc0961049 100644 --- a/net/netatalk30/distinfo +++ b/net/netatalk30/distinfo @@ -1,4 +1,4 @@ -$NetBSD: distinfo,v 1.2 2014/06/28 04:41:55 markd Exp $ +$NetBSD: distinfo,v 1.2.10.1 2015/08/24 19:59:57 tron Exp $ SHA1 (netatalk-3.0.8.tar.bz2) = 4956d0991ae09e6c5336980b0c9d92afe8153f5f RMD160 (netatalk-3.0.8.tar.bz2) = 61b8b5a43985b8a5441867cb96b9de5aeba324fb @@ -12,7 +12,7 @@ SHA1 (patch-distrib_initscripts_Makefile.in) = b954a1e2b52a998e87721148082ec247c SHA1 (patch-distrib_initscripts_netatalk.xml.tmpl) = dd7591e12eca3c1e7d7bc768cd1e060979dc383e SHA1 (patch-etc_afpd_quota.c) = 90025824fd513788c167108e4c388b453ab75ee6 SHA1 (patch-etc_cnid__dbd_cnid__metad.c) = 06a97387594f386d3e049ba1e25d4626ac96195f -SHA1 (patch-etc_uams_uams__randnum.c) = 0226d1aa382cffea454adf6bc0dc6e6fa1800dcc +SHA1 (patch-etc_uams_uams__randnum.c) = 51e8b4a0c77f732423be9406c9f47d004403080a SHA1 (patch-include_atalk_util.h) = 5fe41720bf82980f6d5965f76d34e1703e541047 SHA1 (patch-libatalk_adouble_ad_flush.c) = d4df84d2786bf392a5113b4867d955098c0c1da9 SHA1 (patch-libatalk_util_getiface.c) = fe4aba6080f6308866bedb3d96ccc2b034836d3e diff --git a/net/netatalk30/patches/patch-etc_uams_uams__randnum.c b/net/netatalk30/patches/patch-etc_uams_uams__randnum.c index a628012223e..8b1f76b0eac 100644 --- a/net/netatalk30/patches/patch-etc_uams_uams__randnum.c +++ b/net/netatalk30/patches/patch-etc_uams_uams__randnum.c @@ -1,8 +1,9 @@ -$NetBSD: patch-etc_uams_uams__randnum.c,v 1.1 2014/06/11 11:03:57 hauke Exp $ +$NetBSD: patch-etc_uams_uams__randnum.c,v 1.1.10.1 2015/08/24 19:59:57 tron Exp $ ---- etc/uams/uams_randnum.c.orig 2014-01-04 15:42:35.000000000 +0000 -+++ etc/uams/uams_randnum.c -@@ -25,7 +25,7 @@ +--- 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> @@ -11,3 +12,120 @@ $NetBSD: patch-etc_uams_uams__randnum.c,v 1.1 2014/06/11 11:03:57 hauke Exp $ #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; |