1994 1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009 <2010> 2011 2012 2013 2014 2015 2016 2017 2018 2019 2020 2021 2022 2023 2024 2025 | Index | 1994 1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009 <2010> 2011 2012 2013 2014 2015 2016 2017 2018 2019 2020 2021 2022 2023 2024 2025 |
<== Date ==> | <== Thread ==> |
---|
Subject: | RE: About PCAS Access Control |
From: | "Jeff Hill" <[email protected]> |
To: | 'åçä' <[email protected]>, "'tech-talk'" <[email protected]> |
Date: | Mon, 20 Dec 2010 11:03:01 -0700 |
Hi, Sorry about the delay responding , I took some âvacationâ time
to set some tile in the basement of my house. Ã Here is
my question. I want to add access control to my PCAS, Ã but I
do not know what the pUserName and pHostName in the à following
function refer to clearly. Ã virtual casChannel *createChannel ( const
casCtx &ctx,const à char * const pUserName,const char * const pHostName); à In the createChannel virtual member
function the pUserName argument is a constant nill terminated string which is the user name of the user account
the ca clientâs application is running under. In the createChannel
virtual member function the pHostName argument is a constant
nill terminated string which is the name (typically
the dns name) of the host the ca clientâs application
is running on. Ã In
"Channel Access Protable Server API
Tutorial" it said à that
points to a string representing the user's name
and pHostName à points to a
string representing the server tool's host. There
might be a documentation issue here. It should say that it is the host name (typically
the dns name) of the _clientâs_, and not the
serverâs, host. I created bug entry 692664 at the epics launchpad
site. Ã Ã For
example, I have à two EDM
clients application run on the same linux PC, does
the user's name à refer to
the PC name or something else. The
user name of the user account the client application runs on. Ã
William Lu wrote: Ã
Channel access security is better achieved by usnig the Ã
EPICS access security API. If you follow that
path, at Ã
some point in your pcas
code you will call Ã
asAddClient(&client,
member, asl, pUserName, pHostName), Ã
to which you pass the pUserName
and pHostName, as illustrated bellow: Yes, this is the typical approach - which causes access security
configuration of your service to be similar to, for example, an IOC or the ca
gateway. Jeff Message content: TSPA With sufficient
thrust, pigs fly just fine. However, this is not necessarily a
good idea. It is hard to be sure where they are going to land,
and it could be dangerous sitting under them as they fly
overhead. -- RFC 1925 From:
[email protected] [mailto:[email protected]] On Behalf
Of ??? Hi all, Here is my question. I want to
add access control to my PCAS, but I do not know what
the pUserName
and pHostName in the following function refer to clearly. virtual casChannel *createChannel ( const
casCtx &ctx,const char * const pUserName,const char * const pHostName); In "Channel Access Protable
Server API Tutorial" it said that
points to a string representing the user's name
and pHostName points to a string representing the
server tool's host. For example, I have two EDM clients application run on the
same linux PC, does the user's name refer to the PC name or something
else. I have implemented the
createChannel function and writeAccess function like this: casChannel *exPV::createChannel ( const casCtx &ctx, const char * const /*pUserName*/, const char * const /*pHostName*/) { return new exChannel ( ctx,"zhangyul","Administrator"); } /////////////////////////////////////////////////////////////////// bool exChannel::writeAccess () const { if (strcmp(User.string(), "zhangyul") == 0) return aitFalse; else return aitTrue; } However, I found that any client
could not write the PCAS's PV, I think my understanding is totally wrong about
user's name and the host name!! Thank you! Zhang Yuliang |