~vorlon/ubuntu/oneiric/cyrus-sasl2/multiarch

« back to all changes in this revision

Viewing changes to debian/patches/021ubuntu-fix-threaded-sasl.dpatch

  • Committer: Bazaar Package Importer
  • Author(s): Steve Langasek
  • Date: 2009-06-04 16:03:06 UTC
  • mfrom: (2.1.4 squeeze)
  • Revision ID: james.westby@ubuntu.com-20090604160306-wioioa3amb1up5ws
Tags: 2.1.23.dfsg1-1ubuntu1
* Merge from Debian unstable, remaining changes:
  - Add sysv-rc dependency
  - Since the libsasl2 package description so clearly
    states that the library is "completely useless" without one of the
    libsasl2-modules packages, upgrade the Recommends on a single package
    to an ORd Depends on the complete list of them.
  - Prepend XS-Original- to Vcs-{Browser,Svn}.
  - Remove stop links from rc0 and rc6
  - stop service only when switching to single user mode.
* Dropped changes, superseded in Debian:
  - build-depend on libdb4.6-dev; Debian has moved on to db4.7
  - Added debian/patches/021ubuntu-fix-threaded-sasl.dpatch
    - Fixes SEGV in threaded SASL applications.
* debian/rules: remove all the build-*stamp files on clean, not just
  build-stamp.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
#! /bin/sh /usr/share/dpatch/dpatch-run
2
 
 
3
 
@DPATCH@
4
 
diff -Naur cyrus-sasl-2.1.22.dfsg1.orig/lib/common.c cyrus-sasl-2.1.22.dfsg1/lib/common.c
5
 
--- cyrus-sasl-2.1.22.dfsg1.orig/lib/common.c   2006-04-19 14:39:59.000000000 -0400
6
 
+++ cyrus-sasl-2.1.22.dfsg1/lib/common.c        2008-10-10 10:21:56.000000000 -0400
7
 
@@ -149,13 +149,21 @@
8
 
   &sasl_mutex_free
9
 
 };
10
 
 
11
 
-void sasl_set_mutex(sasl_mutex_alloc_t *n, sasl_mutex_lock_t *l,
12
 
-                   sasl_mutex_unlock_t *u, sasl_mutex_free_t *d)
13
 
+void sasl_set_mutex(sasl_mutex_alloc_t *n,
14
 
+                   sasl_mutex_lock_t *l,
15
 
+                   sasl_mutex_unlock_t *u,
16
 
+                   sasl_mutex_free_t *d)
17
 
 {
18
 
-  _sasl_mutex_utils.alloc=n;
19
 
-  _sasl_mutex_utils.lock=l;
20
 
-  _sasl_mutex_utils.unlock=u;
21
 
-  _sasl_mutex_utils.free=d;
22
 
+    /* Disallow mutex function changes once sasl_client_init
23
 
+       and/or sasl_server_init is called */
24
 
+    if (_sasl_server_cleanup_hook || _sasl_client_cleanup_hook) {
25
 
+       return;
26
 
+    }
27
 
+
28
 
+    _sasl_mutex_utils.alloc=n;
29
 
+    _sasl_mutex_utils.lock=l;
30
 
+    _sasl_mutex_utils.unlock=u;
31
 
+    _sasl_mutex_utils.free=d;
32
 
 }
33
 
 
34
 
 /* copy a string to malloced memory */