소스 검색

Resolves: 480384
Summary: Allow attribute aliases to be used as SUP attribute in attributetype definitions.

Nathan Kinder 17 년 전
부모
커밋
b9a1fee404
1개의 변경된 파일10개의 추가작업 그리고 1개의 파일을 삭제
  1. 10 1
      ldap/servers/slapd/schema.c

+ 10 - 1
ldap/servers/slapd/schema.c

@@ -3111,7 +3111,16 @@ at_sup_dependency_callback(struct asyntaxinfo *asi, void *arg)
             if(asi->asi_name != NULL) {
             if(asi->asi_name != NULL) {
                 if (strcasecmp (asi->asi_name, aew->sup ) == 0) {
                 if (strcasecmp (asi->asi_name, aew->sup ) == 0) {
                     aew->rc=0;
                     aew->rc=0;
-                }
+                } else if (asi->asi_aliases) {
+                   int i = 0;
+
+                    /* Loop through aliases to see if any match */
+                   for (i=0; asi->asi_aliases[i] != NULL; i++) {
+                       if (strcasecmp (asi->asi_aliases[i], aew->sup ) == 0) {
+                           aew->rc=0;
+                       }
+                   }
+		}
             }
             }
         }
         }
     }
     }