소스 검색

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 년 전
부모
커밋
dec2dda943
1개의 변경된 파일12개의 추가작업 그리고 0개의 파일을 삭제
  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 );
 					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);