summaryrefslogtreecommitdiffstats
path: root/debian/patches/ITS-9413-fix-slap_parse_user.patch
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-06 01:23:54 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-06 01:23:54 +0000
commitfe2751bf1e0388ddfa3fdfa88ed70b2bc94e2173 (patch)
tree5f743c2fcc2c85b0363602a14ac3753bc5a19abc /debian/patches/ITS-9413-fix-slap_parse_user.patch
parentAdding upstream version 2.4.47+dfsg. (diff)
downloadopenldap-debian.tar.xz
openldap-debian.zip
Adding debian version 2.4.47+dfsg-3+deb10u7.debian/2.4.47+dfsg-3+deb10u7debian
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'debian/patches/ITS-9413-fix-slap_parse_user.patch')
-rw-r--r--debian/patches/ITS-9413-fix-slap_parse_user.patch38
1 files changed, 38 insertions, 0 deletions
diff --git a/debian/patches/ITS-9413-fix-slap_parse_user.patch b/debian/patches/ITS-9413-fix-slap_parse_user.patch
new file mode 100644
index 0000000..7d620e7
--- /dev/null
+++ b/debian/patches/ITS-9413-fix-slap_parse_user.patch
@@ -0,0 +1,38 @@
+From d169e7958a3e0dc70f59c8374bf8a59833b7bdd8 Mon Sep 17 00:00:00 2001
+From: Howard Chu <hyc@openldap.org>
+Date: Tue, 1 Dec 2020 19:03:24 +0000
+Subject: [PATCH] ITS#9413 fix slap_parse_user
+
+---
+ servers/slapd/saslauthz.c | 8 ++++----
+ 1 file changed, 4 insertions(+), 4 deletions(-)
+
+diff --git a/servers/slapd/saslauthz.c b/servers/slapd/saslauthz.c
+index 4a9420b37c..b17f34a211 100644
+--- a/servers/slapd/saslauthz.c
++++ b/servers/slapd/saslauthz.c
+@@ -156,10 +156,9 @@ int slap_parse_user( struct berval *id, struct berval *user,
+ user->bv_val++;
+ user->bv_len = id->bv_len - ( user->bv_val - id->bv_val );
+
+- mech->bv_val = ber_bvchr( id, '.' );
+- if ( !BER_BVISNULL( mech ) ) {
+- mech->bv_val[ 0 ] = '\0';
+- mech->bv_val++;
++ if ( id->bv_val[1] == '.' ) {
++ id->bv_val[1] = '\0';
++ mech->bv_val = id->bv_val + 2;
+ mech->bv_len = user->bv_val - mech->bv_val - 1;
+
+ realm->bv_val = ber_bvchr( mech, '/' );
+@@ -172,6 +171,7 @@ int slap_parse_user( struct berval *id, struct berval *user,
+ }
+
+ } else {
++ BER_BVZERO( mech );
+ BER_BVZERO( realm );
+ }
+
+--
+2.20.1
+