[Mono-dev] Run process as a different user
Atsushi Eno
atsushi at ximian.com
Fri May 9 14:56:44 EDT 2008
The original question is how to do it "using framework 1.1".
Process.Start() with user information is only-2.0 feature, so
it is out of scope anyways.
I guess it can be done with sudo.
Atsushi Eno
Jacob Gladish wrote:
>
> Agreed assuming it was implemented. I tried a small test and it didn't
> work. Ultimately there's a call to CreateProcessWithLogonW which is
> implemented as
>
> gboolean CreateProcessWithLogonW (const gunichar2 *username,
> const gunichar2 *domain,
> const gunichar2 *password,
> const guint32 logonFlags,
> const gunichar2 *appname,
> const gunichar2 *cmdline,
> guint32 create_flags,
> gpointer environ,
> const gunichar2 *cwd,
> WapiStartupInfo *startup,
> WapiProcessInformation *process_info)
> {
> /* FIXME: use user information */
> return CreateProcess (appname, cmdline, NULL, NULL, FALSE,
> create_flags, environ, cwd, startup, process_info);
> }
> This is 1.9 source. I'm guessing this implies no go for 1.1 either.
>
>
>
> ----- Original Message ----
> From: Miguel Ángel Pérez <mangelp at gmail.com>
> To: "mono-devel-list at lists.ximian.com" <mono-devel-list at lists.ximian.com>
> Sent: Thursday, May 8, 2008 2:47:25 PM
> Subject: Re: [Mono-dev] Run process as a different user
>
> System.Diagnostics.Process is the way to go.
>
> Regards.
>
> 2008/5/7 pablosantosluac at terra.es <mailto:pablosantosluac at terra.es>
> <pablosantosluac at terra.es <mailto:pablosantosluac at terra.es>>:
>
> Hi,
>
> What's the best way to start a process as a different user in Mono/Linux
> using framework 1.1?
>
> Thanks,
>
> pablo
>
> _______________________________________________
> Mono-devel-list mailing list
> Mono-devel-list at lists.ximian.com
> <mailto:Mono-devel-list at lists.ximian.com>
> http://lists.ximian.com/mailman/listinfo/mono-devel-list
>
>
>
> Be a better friend, newshound, and know-it-all with Yahoo! Mobile. Try
> it now.
> <http://us.rd.yahoo.com/evt=51733/*http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ
> >
>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> Mono-devel-list mailing list
> Mono-devel-list at lists.ximian.com
> http://lists.ximian.com/mailman/listinfo/mono-devel-list
More information about the Mono-devel-list
mailing list