aboutsummaryrefslogtreecommitdiffstats
path: root/main/cyrus-sasl
diff options
context:
space:
mode:
authorFrancesco Colista <francesco.colista@gmail.com>2013-06-05 06:32:11 +0000
committerFrancesco Colista <francesco.colista@gmail.com>2013-06-05 06:32:11 +0000
commit5ab3e6bb3ce6a632ada909f1014faedacdc3630d (patch)
tree05a7755917ff9cecd4d0a845079acd20b869ed14 /main/cyrus-sasl
parent029786b523f265ff7d380b9089246aea83fc54df (diff)
downloadaports-5ab3e6bb3ce6a632ada909f1014faedacdc3630d.tar.bz2
aports-5ab3e6bb3ce6a632ada909f1014faedacdc3630d.tar.xz
main/cyrus-sasl: upgrade to 2.1.26
Diffstat (limited to 'main/cyrus-sasl')
-rw-r--r--main/cyrus-sasl/APKBUILD22
-rw-r--r--main/cyrus-sasl/cyrus-sasl-2.1.19-checkpw.c.patch170
-rw-r--r--main/cyrus-sasl/cyrus-sasl-2.1.23-db5-fix.patch23
-rw-r--r--main/cyrus-sasl/cyrus-sasl-2.1.26-size_t.patch12
4 files changed, 25 insertions, 202 deletions
diff --git a/main/cyrus-sasl/APKBUILD b/main/cyrus-sasl/APKBUILD
index 80ce4cf366..b48bba1635 100644
--- a/main/cyrus-sasl/APKBUILD
+++ b/main/cyrus-sasl/APKBUILD
@@ -1,19 +1,18 @@
# Contributor: Leonardo Arena <larena@alpinelinux.org>
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=cyrus-sasl
-pkgver=2.1.23
-pkgrel=15
+pkgver=2.1.26
+pkgrel=0
pkgdesc="Cyrus Simple Authentication Service Layer (SASL)"
url="http://cyrusimap.web.cmu.edu/downloads.html#sasl"
arch="all"
license="custom"
subpackages="$pkgname-dev $pkgname-doc libsasl"
depends=
-makedepends="db-dev openssl-dev"
+makedepends="db-dev openssl-dev heimdal-dev"
source="ftp://ftp.andrew.cmu.edu/pub/cyrus-mail/$pkgname-$pkgver.tar.gz
saslauthd.initd
- cyrus-sasl-2.1.19-checkpw.c.patch
- cyrus-sasl-2.1.23-db5-fix.patch
+ cyrus-sasl-2.1.26-size_t.patch
"
_builddir="$srcdir"/$pkgname-$pkgver
@@ -34,10 +33,10 @@ build() {
--disable-anon \
--disable-cram \
--disable-digest \
- --disable-gssapi \
--enable-login \
--disable-otp \
--enable-plain \
+ --with-gss_impl=heimdal \
--with-devrandom=/dev/urandom \
--without-ldap \
-with-saslauthd=/var/run/saslauthd \
@@ -63,7 +62,12 @@ libsasl() {
mv "$pkgdir"/usr/lib "$subpkgdir"/usr/
}
-md5sums="2eb0e48106f0e9cd8001e654f267ecbc cyrus-sasl-2.1.23.tar.gz
+md5sums="a7f4e5e559a0e37b3ffc438c9456e425 cyrus-sasl-2.1.26.tar.gz
30d7a8cf31448a9ad2bfa632c3ed9659 saslauthd.initd
-e27ddff076342e7a3041c4759817d04b cyrus-sasl-2.1.19-checkpw.c.patch
-b60db0033f61106f8eb7740fa12feba5 cyrus-sasl-2.1.23-db5-fix.patch"
+bcaafcbc79054e8356217213d6eda16d cyrus-sasl-2.1.26-size_t.patch"
+sha256sums="8fbc5136512b59bb793657f36fadda6359cae3b08f01fd16b3d406f1345b7bc3 cyrus-sasl-2.1.26.tar.gz
+334ec4c797d0aeceaab08412170a5f41aeb52211df67a95b249d61d5f4908f75 saslauthd.initd
+b85b20bdd25b42098e07a8ba7e435f02b5cd882dcf69572c4d32de4a5e4f41bb cyrus-sasl-2.1.26-size_t.patch"
+sha512sums="78819cb9bb38bea4537d6770d309deeeef09ff44a67526177609d3e1257ff4334d2b5e5131d5a1e4dea7430d8db1918ea9d171f0dee38b5e8337f4b72ed068f0 cyrus-sasl-2.1.26.tar.gz
+f5a33202046b51f5dcf416321838cb2d338696da68d9735e187fe1547a5bdebe988d981ab324a69c79532b6d39011bb0ea38d16852ae7577da3ceb5b49ddd8c9 saslauthd.initd
+fe4c3e6d5230eb50b9e6885129760a12e7bce316b41a3e58b2c550fa83526b91205cd827f7d1367751313559875d32982b95b024b1a22300ac5b35214e7c2b78 cyrus-sasl-2.1.26-size_t.patch"
diff --git a/main/cyrus-sasl/cyrus-sasl-2.1.19-checkpw.c.patch b/main/cyrus-sasl/cyrus-sasl-2.1.19-checkpw.c.patch
deleted file mode 100644
index f7bf44b794..0000000000
--- a/main/cyrus-sasl/cyrus-sasl-2.1.19-checkpw.c.patch
+++ /dev/null
@@ -1,170 +0,0 @@
-diff -ur ../cyrus-sasl-2.1.19.orig/lib/Makefile.in ./lib/Makefile.in
---- ../cyrus-sasl-2.1.19.orig/lib/Makefile.in 2004-07-02 21:40:15.000000000 +0200
-+++ ./lib/Makefile.in 2004-09-07 13:21:22.746680576 +0200
-@@ -120,7 +120,7 @@
- JAVA_TRUE = @JAVA_TRUE@
- LDFLAGS = @LDFLAGS@
- LIBOBJS = @LIBOBJS@
--LIBS = @LIBS@
-+LIBS = -lcrypt @LIBS@
- LIBTOOL = @LIBTOOL@
- LIB_CRYPT = @LIB_CRYPT@
- LIB_DES = @LIB_DES@
-diff -ur ../cyrus-sasl-2.1.19.orig/lib/checkpw.c ./lib/checkpw.c
---- ../cyrus-sasl-2.1.19.orig/lib/checkpw.c 2004-03-17 14:58:13.000000000 +0100
-+++ ./lib/checkpw.c 2004-09-07 13:21:12.645916147 +0200
-@@ -94,6 +94,23 @@
- # endif
- #endif
-
-+/******************************
-+ * crypt(3) patch start *
-+ ******************************/
-+char *crypt(const char *key, const char *salt);
-+
-+/* cleartext password formats */
-+#define PASSWORD_FORMAT_CLEARTEXT 1
-+#define PASSWORD_FORMAT_CRYPT 2
-+#define PASSWORD_FORMAT_CRYPTTRAD 3
-+#define PASSWORD_SALT_BUF_LEN 22
-+
-+/* weeds out crypt(3) password's salt */
-+int _sasl_get_salt (char *dest, char *src, int format);
-+
-+/******************************
-+ * crypt(3) patch stop *
-+ ******************************/
-
- /* we store the following secret to check plaintext passwords:
- *
-@@ -143,7 +160,51 @@
- "*cmusaslsecretPLAIN",
- NULL };
- struct propval auxprop_values[3];
--
-+
-+ /******************************
-+ * crypt(3) patch start *
-+ * for password format check *
-+ ******************************/
-+ sasl_getopt_t *getopt;
-+ void *context;
-+ const char *p = NULL;
-+ /**
-+ * MD5: 12 char salt
-+ * BLOWFISH: 16 char salt
-+ */
-+ char salt[PASSWORD_SALT_BUF_LEN];
-+ int password_format;
-+
-+ /* get password format from auxprop configuration */
-+ if (_sasl_getcallback(conn, SASL_CB_GETOPT, &getopt, &context) == SASL_OK) {
-+ getopt(context, NULL, "password_format", &p, NULL);
-+ }
-+
-+ /* set password format */
-+ if (p) {
-+ /*
-+ memset(pass_format_str, '\0', PASSWORD_FORMAT_STR_LEN);
-+ strncpy(pass_format_str, p, (PASSWORD_FORMAT_STR_LEN - 1));
-+ */
-+ /* modern, modular crypt(3) */
-+ if (strncmp(p, "crypt", 11) == 0)
-+ password_format = PASSWORD_FORMAT_CRYPT;
-+ /* traditional crypt(3) */
-+ else if (strncmp(p, "crypt_trad", 11) == 0)
-+ password_format = PASSWORD_FORMAT_CRYPTTRAD;
-+ /* cleartext password */
-+ else
-+ password_format = PASSWORD_FORMAT_CLEARTEXT;
-+ } else {
-+ /* cleartext password */
-+ password_format = PASSWORD_FORMAT_CLEARTEXT;
-+ }
-+
-+ /******************************
-+ * crypt(3) patch stop *
-+ * for password format check *
-+ ******************************/
-+
- if (!conn || !userstr)
- return SASL_BADPARAM;
-
-@@ -180,14 +241,31 @@
- goto done;
- }
-
-- /* At the point this has been called, the username has been canonified
-- * and we've done the auxprop lookup. This should be easy. */
-- if(auxprop_values[0].name
-- && auxprop_values[0].values
-- && auxprop_values[0].values[0]
-- && !strcmp(auxprop_values[0].values[0], passwd)) {
-- /* We have a plaintext version and it matched! */
-- return SASL_OK;
-+
-+ /******************************
-+ * crypt(3) patch start *
-+ ******************************/
-+
-+ /* get salt */
-+ _sasl_get_salt(salt, (char *) auxprop_values[0].values[0], password_format);
-+
-+ /* crypt(3)-ed password? */
-+ if (password_format != PASSWORD_FORMAT_CLEARTEXT) {
-+ /* compare password */
-+ if (auxprop_values[0].name && auxprop_values[0].values && auxprop_values[0].values[0] && strcmp(crypt(passwd, salt), auxprop_values[0].values[0]) == 0)
-+ return SASL_OK;
-+ else
-+ ret = SASL_BADAUTH;
-+ }
-+ else if (password_format == PASSWORD_FORMAT_CLEARTEXT) {
-+ /* compare passwords */
-+ if (auxprop_values[0].name && auxprop_values[0].values && auxprop_values[0].values[0] && strcmp(auxprop_values[0].values[0], passwd) == 0)
-+ return SASL_OK;
-+ else
-+ ret = SASL_BADAUTH;
-+ /******************************
-+ * crypt(3) patch stop *
-+ ******************************/
- } else if(auxprop_values[1].name
- && auxprop_values[1].values
- && auxprop_values[1].values[0]) {
-@@ -975,3 +1053,37 @@
- #endif
- { NULL, NULL }
- };
-+
-+/* weeds out crypt(3) password's salt */
-+int _sasl_get_salt (char *dest, char *src, int format) {
-+ int num; /* how many characters is salt long? */
-+ switch (format) {
-+ case PASSWORD_FORMAT_CRYPT:
-+ /* md5 crypt */
-+ if (src[1] == '1')
-+ num = 12;
-+ /* blowfish crypt */
-+ else if (src[1] == '2')
-+ num = (src[1] == '2' && src[2] == 'a') ? 17 : 16;
-+ /* traditional crypt */
-+ else
-+ num = 2;
-+ break;
-+
-+ case PASSWORD_FORMAT_CRYPTTRAD:
-+ num = 2;
-+ break;
-+
-+ default:
-+ return 1;
-+ }
-+
-+ /* destroy destination */
-+ memset(dest, '\0', (num + 1));
-+
-+ /* copy salt to destination */
-+ strncpy(dest, src, num);
-+
-+ return 1;
-+}
-+
diff --git a/main/cyrus-sasl/cyrus-sasl-2.1.23-db5-fix.patch b/main/cyrus-sasl/cyrus-sasl-2.1.23-db5-fix.patch
deleted file mode 100644
index d9437d0912..0000000000
--- a/main/cyrus-sasl/cyrus-sasl-2.1.23-db5-fix.patch
+++ /dev/null
@@ -1,23 +0,0 @@
---- ./sasldb/db_berkeley.c.orig 2010-10-04 21:11:15.044010468 -0400
-+++ ./sasldb/db_berkeley.c 2010-10-04 21:12:18.921998718 -0400
-@@ -100,7 +100,7 @@
- ret = db_create(mbdb, NULL, 0);
- if (ret == 0 && *mbdb != NULL)
- {
--#if DB_VERSION_MAJOR == 4 && DB_VERSION_MINOR >= 1
-+#if (DB_VERSION_MAJOR == 4 && DB_VERSION_MINOR >= 1) || DB_VERSION_MAJOR == 5
- ret = (*mbdb)->open(*mbdb, NULL, path, NULL, DB_HASH, flags, 0660);
- #else
- ret = (*mbdb)->open(*mbdb, path, NULL, DB_HASH, flags, 0660);
-
---- ./utils/dbconverter-2.c.orig 2010-10-04 21:23:39.778000256 -0400
-+++ ./utils/dbconverter-2.c 2010-10-04 21:24:50.384999893 -0400
-@@ -214,7 +214,7 @@
- ret = db_create(mbdb, NULL, 0);
- if (ret == 0 && *mbdb != NULL)
- {
--#if DB_VERSION_MAJOR == 4 && DB_VERSION_MINOR >= 1
-+#if (DB_VERSION_MAJOR == 4 && DB_VERSION_MINOR >= 1) || DB_VERSION_MAJOR == 5
- ret = (*mbdb)->open(*mbdb, NULL, path, NULL, DB_HASH, DB_CREATE, 0664);
- #else
- ret = (*mbdb)->open(*mbdb, path, NULL, DB_HASH, DB_CREATE, 0664);
diff --git a/main/cyrus-sasl/cyrus-sasl-2.1.26-size_t.patch b/main/cyrus-sasl/cyrus-sasl-2.1.26-size_t.patch
new file mode 100644
index 0000000000..cde823835b
--- /dev/null
+++ b/main/cyrus-sasl/cyrus-sasl-2.1.26-size_t.patch
@@ -0,0 +1,12 @@
+diff -up cyrus-sasl-2.1.26/include/sasl.h.size_t cyrus-sasl-2.1.26/include/sasl.h
+--- cyrus-sasl-2.1.26/include/sasl.h.size_t 2012-10-12 09:05:48.000000000 -0500
++++ cyrus-sasl-2.1.26/include/sasl.h 2013-01-31 13:21:04.007739327 -0600
+@@ -223,6 +223,8 @@ extern "C" {
+ * they must be called before all other SASL functions:
+ */
+
++#include <sys/types.h>
++
+ /* memory allocation functions which may optionally be replaced:
+ */
+ typedef void *sasl_malloc_t(size_t);