[Mono-bugs] [Bug 406642] New: System.Diagnostic.Process doesn't use credential info

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Sun Jul 6 15:15:33 EDT 2008


https://bugzilla.novell.com/show_bug.cgi?id=406642


           Summary: System.Diagnostic.Process doesn't use credential info
           Product: Mono: Class Libraries
           Version: SVN
          Platform: i686
        OS/Version: Linux
            Status: NEW
          Severity: Normal
          Priority: P5 - None
         Component: System
        AssignedTo: mono-bugs at lists.ximian.com
        ReportedBy: surfzoid2002 at yahoo.fr
         QAContact: mono-bugs at lists.ximian.com
          Found By: DeveloperNet


Hi
After trying all the day to start a process as root i think there is a litle
bug, this code below should start xterm as root user after yu will enter the
good password in the code (this code work great under windows if yu start
notepad as administrator) :

                Process VBmProcess = new Process();

                VBmProcess.StartInfo.FileName = "xterm";

                VBmProcess.StartInfo.UserName = "root";

                VBmProcess.StartInfo.UseShellExecute = false;

                VBmProcess.StartInfo.WorkingDirectory = "/usr/bin";

                VBmProcess.StartInfo.Arguments = "";

                VBmProcess.StartInfo.Domain = "my machine name";

                VBmProcess.StartInfo.CreateNoWindow = true;

                VBmProcess.StartInfo.WindowStyle = ProcessWindowStyle.Hidden;



                System.Security.SecureString SecPass = new
System.Security.SecureString();



                foreach (char unChar in "my root password")

                {

                    SecPass.AppendChar(unChar);

                }

                VBmProcess.StartInfo.Password = SecPass;



                VBmProcess.Start();

                VBmProcess.WaitForExit();


-- 
Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
You are the assignee for the bug.


More information about the mono-bugs mailing list