File tree Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -1020,13 +1020,16 @@ __xml_acl_post_process(xmlNode * xml)
1020
1020
1021
1021
if (is_set (p -> flags , xpf_created )) {
1022
1022
xmlAttr * xIter = NULL ;
1023
+ char * path = xml_get_path (xml );
1023
1024
1024
- /* Always allow new scaffolding, ie. node with no attributes or only an 'id' */
1025
+ /* Always allow new scaffolding, ie. node with no attributes or only an 'id'
1026
+ * Except in the ACLs section
1027
+ */
1025
1028
1026
1029
for (xIter = crm_first_attr (xml ); xIter != NULL ; xIter = xIter -> next ) {
1027
1030
const char * prop_name = (const char * )xIter -> name ;
1028
1031
1029
- if (strcmp (prop_name , XML_ATTR_ID ) == 0 ) {
1032
+ if (strcmp (prop_name , XML_ATTR_ID ) == 0 && strstr ( path , "/" XML_CIB_TAG_ACLS "/" ) == NULL ) {
1030
1033
/* Delay the acl check */
1031
1034
continue ;
1032
1035
@@ -1035,7 +1038,6 @@ __xml_acl_post_process(xmlNode * xml)
1035
1038
break ;
1036
1039
1037
1040
} else {
1038
- char * path = xml_get_path (xml );
1039
1041
crm_trace ("Cannot add new node %s at %s" , crm_element_name (xml ), path );
1040
1042
1041
1043
if (xml != xmlDocGetRootElement (xml -> doc )) {
@@ -1046,6 +1048,7 @@ __xml_acl_post_process(xmlNode * xml)
1046
1048
return ;
1047
1049
}
1048
1050
}
1051
+ free (path );
1049
1052
}
1050
1053
1051
1054
while (cIter != NULL ) {
You can’t perform that action at this time.
0 commit comments