forked from pool/openldap2
Accepting request 618072 from home:stroeder:branches:network:ldap
Added 0001-ITS-8866-slapo-unique-to-return-filter-used-in-diagn.patch OBS-URL: https://build.opensuse.org/request/show/618072 OBS-URL: https://build.opensuse.org/package/show/network:ldap/openldap2?expand=0&rev=213
This commit is contained in:
parent
2338633266
commit
31a0656177
@ -0,0 +1,41 @@
|
||||
From 41458072b9aae81ebd7a45837c6ce376709fe907 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Michael=20Str=C3=B6der?= <michael@stroeder.com>
|
||||
Date: Wed, 20 Jun 2018 14:05:52 +0200
|
||||
Subject: [PATCH] ITS#8866 slapo-unique to return filter used in diagnostic
|
||||
message
|
||||
|
||||
---
|
||||
servers/slapd/overlays/unique.c | 9 +++++++--
|
||||
1 file changed, 7 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/servers/slapd/overlays/unique.c b/servers/slapd/overlays/unique.c
|
||||
index 9e8d3e3a5..41c698f47 100644
|
||||
--- a/servers/slapd/overlays/unique.c
|
||||
+++ b/servers/slapd/overlays/unique.c
|
||||
@@ -965,6 +965,8 @@ unique_search(
|
||||
slap_callback cb = { NULL, NULL, NULL, NULL }; /* XXX */
|
||||
unique_counter uq = { NULL, 0 };
|
||||
int rc;
|
||||
+ char *errmsg;
|
||||
+ int errmsgsize;
|
||||
|
||||
Debug(LDAP_DEBUG_TRACE, "==> unique_search %s\n", key->bv_val, 0, 0);
|
||||
|
||||
@@ -1009,9 +1011,12 @@ unique_search(
|
||||
Debug(LDAP_DEBUG_TRACE, "=> unique_search found %d records\n", uq.count, 0, 0);
|
||||
|
||||
if(uq.count) {
|
||||
+ errmsgsize = sizeof("non-unique attributes found with ") + key->bv_len;
|
||||
+ errmsg = ch_malloc(errmsgsize);
|
||||
+ snprintf( errmsg, errmsgsize, "non-unique attributes found with %s", key->bv_val );
|
||||
op->o_bd->bd_info = (BackendInfo *) on->on_info;
|
||||
- send_ldap_error(op, rs, LDAP_CONSTRAINT_VIOLATION,
|
||||
- "some attributes not unique");
|
||||
+ send_ldap_error(op, rs, LDAP_CONSTRAINT_VIOLATION, errmsg);
|
||||
+ ch_free(errmsg);
|
||||
return(rs->sr_err);
|
||||
}
|
||||
|
||||
--
|
||||
2.17.1
|
||||
|
@ -1,3 +1,10 @@
|
||||
-------------------------------------------------------------------
|
||||
Wed Jun 20 10:04:06 UTC 2018 - michael@stroeder.com
|
||||
|
||||
- Added a patch to let slapd return the uniqueness check filter
|
||||
used before constraint violation to the client
|
||||
0001-ITS-8866-slapo-unique-to-return-filter-used-in-diagn.patch
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Thu May 24 11:59:02 CEST 2018 - kukuk@suse.de
|
||||
|
||||
|
@ -56,6 +56,7 @@ Source14: slapd.service
|
||||
Source15: SuSEfirewall2.openldap
|
||||
Source16: sysconfig.openldap
|
||||
Source17: openldap_update_modules_path.sh
|
||||
Patch1: 0001-ITS-8866-slapo-unique-to-return-filter-used-in-diagn.patch
|
||||
Patch3: 0003-LDAPI-socket-location.dif
|
||||
Patch5: 0005-pie-compile.dif
|
||||
Patch6: 0006-No-Build-date-and-time-in-binaries.dif
|
||||
@ -253,6 +254,7 @@ gzip -k %{S:203}
|
||||
|
||||
# Unpack and patch OpenLDAP 2.4
|
||||
%setup -q -a 9 -n openldap-%{version_main}
|
||||
%patch1 -p1
|
||||
%patch3 -p1
|
||||
%patch5 -p1
|
||||
%patch6 -p1
|
||||
|
Loading…
Reference in New Issue
Block a user