the Fink project is an effort to port
popular Unix programs to Mac OS X
Info4: <<
Package: cyrus-sasl2%type_pkg[-64bit]
Version: 2.1.23
Revision: 2
Type: -64bit (boolean)
Architecture: ( %type_raw[-64bit] = -64bit ) powerpc, ( %type_raw[-64bit] = -64bit ) i386
Distribution: ( %type_raw[-64bit] = -64bit ) 10.5, ( %type_raw[-64bit] = -64bit ) 10.6
Maintainer: Daniel Johnson
Depends: %N-shlibs (= %v-%r), ( %type_raw[-64bit] = -64bit ) 64bit-cpu
BuildDepends: system-openssl-dev, db48-aes%type_pkg[-64bit] | db48%type_pkg[-64bit] , fink (>= 0.26.2), libtool2
Conflicts: cyrus-sasl2, cyrus-sasl2-64bit
Replaces: cyrus-sasl2, cyrus-sasl2-64bit
Source: mirror:custom:cyrus-sasl-%v.tar.gz
CustomMirror: <<
Primary: ftp://ftp.andrew.cmu.edu/pub/cyrus-mail/
Secondary: ftp://ftp.andrew.cmu.edu/pub/cyrus-mail/OLD-VERSIONS/sasl/
<<
Source-MD5: 2eb0e48106f0e9cd8001e654f267ecbc
PatchFile: %{ni}.patch
PatchFile-MD5: 7655be102c4b1a8659775761d118d892
PatchScript: <<
#!/bin/bash -ev
%{default_script}
#Use db48
perl -pi -e 's/db-4.4/db-4.8/g' configure
#This is only needed for the -64bit variant
perl -pi -e 's,lib/sasl2,%lib/sasl2,g' Makefile.in plugins/Makefile.in
#Fix bug in configure on 10.6
perl -pi -e 's,HAVE_SECURITY_PAM_H,HAVE_SECURITY_PAM_APPL_H,' configure
#Make sure saslauthd can find pam on < 10.6
let version=`uname -r | cut -f 1 -d .`
if [ $version -lt 10 ]; then
perl -pi -e 's,security/pam_appl.h,pam/pam_appl.h,g' saslauthd/configure
fi
<<
NoSetLDFLAGS: True
SetLibs: -L%p/%lib
ConfigureParams: <<
--disable-dependency-tracking \
--disable-macos-framework \
--disable-static \
--enable-login \
--enable-ntlm \
--infodir=%p/share/info \
--libdir=%p/%lib \
--libexecdir=%p/%lib \
--mandir=%p/share/man \
--with-authdaemond \
--with-bdb-incdir=%p/include/db4 \
--with-bdb-libdir=%p/%lib \
--with-dblib=berkeley \
--with-dbpath=%p/etc/sasldb2 \
--with-openssl=%p/lib/system-openssl \
--with-pam \
--with-plugindir=%p/%lib/sasl2 \
--with-saslauthd=%p/var/saslauthd
<<
SetCPPFLAGS: -I%p/lib/system-openssl/include
SetCFLAGS: -shared
CompileScript: <<
#!/bin/bash -ev
if [ "%type_raw[-64bit]" == "-64bit" ]; then
export CC="gcc -m64"
fi
./configure %c --host=`uname -p`-apple-darwin`uname -r`
make SASL_DB_LIB="-L%p/%lib -ldb-4.8" LIBTOOL=glibtool
<<
InstallScript: <<
mkdir -p %i/share/man/man8
mkdir -p %i/var/saslauthd
make install DESTDIR=%d LIBTOOL=glibtool
#No need for dependency_libs in .la files if not building static libs
perl -pi -e "s/dependency_libs=.*$/dependency_libs=''/" %i/%lib/*.la %i/%lib/sasl2/*.la
cd utils; cp sasldblistusers2.8 saslpasswd2.8 %i/share/man/man8
<<
DocFiles: AUTHORS COPYING NEWS README ChangeLog doc/TODO doc/*.html doc/*.txt
SplitOff: <<
Package: %N-shlibs
Depends: db48-aes%type_pkg[-64bit]-shlibs | db48%type_pkg[-64bit]-shlibs, ( %type_raw[-64bit] = -64bit ) 64bit-cpu
Replaces: %N-dev (<< 2.1.21-14)
Files: %lib/*.*.dylib %lib/sasl2/*.*.so %lib/sasl2/*.la
Shlibs: %p/%lib/libsasl2.2.dylib 3.0.0 %n (>= 2.1.13-12) %type_num[-64bit]
DocFiles: COPYING README
<<
SplitOff2: <<
Package: %N-dev
Depends: %N-shlibs (= %v-%r), ( %type_raw[-64bit] = -64bit ) 64bit-cpu
Conflicts: %N (<= 2.1.10-2), cyrus-sasl2-dev, cyrus-sasl2-64bit-dev
Replaces: %N (<< 2.1.21-14), cyrus-sasl2-dev, cyrus-sasl2-64bit-dev
Files: include/sasl %lib/*.dylib %lib/*.la %lib/sasl2/*.so
BuildDependsOnly: True
DocFiles: COPYING README
<<
SplitOff3: <<
Package: %N-doc
Depends: ( %type_raw[-64bit] = -64bit ) 64bit-cpu
Conflicts: cyrus-sasl (<= 1.5.27-15), cyrus-sasl-doc, cyrus-sasl2-doc, cyrus-sasl2-64bit-doc
Replaces: cyrus-sasl (<= 1.5.27-15), cyrus-sasl-doc, cyrus-sasl2-doc, cyrus-sasl2-64bit-doc
Files: share/man
DocFiles: COPYING README
<<
Description: Cyrus Simple Auth. and Security Layer Library
DescDetail: <<
SASL is the Simple Authentication and Security Layer, a method for adding
authentication support to connection-based protocols. To use SASL, a
protocol includes a command for identifying and authenticating a user to a
server and for optionally negotiating protection of subsequent protocol
interactions. If its use is negotiated, a security layer is inserted
between the protocol and the connection.
<<
DescPort: <<
Patch to stop the creation and installing of a framework and look for PAM
headers in /usr/include/pam instead of /usr/include/security. KERBEROS IV
support has been disabled for Darwin by the upstream developers.
<<
DescPackaging: <<
Moved the manual pages to there own splitoff so cyrus-sasl and cyrus-sasl2
can co-exist happliy.
Now uses system's OpenSSL (via system-openssl-dev) and removed from crypto
tree. Yay!
Previous versions maintained by Matt Stephenson
Borrowed a patch from redhat to build on new gcc.
Added patches from Debian package.
2.1.23 fixes buffer overflow in sasl_encode64().
Packages depending on cyrus-sasl2 no longer need to depend on its dependencies,
just Depend on cyrus-sasl2-shlibs and BuildDepend on cyrus-sasl2-dev.
<<
License: OSI-Approved
Homepage: http://asg.web.cmu.edu/sasl
<<
diff -ru cyrus-sasl-2.1.23.orig/lib/client.c cyrus-sasl-2.1.23/lib/client.c
--- cyrus-sasl-2.1.23.orig/lib/client.c 2009-04-28 11:09:15.000000000 -0400
+++ cyrus-sasl-2.1.23/lib/client.c 2009-06-07 09:15:56.000000000 -0400
@@ -202,6 +202,9 @@
{ NULL, NULL }
};
+ /* lock allocation type */
+ _sasl_allocation_locked++;
+
if(_sasl_client_active) {
/* We're already active, just increase our refcount */
/* xxx do something with the callback structure? */
diff -ru cyrus-sasl-2.1.23.orig/lib/common.c cyrus-sasl-2.1.23/lib/common.c
--- cyrus-sasl-2.1.23.orig/lib/common.c 2009-04-28 11:09:15.000000000 -0400
+++ cyrus-sasl-2.1.23/lib/common.c 2009-06-07 09:16:54.000000000 -0400
@@ -107,6 +107,7 @@
(sasl_realloc_t *) &realloc,
(sasl_free_t *) &free
};
+int _sasl_allocation_locked = 0;
#define SASL_ENCODEV_EXTRA 4096
@@ -152,6 +153,12 @@
void sasl_set_mutex(sasl_mutex_alloc_t *n, sasl_mutex_lock_t *l,
sasl_mutex_unlock_t *u, sasl_mutex_free_t *d)
{
+ /* Disallow mutex function changes once sasl_client_init
+ and/or sasl_server_init is called */
+ if (_sasl_server_cleanup_hook || _sasl_client_cleanup_hook) {
+ return;
+ }
+
_sasl_mutex_utils.alloc=n;
_sasl_mutex_utils.lock=l;
_sasl_mutex_utils.unlock=u;
@@ -637,6 +644,8 @@
sasl_realloc_t *r,
sasl_free_t *f)
{
+ if (_sasl_allocation_locked++) return;
+
_sasl_allocation_utils.malloc=m;
_sasl_allocation_utils.calloc=c;
_sasl_allocation_utils.realloc=r;
diff -ru cyrus-sasl-2.1.23.orig/lib/saslint.h cyrus-sasl-2.1.23/lib/saslint.h
--- cyrus-sasl-2.1.23.orig/lib/saslint.h 2009-04-28 11:09:15.000000000 -0400
+++ cyrus-sasl-2.1.23/lib/saslint.h 2009-06-07 09:15:56.000000000 -0400
@@ -300,6 +300,7 @@
extern sasl_allocation_utils_t _sasl_allocation_utils;
extern sasl_mutex_utils_t _sasl_mutex_utils;
+extern int _sasl_allocation_locked;
/*
* checkpw.c
diff -ru cyrus-sasl-2.1.23.orig/lib/server.c cyrus-sasl-2.1.23/lib/server.c
--- cyrus-sasl-2.1.23.orig/lib/server.c 2009-04-28 11:09:15.000000000 -0400
+++ cyrus-sasl-2.1.23/lib/server.c 2009-06-07 09:15:56.000000000 -0400
@@ -698,6 +698,9 @@
{ NULL, NULL }
};
+ /* lock allocation type */
+ _sasl_allocation_locked++;
+
/* we require the appname (if present) to be short enough to be a path */
if (appname != NULL && strlen(appname) >= PATH_MAX)
return SASL_BADPARAM;
diff -ru cyrus-sasl-2.1.23.orig/plugins/digestmd5.c cyrus-sasl-2.1.23/plugins/digestmd5.c
--- cyrus-sasl-2.1.23.orig/plugins/digestmd5.c 2009-04-28 11:09:17.000000000 -0400
+++ cyrus-sasl-2.1.23/plugins/digestmd5.c 2009-06-07 09:17:07.000000000 -0400
@@ -2715,7 +2715,7 @@
"DIGEST-MD5", /* mech_name */
#ifdef WITH_RC4
128, /* max_ssf */
-#elif WITH_DES
+#elif defined(WITH_DES)
112,
#else
1,
@@ -4034,7 +4034,7 @@
"DIGEST-MD5",
#ifdef WITH_RC4 /* mech_name */
128, /* max ssf */
-#elif WITH_DES
+#elif defined(WITH_DES)
112,
#else
1,
diff -ru cyrus-sasl-2.1.23.orig/saslauthd/auth_rimap.c cyrus-sasl-2.1.23/saslauthd/auth_rimap.c
--- cyrus-sasl-2.1.23.orig/saslauthd/auth_rimap.c 2009-04-28 11:09:18.000000000 -0400
+++ cyrus-sasl-2.1.23/saslauthd/auth_rimap.c 2009-06-07 09:16:33.000000000 -0400
@@ -162,6 +162,7 @@
num_quotes = 0;
p1 = s;
while ((p1 = strchr(p1, '"')) != NULL) {
+ p1++;
num_quotes++;
}
@@ -438,7 +439,7 @@
syslog(LOG_WARNING, "auth_rimap: writev: %m");
memset(qlogin, 0, strlen(qlogin));
free(qlogin);
- memset(qpass, 0, strlen(qlogin));
+ memset(qpass, 0, strlen(qpass));
free(qpass);
(void)close(s);
return strdup(RESP_IERROR);
@@ -447,7 +448,7 @@
/* don't need these any longer */
memset(qlogin, 0, strlen(qlogin));
free(qlogin);
- memset(qpass, 0, strlen(qlogin));
+ memset(qpass, 0, strlen(qpass));
free(qpass);
/* read and parse the LOGIN response */
diff -ru cyrus-sasl-2.1.23.orig/saslauthd/auth_shadow.c cyrus-sasl-2.1.23/saslauthd/auth_shadow.c
--- cyrus-sasl-2.1.23.orig/saslauthd/auth_shadow.c 2009-04-28 11:09:18.000000000 -0400
+++ cyrus-sasl-2.1.23/saslauthd/auth_shadow.c 2009-06-07 09:16:08.000000000 -0400
@@ -1,3 +1,4 @@
+#define _XOPEN_SOURCE
#define PWBUFSZ 256 /***SWB***/
/* MODULE: auth_shadow */
diff -ru cyrus-sasl-2.1.23.orig/saslauthd/lak.c cyrus-sasl-2.1.23/saslauthd/lak.c
--- cyrus-sasl-2.1.23.orig/saslauthd/lak.c 2009-04-28 11:09:18.000000000 -0400
+++ cyrus-sasl-2.1.23/saslauthd/lak.c 2009-06-07 09:16:45.000000000 -0400
@@ -55,6 +55,7 @@
#include
#endif
+#define LDAP_DEPRECATED 1
#include
#include
#include
diff -ru cyrus-sasl-2.1.23.orig/saslauthd/saslauthd-main.c cyrus-sasl-2.1.23/saslauthd/saslauthd-main.c
--- cyrus-sasl-2.1.23.orig/saslauthd/saslauthd-main.c 2009-04-28 11:09:18.000000000 -0400
+++ cyrus-sasl-2.1.23/saslauthd/saslauthd-main.c 2009-06-07 09:16:18.000000000 -0400
@@ -276,7 +276,7 @@
exit(1);
}
- umask(077);
+ umask(0077);
pid_file_size = strlen(run_path) + sizeof(PID_FILE_LOCK) + 1;
if ((pid_file_lock = malloc(pid_file_size)) == NULL) {
@@ -287,7 +287,7 @@
strlcpy(pid_file_lock, run_path, pid_file_size);
strlcat(pid_file_lock, PID_FILE_LOCK, pid_file_size);
- if ((pid_file_lock_fd = open(pid_file_lock, O_CREAT|O_TRUNC|O_RDWR, 644)) < 0) {
+ if ((pid_file_lock_fd = open(pid_file_lock, O_CREAT|O_TRUNC|O_RDWR, 0644)) < 0) {
rc = errno;
logger(L_ERR, L_FUNC, "could not open pid lock file: %s", pid_file_lock);
logger(L_ERR, L_FUNC, "open: %s", strerror(rc));
Info4: <<
Package: cyrus-sasl2%type_pkg[-64bit]
Version: 2.1.23
Revision: 2
Type: -64bit (boolean)
Architecture: ( %type_raw[-64bit] = -64bit ) powerpc, ( %type_raw[-64bit] = -64bit ) i386
Distribution: ( %type_raw[-64bit] = -64bit ) 10.5, ( %type_raw[-64bit] = -64bit ) 10.6
Maintainer: Daniel Johnson
Depends: %N-shlibs (= %v-%r), ( %type_raw[-64bit] = -64bit ) 64bit-cpu
BuildDepends: system-openssl-dev, db48-aes%type_pkg[-64bit] | db48%type_pkg[-64bit] , fink (>= 0.26.2), libtool2
Conflicts: cyrus-sasl2, cyrus-sasl2-64bit
Replaces: cyrus-sasl2, cyrus-sasl2-64bit
Source: mirror:custom:cyrus-sasl-%v.tar.gz
CustomMirror: <<
Primary: ftp://ftp.andrew.cmu.edu/pub/cyrus-mail/
Secondary: ftp://ftp.andrew.cmu.edu/pub/cyrus-mail/OLD-VERSIONS/sasl/
<<
Source-MD5: 2eb0e48106f0e9cd8001e654f267ecbc
PatchFile: %{ni}.patch
PatchFile-MD5: 7655be102c4b1a8659775761d118d892
PatchScript: <<
#!/bin/bash -ev
%{default_script}
#Use db48
perl -pi -e 's/db-4.4/db-4.8/g' configure
#This is only needed for the -64bit variant
perl -pi -e 's,lib/sasl2,%lib/sasl2,g' Makefile.in plugins/Makefile.in
#Fix bug in configure on 10.6
perl -pi -e 's,HAVE_SECURITY_PAM_H,HAVE_SECURITY_PAM_APPL_H,' configure
#Make sure saslauthd can find pam on < 10.6
let version=`uname -r | cut -f 1 -d .`
if [ $version -lt 10 ]; then
perl -pi -e 's,security/pam_appl.h,pam/pam_appl.h,g' saslauthd/configure
fi
<<
NoSetLDFLAGS: True
SetLibs: -L%p/%lib
ConfigureParams: <<
--disable-dependency-tracking \
--disable-macos-framework \
--disable-static \
--enable-login \
--enable-ntlm \
--infodir=%p/share/info \
--libdir=%p/%lib \
--libexecdir=%p/%lib \
--mandir=%p/share/man \
--with-authdaemond \
--with-bdb-incdir=%p/include/db4 \
--with-bdb-libdir=%p/%lib \
--with-dblib=berkeley \
--with-dbpath=%p/etc/sasldb2 \
--with-openssl=%p/lib/system-openssl \
--with-pam \
--with-plugindir=%p/%lib/sasl2 \
--with-saslauthd=%p/var/saslauthd
<<
SetCPPFLAGS: -I%p/lib/system-openssl/include
SetCFLAGS: -shared
CompileScript: <<
#!/bin/bash -ev
if [ "%type_raw[-64bit]" == "-64bit" ]; then
export CC="gcc -m64"
fi
./configure %c --host=`uname -p`-apple-darwin`uname -r`
make SASL_DB_LIB="-L%p/%lib -ldb-4.8" LIBTOOL=glibtool
<<
InstallScript: <<
mkdir -p %i/share/man/man8
mkdir -p %i/var/saslauthd
make install DESTDIR=%d LIBTOOL=glibtool
#No need for dependency_libs in .la files if not building static libs
perl -pi -e "s/dependency_libs=.*$/dependency_libs=''/" %i/%lib/*.la %i/%lib/sasl2/*.la
cd utils; cp sasldblistusers2.8 saslpasswd2.8 %i/share/man/man8
<<
DocFiles: AUTHORS COPYING NEWS README ChangeLog doc/TODO doc/*.html doc/*.txt
SplitOff: <<
Package: %N-shlibs
Depends: db48-aes%type_pkg[-64bit]-shlibs | db48%type_pkg[-64bit]-shlibs, ( %type_raw[-64bit] = -64bit ) 64bit-cpu
Replaces: %N-dev (<< 2.1.21-14)
Files: %lib/*.*.dylib %lib/sasl2/*.*.so %lib/sasl2/*.la
Shlibs: %p/%lib/libsasl2.2.dylib 3.0.0 %n (>= 2.1.13-12) %type_num[-64bit]
DocFiles: COPYING README
<<
SplitOff2: <<
Package: %N-dev
Depends: %N-shlibs (= %v-%r), ( %type_raw[-64bit] = -64bit ) 64bit-cpu
Conflicts: %N (<= 2.1.10-2), cyrus-sasl2-dev, cyrus-sasl2-64bit-dev
Replaces: %N (<< 2.1.21-14), cyrus-sasl2-dev, cyrus-sasl2-64bit-dev
Files: include/sasl %lib/*.dylib %lib/*.la %lib/sasl2/*.so
BuildDependsOnly: True
DocFiles: COPYING README
<<
SplitOff3: <<
Package: %N-doc
Depends: ( %type_raw[-64bit] = -64bit ) 64bit-cpu
Conflicts: cyrus-sasl (<= 1.5.27-15), cyrus-sasl-doc, cyrus-sasl2-doc, cyrus-sasl2-64bit-doc
Replaces: cyrus-sasl (<= 1.5.27-15), cyrus-sasl-doc, cyrus-sasl2-doc, cyrus-sasl2-64bit-doc
Files: share/man
DocFiles: COPYING README
<<
Description: Cyrus Simple Auth. and Security Layer Library
DescDetail: <<
SASL is the Simple Authentication and Security Layer, a method for adding
authentication support to connection-based protocols. To use SASL, a
protocol includes a command for identifying and authenticating a user to a
server and for optionally negotiating protection of subsequent protocol
interactions. If its use is negotiated, a security layer is inserted
between the protocol and the connection.
<<
DescPort: <<
Patch to stop the creation and installing of a framework and look for PAM
headers in /usr/include/pam instead of /usr/include/security. KERBEROS IV
support has been disabled for Darwin by the upstream developers.
<<
DescPackaging: <<
Moved the manual pages to there own splitoff so cyrus-sasl and cyrus-sasl2
can co-exist happliy.
Now uses system's OpenSSL (via system-openssl-dev) and removed from crypto
tree. Yay!
Previous versions maintained by Matt Stephenson
Borrowed a patch from redhat to build on new gcc.
Added patches from Debian package.
2.1.23 fixes buffer overflow in sasl_encode64().
Packages depending on cyrus-sasl2 no longer need to depend on its dependencies,
just Depend on cyrus-sasl2-shlibs and BuildDepend on cyrus-sasl2-dev.
<<
License: OSI-Approved
Homepage: http://asg.web.cmu.edu/sasl
<<
diff -ru cyrus-sasl-2.1.23.orig/lib/client.c cyrus-sasl-2.1.23/lib/client.c
--- cyrus-sasl-2.1.23.orig/lib/client.c 2009-04-28 11:09:15.000000000 -0400
+++ cyrus-sasl-2.1.23/lib/client.c 2009-06-07 09:15:56.000000000 -0400
@@ -202,6 +202,9 @@
{ NULL, NULL }
};
+ /* lock allocation type */
+ _sasl_allocation_locked++;
+
if(_sasl_client_active) {
/* We're already active, just increase our refcount */
/* xxx do something with the callback structure? */
diff -ru cyrus-sasl-2.1.23.orig/lib/common.c cyrus-sasl-2.1.23/lib/common.c
--- cyrus-sasl-2.1.23.orig/lib/common.c 2009-04-28 11:09:15.000000000 -0400
+++ cyrus-sasl-2.1.23/lib/common.c 2009-06-07 09:16:54.000000000 -0400
@@ -107,6 +107,7 @@
(sasl_realloc_t *) &realloc,
(sasl_free_t *) &free
};
+int _sasl_allocation_locked = 0;
#define SASL_ENCODEV_EXTRA 4096
@@ -152,6 +153,12 @@
void sasl_set_mutex(sasl_mutex_alloc_t *n, sasl_mutex_lock_t *l,
sasl_mutex_unlock_t *u, sasl_mutex_free_t *d)
{
+ /* Disallow mutex function changes once sasl_client_init
+ and/or sasl_server_init is called */
+ if (_sasl_server_cleanup_hook || _sasl_client_cleanup_hook) {
+ return;
+ }
+
_sasl_mutex_utils.alloc=n;
_sasl_mutex_utils.lock=l;
_sasl_mutex_utils.unlock=u;
@@ -637,6 +644,8 @@
sasl_realloc_t *r,
sasl_free_t *f)
{
+ if (_sasl_allocation_locked++) return;
+
_sasl_allocation_utils.malloc=m;
_sasl_allocation_utils.calloc=c;
_sasl_allocation_utils.realloc=r;
diff -ru cyrus-sasl-2.1.23.orig/lib/saslint.h cyrus-sasl-2.1.23/lib/saslint.h
--- cyrus-sasl-2.1.23.orig/lib/saslint.h 2009-04-28 11:09:15.000000000 -0400
+++ cyrus-sasl-2.1.23/lib/saslint.h 2009-06-07 09:15:56.000000000 -0400
@@ -300,6 +300,7 @@
extern sasl_allocation_utils_t _sasl_allocation_utils;
extern sasl_mutex_utils_t _sasl_mutex_utils;
+extern int _sasl_allocation_locked;
/*
* checkpw.c
diff -ru cyrus-sasl-2.1.23.orig/lib/server.c cyrus-sasl-2.1.23/lib/server.c
--- cyrus-sasl-2.1.23.orig/lib/server.c 2009-04-28 11:09:15.000000000 -0400
+++ cyrus-sasl-2.1.23/lib/server.c 2009-06-07 09:15:56.000000000 -0400
@@ -698,6 +698,9 @@
{ NULL, NULL }
};
+ /* lock allocation type */
+ _sasl_allocation_locked++;
+
/* we require the appname (if present) to be short enough to be a path */
if (appname != NULL && strlen(appname) >= PATH_MAX)
return SASL_BADPARAM;
diff -ru cyrus-sasl-2.1.23.orig/plugins/digestmd5.c cyrus-sasl-2.1.23/plugins/digestmd5.c
--- cyrus-sasl-2.1.23.orig/plugins/digestmd5.c 2009-04-28 11:09:17.000000000 -0400
+++ cyrus-sasl-2.1.23/plugins/digestmd5.c 2009-06-07 09:17:07.000000000 -0400
@@ -2715,7 +2715,7 @@
"DIGEST-MD5", /* mech_name */
#ifdef WITH_RC4
128, /* max_ssf */
-#elif WITH_DES
+#elif defined(WITH_DES)
112,
#else
1,
@@ -4034,7 +4034,7 @@
"DIGEST-MD5",
#ifdef WITH_RC4 /* mech_name */
128, /* max ssf */
-#elif WITH_DES
+#elif defined(WITH_DES)
112,
#else
1,
diff -ru cyrus-sasl-2.1.23.orig/saslauthd/auth_rimap.c cyrus-sasl-2.1.23/saslauthd/auth_rimap.c
--- cyrus-sasl-2.1.23.orig/saslauthd/auth_rimap.c 2009-04-28 11:09:18.000000000 -0400
+++ cyrus-sasl-2.1.23/saslauthd/auth_rimap.c 2009-06-07 09:16:33.000000000 -0400
@@ -162,6 +162,7 @@
num_quotes = 0;
p1 = s;
while ((p1 = strchr(p1, '"')) != NULL) {
+ p1++;
num_quotes++;
}
@@ -438,7 +439,7 @@
syslog(LOG_WARNING, "auth_rimap: writev: %m");
memset(qlogin, 0, strlen(qlogin));
free(qlogin);
- memset(qpass, 0, strlen(qlogin));
+ memset(qpass, 0, strlen(qpass));
free(qpass);
(void)close(s);
return strdup(RESP_IERROR);
@@ -447,7 +448,7 @@
/* don't need these any longer */
memset(qlogin, 0, strlen(qlogin));
free(qlogin);
- memset(qpass, 0, strlen(qlogin));
+ memset(qpass, 0, strlen(qpass));
free(qpass);
/* read and parse the LOGIN response */
diff -ru cyrus-sasl-2.1.23.orig/saslauthd/auth_shadow.c cyrus-sasl-2.1.23/saslauthd/auth_shadow.c
--- cyrus-sasl-2.1.23.orig/saslauthd/auth_shadow.c 2009-04-28 11:09:18.000000000 -0400
+++ cyrus-sasl-2.1.23/saslauthd/auth_shadow.c 2009-06-07 09:16:08.000000000 -0400
@@ -1,3 +1,4 @@
+#define _XOPEN_SOURCE
#define PWBUFSZ 256 /***SWB***/
/* MODULE: auth_shadow */
diff -ru cyrus-sasl-2.1.23.orig/saslauthd/lak.c cyrus-sasl-2.1.23/saslauthd/lak.c
--- cyrus-sasl-2.1.23.orig/saslauthd/lak.c 2009-04-28 11:09:18.000000000 -0400
+++ cyrus-sasl-2.1.23/saslauthd/lak.c 2009-06-07 09:16:45.000000000 -0400
@@ -55,6 +55,7 @@
#include
#endif
+#define LDAP_DEPRECATED 1
#include
#include
#include
diff -ru cyrus-sasl-2.1.23.orig/saslauthd/saslauthd-main.c cyrus-sasl-2.1.23/saslauthd/saslauthd-main.c
--- cyrus-sasl-2.1.23.orig/saslauthd/saslauthd-main.c 2009-04-28 11:09:18.000000000 -0400
+++ cyrus-sasl-2.1.23/saslauthd/saslauthd-main.c 2009-06-07 09:16:18.000000000 -0400
@@ -276,7 +276,7 @@
exit(1);
}
- umask(077);
+ umask(0077);
pid_file_size = strlen(run_path) + sizeof(PID_FILE_LOCK) + 1;
if ((pid_file_lock = malloc(pid_file_size)) == NULL) {
@@ -287,7 +287,7 @@
strlcpy(pid_file_lock, run_path, pid_file_size);
strlcat(pid_file_lock, PID_FILE_LOCK, pid_file_size);
- if ((pid_file_lock_fd = open(pid_file_lock, O_CREAT|O_TRUNC|O_RDWR, 644)) < 0) {
+ if ((pid_file_lock_fd = open(pid_file_lock, O_CREAT|O_TRUNC|O_RDWR, 0644)) < 0) {
rc = errno;
logger(L_ERR, L_FUNC, "could not open pid lock file: %s", pid_file_lock);
logger(L_ERR, L_FUNC, "open: %s", strerror(rc));