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

« back to all changes in this revision

Viewing changes to debian/patches/0021_no_mutex_changes_after_init.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
## 0021_no_mutex_changes_after_init.dpatch by  <fabbe@paniq.net>
 
3
##
 
4
## All lines beginning with `## DP:' are a description of the patch.
 
5
## DP: Disallow mutex function changes once sasl_client_init and/or
 
6
## DP: sasl_server_init is called. Hand-picked and applied change
 
7
## DP: from upstream CVS revision 1.117.
 
8
 
 
9
@DPATCH@
 
10
diff -urNad trunk~/lib/common.c trunk/lib/common.c
 
11
--- trunk~/lib/common.c 2006-06-04 12:26:18.000000000 +0300
 
12
+++ trunk/lib/common.c  2009-01-18 10:59:24.000000000 +0200
 
13
@@ -152,6 +152,12 @@
 
14
 void sasl_set_mutex(sasl_mutex_alloc_t *n, sasl_mutex_lock_t *l,
 
15
                    sasl_mutex_unlock_t *u, sasl_mutex_free_t *d)
 
16
 {
 
17
+       /* Disallow mutex function changes once sasl_client_init
 
18
+          and/or sasl_server_init is called */
 
19
+       if (_sasl_server_cleanup_hook || _sasl_client_cleanup_hook) {
 
20
+               return;
 
21
+       }
 
22
+
 
23
   _sasl_mutex_utils.alloc=n;
 
24
   _sasl_mutex_utils.lock=l;
 
25
   _sasl_mutex_utils.unlock=u;