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: | About PCAS Access Control |
From: | "张玉亮" <[email protected]> |
To: | "tech-talk" <[email protected]> |
Date: | Tue, 14 Dec 2010 10:54:20 +0800 |
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 |