summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNoriko Hosoi <nhosoi@redhat.com>2008-07-31 21:27:26 +0000
committerNoriko Hosoi <nhosoi@redhat.com>2008-07-31 21:27:26 +0000
commite0e27852ef4127538d16a7571411b96e9b0d5ca6 (patch)
treef10cd054fa00fe867f9f5b754ed327528a043584
parentd8e44a8103bbd02010a53e528a0349abcb53e167 (diff)
downloadds-e0e27852ef4127538d16a7571411b96e9b0d5ca6.tar.gz
ds-e0e27852ef4127538d16a7571411b96e9b0d5ca6.tar.xz
ds-e0e27852ef4127538d16a7571411b96e9b0d5ca6.zip
Resolves: #457156
Summary: GER: allow GER for non-existing entries (phase 2) (comment #6) Description: additional fix for the previous checkin. Not just checking if dn is NULL or not, but also checking the length of dn is greater than 0. If both conditions are satisfied, locate the template entry at the dn.
-rw-r--r--ldap/servers/plugins/acl/acleffectiverights.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/ldap/servers/plugins/acl/acleffectiverights.c b/ldap/servers/plugins/acl/acleffectiverights.c
index 18f04681..6c73862c 100644
--- a/ldap/servers/plugins/acl/acleffectiverights.c
+++ b/ldap/servers/plugins/acl/acleffectiverights.c
@@ -873,8 +873,16 @@ _ger_generate_template_entry (
siz += 32 + strlen(object);
}
templateentry = (char *)slapi_ch_malloc(siz);
- PR_snprintf(templateentry, siz,
- "dn: cn=template_%s_objectclass%s%s\n", object, dn?",":"", dn?dn:"");
+ if (NULL != dn && strlen(dn) > 0)
+ {
+ PR_snprintf(templateentry, siz,
+ "dn: cn=template_%s_objectclass,%s\n", object, dn);
+ }
+ else
+ {
+ PR_snprintf(templateentry, siz,
+ "dn: cn=template_%s_objectclass\n", object);
+ }
for (--i; i >= 0; i--)
{
len = strlen(templateentry);