mirror of
https://github.com/genodelabs/genode.git
synced 2024-12-18 13:26:27 +00:00
genode_c_api/usb: no policy check in session create
Fix genodelabs/genode#5357
This commit is contained in:
parent
700b248749
commit
a148dc5cb4
@ -1521,18 +1521,13 @@ Session_component * ::Root::_create_session(const char * args,
|
||||
{
|
||||
Session_component * sc = nullptr;
|
||||
try {
|
||||
Session_label const label { session_label_from_args(args) };
|
||||
Session_policy const policy { label, _config.xml() };
|
||||
Session_label const label { session_label_from_args(args) };
|
||||
|
||||
sc = new (md_alloc())
|
||||
Session_component(_env, *this, _sessions, _devices, _config,
|
||||
_sigh_cap, _alloc_fn, _free_fn, _release_fn,
|
||||
label, session_resources_from_args(args),
|
||||
session_diag_from_args(args));
|
||||
} catch (Session_policy::No_policy_defined) {
|
||||
error("Invalid session request, no matching policy for ",
|
||||
"'", label_from_args(args).string(), "'");
|
||||
throw Service_denied();
|
||||
} catch (...) {
|
||||
if (sc) { Genode::destroy(md_alloc(), sc); }
|
||||
throw;
|
||||
|
Loading…
Reference in New Issue
Block a user