PC Review


Reply
Thread Tools Rate Thread

Changing a Process's context

 
 
Day
Guest
Posts: n/a
 
      21st Feb 2007
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

 
Reply With Quote
 
 
 
 
jpuopolo
Guest
Posts: n/a
 
      21st Feb 2007
On Feb 21, 10:12 am, "Day" <duckey.robbin...@gmail.com> wrote:
> 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

 
Reply With Quote
 
Day
Guest
Posts: n/a
 
      22nd Feb 2007
On Feb 21, 5:18 pm, "jpuopolo" <puop...@gmail.com> wrote:
> On Feb 21, 10:12 am, "Day" <duckey.robbin...@gmail.com> wrote:
>
>
>
> > 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 useProcess.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 createdProcess).
> > Is there a way to do so without running the firstprocessunder the
> > privileged user's permissions? I can't access theProcess.Start inside
> > the dll. It's a Black Box to me).
> > A friend -strongly- suggested against fetching the dll'sprocess's
> > handle andchangingits permission thread-by-thread.

>
> > Thanks in advance!
> > ~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

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Using application context with multi worker process setting. nicerun Microsoft ASP .NET 1 18th Nov 2008 05:25 AM
Invoking System.Diagnostics.Process Start and changing the parent process Dax Microsoft C# .NET 2 31st Aug 2007 02:10 AM
determine ASP.NET worker process user context programatically? =?Utf-8?B?RGFubnkgTWlsbGVy?= Microsoft ASP .NET 3 3rd Oct 2005 12:44 PM
Process.Start - The requested lookup key was not found in any active activation context. Paul Aspinall Microsoft Dot NET Framework 1 10th Mar 2005 11:39 AM
ASP.NET worker process context and SQL authentication Dave Mehrtens Microsoft ASP .NET 4 19th Aug 2003 09:40 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 03:11 AM.