You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@qpid.apache.org by ch...@apache.org on 2016/03/23 23:06:19 UTC
qpid-dispatch git commit: Deny links after being disapproved. Deny
receivers with blank source.
Repository: qpid-dispatch
Updated Branches:
refs/heads/crolke-DISPATCH-188-1 0c42e76b6 -> de2ff34b1
Deny links after being disapproved. Deny receivers with blank source.
Project: http://git-wip-us.apache.org/repos/asf/qpid-dispatch/repo
Commit: http://git-wip-us.apache.org/repos/asf/qpid-dispatch/commit/de2ff34b
Tree: http://git-wip-us.apache.org/repos/asf/qpid-dispatch/tree/de2ff34b
Diff: http://git-wip-us.apache.org/repos/asf/qpid-dispatch/diff/de2ff34b
Branch: refs/heads/crolke-DISPATCH-188-1
Commit: de2ff34b1b030fe5593a6ab41a4327c726daa5c2
Parents: 0c42e76
Author: Chuck Rolke <cr...@redhat.com>
Authored: Wed Mar 23 18:04:58 2016 -0400
Committer: Chuck Rolke <cr...@redhat.com>
Committed: Wed Mar 23 18:04:58 2016 -0400
----------------------------------------------------------------------
src/policy.c | 12 ++++++++++--
1 file changed, 10 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/qpid-dispatch/blob/de2ff34b/src/policy.c
----------------------------------------------------------------------
diff --git a/src/policy.c b/src/policy.c
index 58967ef..3094aa2 100644
--- a/src/policy.c
+++ b/src/policy.c
@@ -660,6 +660,9 @@ bool qd_policy_approve_amqp_receiver_link(pn_link_t *pn_link, qd_connection_t *q
"Approve dynamic source for user '%s': %s",
username, (lookup ? "ALLOW" : "DENY"));
// Dynamic source policy rendered the decision
+ if (!lookup) {
+ _qd_policy_deny_amqp_receiver_link(pn_link, qd_conn);
+ }
return lookup;
}
const char * source = pn_terminus_get_address(pn_link_remote_source(pn_link));
@@ -676,8 +679,13 @@ bool qd_policy_approve_amqp_receiver_link(pn_link_t *pn_link, qd_connection_t *q
return false;
}
} else {
- // HACK ALERT: A receiver with no remote source.
- // This happens all the time with dynamic source
+ // A receiver with no remote source.
+ qd_log(qd_conn->server->qd->policy->log_source, QD_LOG_TRACE,
+ "Approve receiver link '' for user '%s': DENY",
+ username);
+
+ _qd_policy_deny_amqp_receiver_link(pn_link, qd_conn);
+ return false;
}
return true;
}
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@qpid.apache.org
For additional commands, e-mail: commits-help@qpid.apache.org