zrhoffman / rpms / 389-ds-base

Forked from rpms/389-ds-base 3 years ago
Clone

Blame SOURCES/0051-Ticket-47757-Unable-to-dereference-unqiemember-attri.patch

a2f18f
From ba9f2607b8bf565e2f6d1f8751c16c0b485a7210 Mon Sep 17 00:00:00 2001
a2f18f
From: Noriko Hosoi <nhosoi@redhat.com>
a2f18f
Date: Mon, 24 Aug 2015 16:13:12 -0700
a2f18f
Subject: [PATCH 51/52] Ticket #47757 - Unable to dereference unqiemember
a2f18f
 attribute because it is dn [#UID] not dn syntax
a2f18f
a2f18f
Description: In addtion to DN syntax, adding Name and Optional UID
a2f18f
syntax to the deref attr's OID check.
a2f18f
a2f18f
https://fedorahosted.org/389/ticket/47757
a2f18f
a2f18f
Reviewed by mreynolds@redhat.com (Thank you, Mark!!)
a2f18f
a2f18f
(cherry picked from commit 2dbbb9df4691590f788049a822c47eb501182c85)
a2f18f
(cherry picked from commit 626f2d7060390a3234ebb50b92937d1ec5a89481)
a2f18f
---
a2f18f
 ldap/servers/plugins/deref/deref.c | 5 ++++-
a2f18f
 1 file changed, 4 insertions(+), 1 deletion(-)
a2f18f
a2f18f
diff --git a/ldap/servers/plugins/deref/deref.c b/ldap/servers/plugins/deref/deref.c
a2f18f
index 35c2564..f476a4d 100644
a2f18f
--- a/ldap/servers/plugins/deref/deref.c
a2f18f
+++ b/ldap/servers/plugins/deref/deref.c
a2f18f
@@ -20,6 +20,9 @@
a2f18f
 #ifndef DN_SYNTAX_OID
a2f18f
 #define DN_SYNTAX_OID "1.3.6.1.4.1.1466.115.121.1.12"
a2f18f
 #endif
a2f18f
+#ifndef NAME_AND_OPTIONAL_UID_SYNTAX_OID
a2f18f
+#define NAME_AND_OPTIONAL_UID_SYNTAX_OID "1.3.6.1.4.1.1466.115.121.1.34"
a2f18f
+#endif
a2f18f
 
a2f18f
 /*
a2f18f
  * Plug-in globals
a2f18f
@@ -290,7 +293,7 @@ deref_check_for_dn_syntax(const char *derefattr)
a2f18f
 
a2f18f
         slapi_attr_init(attr, derefattr);
a2f18f
         slapi_attr_get_syntax_oid_copy(attr, &oid;;
a2f18f
-        ret = oid && !strcmp(oid, DN_SYNTAX_OID);
a2f18f
+        ret = oid && (!strcmp(oid, DN_SYNTAX_OID) || !strcmp(oid, NAME_AND_OPTIONAL_UID_SYNTAX_OID));
a2f18f
         slapi_ch_free_string(&oid;;
a2f18f
         slapi_attr_free(&attr);
a2f18f
     }
a2f18f
-- 
a2f18f
1.9.3
a2f18f