Skip to content

Commit

Permalink
Fix: xml: Only test write permissions for attributes that are being c…
Browse files Browse the repository at this point in the history
…hanged
  • Loading branch information
beekhof committed Mar 4, 2014
1 parent a802f9a commit 07609cf
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions lib/common/xml.c
Original file line number Diff line number Diff line change
Expand Up @@ -2290,10 +2290,6 @@ crm_xml_add(xmlNode * node, const char *name, const char *value)
return value);
}
#endif
if(__xml_acl_check(node, name, xpf_acl_create) == FALSE) {
crm_trace("Cannot add %s=%s to %s", name, value, node->name);
return NULL;
}

if(TRACKING_CHANGES(node)) {
const char *old = crm_element_value(node, name);
Expand All @@ -2303,6 +2299,11 @@ crm_xml_add(xmlNode * node, const char *name, const char *value)
}
}

if(dirty && __xml_acl_check(node, name, xpf_acl_create) == FALSE) {
crm_trace("Cannot add %s=%s to %s", name, value, node->name);
return NULL;
}

attr = xmlSetProp(node, (const xmlChar *)name, (const xmlChar *)value);
if(dirty) {
crm_attr_dirty(attr);
Expand Down

0 comments on commit 07609cf

Please sign in to comment.