| View previous topic :: View next topic |
| Author |
Message |
nicolasr Guest
|
Posted: Thu Feb 08, 2007 12:27 am Post subject: asking for user credentials |
|
|
Hi,
I'm working on a DCOM server application that is accessed
by clients from remote machines. For this to work I had to
create a "mirror" user account on the machine the server runs
on for every client.
Since not every client should be able to access the same
information I want to check which client/user is currently
asking for a specific information.
Is there a way to find out which user account connected to
my server and called some function from within the function called?
thanks for any idea,
Nicolas |
|
| Back to top |
|
 |
Remy Lebeau (TeamB) Guest
|
Posted: Thu Feb 08, 2007 2:19 am Post subject: Re: asking for user credentials |
|
|
"nicolasr" <nicolasrREMOVETHISSPAMBLOCKER (AT) gmx (DOT) net> wrote in message
news:45ca1a56$1 (AT) newsgroups (DOT) borland.com...
| Quote: | Is there a way to find out which user account connected to
my server and called some function from within the function
called?
|
I was just looking for that exact same thing last week. I wanted my
COM out-of-process server to grab the Windows username of the calling
client inside one of my COM methods. I did not find anything definate
in that area. I did run across CoImpersonateClient(), hoping I could
impersonate the calling client and then use GetUserName(), but I do
not think it would work for me because the docs say
CoImpersonateClient() doesn't work for RPC_C_AUTHN_LEVEL_NONE
authentication, which I do use.
Gambit |
|
| Back to top |
|
 |
nicolasr Guest
|
Posted: Thu Feb 08, 2007 3:48 am Post subject: Re: asking for user credentials |
|
|
thanks Remy for your reply.
I will try what you suggested. Other things I found were
CoImpersonateClient
OpenThreadToken
GetTokenInformation
LookupAccountSid
or
CoQueryClientBlanket
but could get none of them consistently work yet.
Nicolas
| Quote: | I was just looking for that exact same thing last week. I wanted my
COM out-of-process server to grab the Windows username of the calling
client inside one of my COM methods. I did not find anything definate
in that area. I did run across CoImpersonateClient(), hoping I could
impersonate the calling client and then use GetUserName(), but I do
not think it would work for me because the docs say
CoImpersonateClient() doesn't work for RPC_C_AUTHN_LEVEL_NONE
authentication, which I do use.
Gambit
|
|
|
| Back to top |
|
 |
vavan Guest
|
Posted: Thu Feb 08, 2007 9:10 am Post subject: Re: asking for user credentials |
|
|
On Wed, 7 Feb 2007 19:27:56 +0100, "nicolasr"
<nicolasrREMOVETHISSPAMBLOCKER (AT) gmx (DOT) net> wrote:
| Quote: | Is there a way to find out which user account connected to
my server and called some function from within the function called?
|
I use CoQueryClientBlanket to identify calling client in my DCOM
servers
--
Vladimir Ulchenko aka vavan |
|
| Back to top |
|
 |
|