[Mono-list] Linux: RunAS with System.Diagnostics.Process fails

webman at manfbraun.de webman at manfbraun.de
Wed Jul 6 02:43:01 UTC 2016


Hi !

Not lucky with the answer - but really my thanks anyway!

Best regards,
Manfred


> -----Original Message-----
> From: mono-list-bounces at lists.ximian.com [mailto:mono-list-
> bounces at lists.ximian.com] On Behalf Of Robert Jordan
> Sent: Sunday, July 03, 2016 8:53 PM
> To: Mono-list at lists.ximian.com
> Subject: Re: [Mono-list] Linux: RunAS with System.Diagnostics.Process
fails
> 
> On 01.07.2016 01:17, webman at manfbraun.de wrote:
> > Hello !
> >
> > I am just trying this:
> >
> > Process p = new Process();
> > ProcessStartInfo psi = new ProcessStartInfo();
> > SecureString password = ReadPassword();
> > psi.UserName = args[0];
> > psi.FileName = args[1];
> > psi.UseShellExecute = false;
> > psi.Password = password;
> > .....
> >
> > This works naturally on Linux too - but the required user is NOT the
> > executing user of that process - it is the same as the starter.
> >
> > This looks like a bug in the mono classlib/runtime. It is not
> > a professional solution to run it via a "shell'ed" sudo.
> > What workarounds are availabe to solve this problem ?
> 
> Su/sudo is actually the one and only "professional" approach
> under Unix/Linux.
> 
> Any other way will eventually end up in reinventing su/sudo, which
> is pretty hard (security wise) to be implemented.
> 
> For a desktop application you may want to look at kdesu/kdesudo (KDE),
> gksu/gksudo (GNOME), beesu (Red Hat). For a console app: su/sudo.
> 
> Robert
> 
> 
> _______________________________________________
> Mono-list maillist  -  Mono-list at lists.ximian.com
> http://lists.ximian.com/mailman/listinfo/mono-list




More information about the Mono-list mailing list