Changing a Process's context

D

Day

Hello!
I'm programming in C# on .NET 2.0, Windows XP SP2.
I'm using a third party's DLL in an environment that limits access to
the hard drives save for a single, set user (recognized to access the
drives by name).
The dll functions use Process.Start and run under the logged on User's
context, but I need them to run under those those of the privileged
user's. (I tried using Impersonation, but it only affects the thread
and thus doesn't affect the created Process).
Is there a way to do so without running the first process under the
privileged user's permissions? I can't access the Process.Start inside
the dll. It's a Black Box to me).
A friend -strongly- suggested against fetching the dll's process's
handle and changing its permission thread-by-thread.

Thanks in advance!
~Day
 
J

jpuopolo

Hello!
I'm programming in C# on .NET 2.0, Windows XP SP2.
I'm using a third party's DLL in an environment that limits access to
the hard drives save for a single, set user (recognized to access the
drives by name).
The dll functions use Process.Start and run under the logged on User's
context, but I need them to run under those those of the privileged
user's. (I tried using Impersonation, but it only affects the thread
and thus doesn't affect the created Process).
Is there a way to do so without running the first process under the
privileged user's permissions? I can't access the Process.Start inside
the dll. It's a Black Box to me).
A friend -strongly- suggested against fetching the dll's process's
handle and changing its permission thread-by-thread.

Thanks in advance!
~Day


Have you considered loading the DLL Into an AppDomain, providing the
domain with the security context you need?

jpuopolo
 
D

Day

Have you considered loading the DLL Into an AppDomain, providing the
domain with the securitycontextyou need?

jpuopolo

..The problem is that I don't have the privileged user's password, nor
necessarilly his domain... Or his name for the matter.
My program is a client side program that gets the user's details
encrypted from the server and only uses it when necessary, so loading
DLLs is a bit tricky like that as far as I know.
I'll try looking into it a bit more, but I'll appriciate it if you
could give me at least some buzzwords to look into :)

~Day
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top