1
#! /bin/sh /usr/share/dpatch/dpatch-run
2
## 0021_no_mutex_changes_after_init.dpatch by <fabbe@paniq.net>
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.
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
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)
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) {
23
_sasl_mutex_utils.alloc=n;
24
_sasl_mutex_utils.lock=l;
25
_sasl_mutex_utils.unlock=u;