Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 125861 Details for
Bug 186450
dev-libs/cyrus-sasl - multiple issues
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
0008_one_time_sasl_set_alloc.dpatch
0008_one_time_sasl_set_alloc.dpatch (text/plain), 2.70 KB, created by
Carsten Lohrke (RETIRED)
on 2007-07-24 11:06:59 UTC
(
hide
)
Description:
0008_one_time_sasl_set_alloc.dpatch
Filename:
MIME Type:
Creator:
Carsten Lohrke (RETIRED)
Created:
2007-07-24 11:06:59 UTC
Size:
2.70 KB
patch
obsolete
>#! /bin/sh /usr/share/dpatch/dpatch-run >## 0008_one_time_sasl_set_alloc.dpatch by <fabbe@debian.org> >## >## All lines beginning with `## DP:' are a description of the patch. >## DP: Make sasl_set_alloc a one-time function. >## DP: This patch will divert all allocations to whomever called >## DP: sasl_set_alloc first, hopefully that will be the application. If >## DP: not, we sure *hope* the library doing stupid things has sane >## DP: sasl_set_alloc semantics... >## DP: It will also deny any futher tries to sasl_set_alloc after one >## DP: of the _init functions are called. >## DP: This patch was introduced and works fine in SASL 1.5, and no >## DP: applications started behaving in insane ways, so chances are it >## DP: will also work with SASL 2.1 >## DP: Reference: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=139568 >## DP: Reference: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=274087 >## DP: Reference: https://bugzilla.andrew.cmu.edu/show_bug.cgi?id=2525 > > >@DPATCH@ >diff -urNad trunk~/lib/client.c trunk/lib/client.c >--- trunk~/lib/client.c 2006-05-29 22:52:46.000000000 +0300 >+++ trunk/lib/client.c 2006-07-31 18:48:58.000000000 +0300 >@@ -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 -urNad trunk~/lib/common.c trunk/lib/common.c >--- trunk~/lib/common.c 2006-05-29 22:52:46.000000000 +0300 >+++ trunk/lib/common.c 2006-07-31 18:48:58.000000000 +0300 >@@ -107,6 +107,7 @@ > (sasl_realloc_t *) &realloc, > (sasl_free_t *) &free > }; >+int _sasl_allocation_locked = 0; > > #define SASL_ENCODEV_EXTRA 4096 > >@@ -637,6 +638,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 -urNad trunk~/lib/saslint.h trunk/lib/saslint.h >--- trunk~/lib/saslint.h 2006-05-29 22:52:46.000000000 +0300 >+++ trunk/lib/saslint.h 2006-07-31 18:48:58.000000000 +0300 >@@ -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 -urNad trunk~/lib/server.c trunk/lib/server.c >--- trunk~/lib/server.c 2006-05-29 22:52:46.000000000 +0300 >+++ trunk/lib/server.c 2006-07-31 18:48:58.000000000 +0300 >@@ -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;
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 186450
:
125859
| 125861 |
125862