diff options
author | Johnny Willemsen <jwillemsen@remedy.nl> | 2018-10-30 12:10:06 +0100 |
---|---|---|
committer | Johnny Willemsen <jwillemsen@remedy.nl> | 2018-10-30 12:10:06 +0100 |
commit | c6e382658aa985f4d2cbb8fb01037c954a31d5bf (patch) | |
tree | 36876761fcde6ef012a8b0621e2cd4eb85f95a5f /TAO/orbsvcs/tests | |
parent | be0958e97b739026684dd5bb3ebd2af92c6e46d3 (diff) | |
download | ATCD-c6e382658aa985f4d2cbb8fb01037c954a31d5bf.tar.gz |
Enable ssliop collocated invocation support
* TAO/orbsvcs/tests/Security/ssliop_corbaloc/client.cpp:
Diffstat (limited to 'TAO/orbsvcs/tests')
-rw-r--r-- | TAO/orbsvcs/tests/Security/ssliop_corbaloc/client.cpp | 19 |
1 files changed, 16 insertions, 3 deletions
diff --git a/TAO/orbsvcs/tests/Security/ssliop_corbaloc/client.cpp b/TAO/orbsvcs/tests/Security/ssliop_corbaloc/client.cpp index d697299e37b..bce3bba7b98 100644 --- a/TAO/orbsvcs/tests/Security/ssliop_corbaloc/client.cpp +++ b/TAO/orbsvcs/tests/Security/ssliop_corbaloc/client.cpp @@ -12,12 +12,10 @@ */ //============================================================================= - #include "client.h" #include "tao/debug.h" #include "ace/Get_Opt.h" - - +#include <orbsvcs/SecurityLevel2C.h> #if defined (_MSC_VER) # pragma warning (disable : 4250) @@ -216,6 +214,21 @@ CosNaming_Client::init (int argc, ACE_TCHAR **argv) return -1; CORBA::ORB_var orb = this->orbmgr_.orb (); + + // In order to allow collocated invocations we need to allow unsecured + // collocated invocations to the object else our security manager will + // block the collocated invocation unless you explicitly allow it + CORBA::Object_var sec_man = + orb->resolve_initial_references ("SecurityLevel2:SecurityManager"); + SecurityLevel2::SecurityManager_var sec2manager = + SecurityLevel2::SecurityManager::_narrow (sec_man.in ()); + SecurityLevel2::AccessDecision_var ad_tmp = + sec2manager->access_decision (); + TAO::SL2::AccessDecision_var ad = + TAO::SL2::AccessDecision::_narrow (ad_tmp.in ()); + // Allow unsecured collocated invocations + ad->default_collocated_decision (true); + return this->naming_client_.init (orb.in ()); } catch (const CORBA::Exception& ex) |