Login
[x]
Log in using an account from:
Fedora Account System
Red Hat Associate
Red Hat Customer
Or login using a Red Hat Bugzilla account
Forgot Password
Login:
Hide Forgot
Create an Account
Red Hat Bugzilla – Attachment 927455 Details for
Bug 1123778
[ACL] Python client demands unnecessary permission / performs unnecessary actions
[?]
New
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
|
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh83 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
This site requires JavaScript to be enabled to function correctly, please enable it.
[patch]
Patch proposal (not 100% ideal)
bz1123778.patch (text/plain), 3.66 KB, created by
Pavel Moravec
on 2014-08-17 12:26:44 UTC
(
hide
)
Description:
Patch proposal (not 100% ideal)
Filename:
MIME Type:
Creator:
Pavel Moravec
Created:
2014-08-17 12:26:44 UTC
Size:
3.66 KB
patch
obsolete
>Index: cpp/src/qpid/client/amqp0_10/AddressResolution.cpp >=================================================================== >--- cpp/src/qpid/client/amqp0_10/AddressResolution.cpp (revision 1617697) >+++ cpp/src/qpid/client/amqp0_10/AddressResolution.cpp (working copy) >@@ -700,12 +700,14 @@ > > bool isQueue(qpid::client::Session session, const qpid::messaging::Address& address) > { >+ QPID_LOG(notice, "PavelM: isQueue, address=" << address); > return address.getType() == QUEUE_ADDRESS || > (address.getType().empty() && session.queueQuery(address.getName()).getQueue() == address.getName()); > } > > bool isTopic(qpid::client::Session session, const qpid::messaging::Address& address) > { >+ QPID_LOG(notice, "PavelM: isTopic, address=" << address); > if (address.getType().empty()) { > return !session.exchangeQuery(address.getName()).getNotFound(); > } else if (address.getType() == TOPIC_ADDRESS) { >Index: python/qpid/messaging/driver.py >=================================================================== >--- python/qpid/messaging/driver.py (revision 1617701) >+++ python/qpid/messaging/driver.py (working copy) >@@ -122,9 +122,9 @@ > > self.destinations = {} > >- def write_query(self, query, handler): >+ def write_query(self, query, handler, obj): > id = self.sent >- self.write_cmd(query, lambda: handler(self.results.pop(id))) >+ self.write_cmd(query, lambda: handler(self.results.pop(id), obj)) > > def apply_overrides(self, cmd, overrides): > for k, v in overrides.items(): >@@ -1012,36 +1012,49 @@ > except KeyError: > pass > >- args = [] >- def do_result(r): >- args.append(r) >- def do_action(r): >- do_result(r) >- er, qr = args >- if node_type == "topic" and not er.not_found: >+ args = { "topic":None, "queue":None } >+ def do_result(r, obj): >+ args[obj] = r >+ def do_action(): >+ er = args["topic"] >+ qr = args["queue"] >+ if node_type == "topic" and er and not er.not_found: > type, subtype = "topic", er.type >- elif node_type == "queue" and qr.queue: >+ elif node_type == "queue" and qr and qr.queue: > type, subtype = "queue", None >- elif er.not_found and not qr.queue: >+ elif (er and er.not_found) and qr and not qr.queue: > type, subtype = None, None >- elif qr.queue: >+ elif (qr and qr.queue): > if node_type == "topic" and force: > type, subtype = None, None > else: > type, subtype = "queue", None >- elif not er.not_found: >+ elif (er and not er.not_found): > if node_type == "queue" and force: > type, subtype = None, None > else: > type, subtype = "topic", er.type >+ elif er: >+ type, subtype = "topic", er.type > else: >- type, subtype = "topic", er.type >+ type, subtype = None, None > if type is not None: > self.address_cache[name] = (type, subtype) > action(type, subtype) >- sst.write_query(ExchangeQuery(name), do_result) >- sst.write_query(QueueQuery(name), do_action) >+ def do_result_and_action(r, obj): >+ do_result(r, obj) >+ do_action() > >+ if (node_type is None): # we don't know the type, let check broker >+ sst.write_query(ExchangeQuery(name), do_result, "topic") >+ sst.write_query(QueueQuery(name), do_result_and_action, "queue") >+ elif force: # we forcefully declare known type, dont ask broker >+ do_action() >+ elif node_type == "topic": >+ sst.write_query(ExchangeQuery(name), do_result_and_action, "topic") >+ else: >+ sst.write_query(QueueQuery(name), do_action, "queue") >+ > def declare(self, sst, lnk, action, create_node): > name = lnk.name > props = lnk.options.get("node", {})
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 1123778
:
926687
|
927455
|
937991
|
1038103