summaryrefslogtreecommitdiff
path: root/src/bus-proxyd/bus-policy.c
diff options
context:
space:
mode:
authorKay Sievers <kay@vrfy.org>2014-06-16 16:03:30 +0200
committerKay Sievers <kay@vrfy.org>2014-06-16 16:04:18 +0200
commitba98e746e63d749ab2bf84c9e050206468019b7f (patch)
tree93dc2324146562f905ad36478eaf09b8752d088b /src/bus-proxyd/bus-policy.c
parent5a85ca1cb622fda4a39c8a6f00dccea7f8a1e82a (diff)
bus-proxy: policy - ignore unsupported tags and attributes
Diffstat (limited to 'src/bus-proxyd/bus-policy.c')
-rw-r--r--src/bus-proxyd/bus-policy.c17
1 files changed, 14 insertions, 3 deletions
diff --git a/src/bus-proxyd/bus-policy.c b/src/bus-proxyd/bus-policy.c
index c23d394cb2..3f1d7557c1 100644
--- a/src/bus-proxyd/bus-policy.c
+++ b/src/bus-proxyd/bus-policy.c
@@ -155,7 +155,10 @@ static int file_load(Policy *p, const char *path) {
else if (streq(name, "group"))
state = STATE_POLICY_GROUP;
else {
- log_warning("Attribute %s of <policy> tag unknown at %s:%u, ignoring.", name, path, line);
+ if (streq(name, "at_console"))
+ log_debug("Attribute %s of <policy> tag unsupported at %s:%u, ignoring.", name, path, line);
+ else
+ log_warning("Attribute %s of <policy> tag unknown at %s:%u, ignoring.", name, path, line);
state = STATE_POLICY_OTHER_ATTRIBUTE;
}
} else if (t == XML_TAG_CLOSE_EMPTY ||
@@ -268,7 +271,12 @@ static int file_load(Policy *p, const char *path) {
ic = POLICY_ITEM_USER;
else if (streq(name, "group"))
ic = POLICY_ITEM_GROUP;
- else {
+ else if (streq(name, "eavesdrop")) {
+ log_debug("Unsupported attribute %s= at %s:%u, ignoring.", name, path, line);
+ i->class = POLICY_ITEM_IGNORE;
+ state = STATE_ALLOW_DENY_OTHER_ATTRIBUTE;
+ break;
+ } else {
log_error("Unknown attribute %s= at %s:%u, ignoring.", name, path, line);
state = STATE_ALLOW_DENY_OTHER_ATTRIBUTE;
break;
@@ -303,7 +311,10 @@ static int file_load(Policy *p, const char *path) {
(streq(u, "sender") && ic == POLICY_ITEM_RECV))
state = STATE_ALLOW_DENY_NAME;
else {
- log_error("Unknown attribute %s= at %s:%u, ignoring.", name, path, line);
+ if (streq(u, "requested_reply"))
+ log_debug("Unsupported attribute %s= at %s:%u, ignoring.", name, path, line);
+ else
+ log_error("Unknown attribute %s= at %s:%u, ignoring.", name, path, line);
state = STATE_ALLOW_DENY_OTHER_ATTRIBUTE;
break;
}