Browse Source

Resolves: #456296
Summary: GER: attribute types which do not belong to an entry should not be returned with effective rights
Description: when an attribute was given to the search request and the attribute
in the list does not belong to the entry, it was returning "*:none", which was
not true. The star should be the attribute type.

Noriko Hosoi 17 years ago
parent
commit
dec2dda943
1 changed files with 12 additions and 0 deletions
  1. 12 0
      ldap/servers/plugins/acl/acleffectiverights.c

+ 12 - 0
ldap/servers/plugins/acl/acleffectiverights.c

@@ -666,6 +666,18 @@ _ger_get_attrs_rights (
 						gerstr, gerstrsize, gerstrcap, isfirstattr, errbuf );
 						gerstr, gerstrsize, gerstrcap, isfirstattr, errbuf );
 					isfirstattr = 0;
 					isfirstattr = 0;
 				}
 				}
+				else
+				{
+					/* if the attr does not belong to the entry,
+					   "<attr>:none" is returned */
+					if (!isfirstattr)
+					{
+						_append_gerstr(gerstr, gerstrsize, gerstrcap, ", ", NULL);
+					}
+					_append_gerstr(gerstr, gerstrsize, gerstrcap, attrs[i], ":");
+					_append_gerstr(gerstr, gerstrsize, gerstrcap, "none", NULL);
+					isfirstattr = 0;
+				}
 			}
 			}
 		}
 		}
 		charray_free(allattrs);
 		charray_free(allattrs);