浏览代码

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 (strcasecmp (asi->asi_name, aew->sup ) == 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;
+                       }
+                   }
+		}
             }
         }
     }