Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Issue with service calling CreateProcessAsUser() when user logged on as Guest
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  2 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
alexsd  
View profile  
 More options Sep 3 2008, 5:10 pm
Newsgroups: microsoft.public.platformsdk.security
From: alexsd <ale...@gmail.com>
Date: Wed, 3 Sep 2008 14:10:05 -0700 (PDT)
Local: Wed, Sep 3 2008 5:10 pm
Subject: Issue with service calling CreateProcessAsUser() when user logged on as Guest
I've written a custom Vista Credential Provider to facilitate smart
card log on to Vista.

Because Vista CredProvs are destroyed when the user is successfully
logged on, I created a service to handle the smart card removal events
(lock, log off, shutdown).

Because the LockWorkStation() and ExitWindowsEx() are callable only by
processes running on the interactive desktop I was forced to make
those calls by using WTSGetActiveConsoleSessionId(),
WTSQueryUserToken(), DuplicateTokenEx(), CreateProcessAsUser() and
WaitForSingleObject().  The CreateProcessAsUser() calls the service's
executable with specific command line arguments that should handle the
smart card event.  All of this works perfectly when logged on as an
admin.  Unfortunately, when logged on as a user or guest account the
executable is never called even though the CreateProcessAsUser()
returns successfully and an error is produced.

The event viewer displays an Event ID: 1000 with an exception code of
0xc0000417, which translates to STATUS_INVALID_CRUNTIME_PARAMETER.
I've tried debugging the service with windbg, but that has proven
difficult when logged on with a guest account.

I don't understand how/why being logged on as a guest has any effect
on a service.  In Task Manager, my service's executable has User Name
SYSTEM, and Group N/A if that makes a difference.

I can provide source code if necessary.

Any ideas?


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
alexsd  
View profile  
 More options Sep 3 2008, 6:52 pm
Newsgroups: microsoft.public.platformsdk.security
From: alexsd <ale...@gmail.com>
Date: Wed, 3 Sep 2008 15:52:31 -0700 (PDT)
Local: Wed, Sep 3 2008 6:52 pm
Subject: Re: Issue with service calling CreateProcessAsUser() when user logged on as Guest
So I created a new exe to call from the CreateProcessAsUser() that
would handle the ExitWindows() & LockWorkstation(), to check if
calling those functions from a second instance of the service's exe
was causing the issue.

No game, I'm getting the same result.

It must be related to the way I'm calling CreateProcessAsUser() while
logged on as a Guest account.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »