Using Restricted SIDs in CreateRestrictedToken causes CreateProcessAsUser to give error - "Application failed to initialize properly"

Tech-Archive recommends: Fix windows errors by optimizing your registry



Hi,

I am having a wierd requirement which says that:

When a user 'X' uses my application, he should not get access to some
drives and folders.

Normally, outside my application, he should get access to these
partitions and folders.

Or in other words, he should be restricted in my application.

I found one way of doing it using "CreateRestrictedToken".

Steps that I followed:
1. Created a restricted user account say 'Y'.
2. Added "Access Deny" ACE's for user 'Y' on the objects that were to
be restricted from my application.
3. Used CreateRestrictedToken to create a restricted token from the
access token of user 'X' by adding the SID of the user 'Y' in the
restricted SIDs list.
4. Used the restricted token in CreateProcessAsUser to launch my
application.

Here, CreateProcessAsUser is successfull in launching my application,
but, it fails to initialize with error - "Application Failed to
Initialize Properly".

Any Idea, why is this happening?

Thanks,
Rajesh

.



Relevant Pages

  • Re: SBS 2003 C: drive creeping disk space consumption
    ... These folders contain the uninstallation files for these Windows Updates ... This newsgroup only focuses on SBS technical issues. ... newsgroups so that they can be resolved in an efficient and timely manner. ... and the paging file to other drives on the machine". ...
    (microsoft.public.windows.server.sbs)
  • Re: SBS 2003 C: drive creeping disk space consumption
    ... Your confirmation that the server is writing to many log files was helpful ... I understand that on the SBS 2K3 SP1 Server, you notice the C drive is ... we can move some data folders to another drive. ... and the paging file to other drives on the machine". ...
    (microsoft.public.windows.server.sbs)
  • RE: Designing file server file/folder structure.
    ... Hey Nick, I find this quite difficult to implement easily and ... security groups so that at some level it's easy for the logon script. ... 'special' case sec groups so that they can have access to other dept drives ... or just certain folders within other depts' drives. ...
    (Security-Basics)
  • Re: Booting frm D drive instead of C Drive
    ... Search in "My Computer" reveals all same files as in Local Hard Drives search. ... In Windows Explorer try searching My Computer for boot.ini. ... Search System Folders, ... You can access Event Viewer by selecting Start, Control Panel, ...
    (microsoft.public.windowsxp.help_and_support)
  • Re: "Prison Break" 9/11First Down (Spoiler)
    ... each with a tag that has a name on it.. ... the original folders documents? ... through the sectors and bytes altering the physical data of the file. ... year that gets harder as hard drives increase in size. ...
    (rec.arts.tv)