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