Re: [Mono-list] Can't launch processes as normal user

2003-03-13 Thread Pablo Baena




Wow! It worked! Now I no longer see that warning and the processes run for everybody!

Thank you


On Thu, 2003-03-13 at 22:44, Gonzalo Paniagua Javier wrote:

El jue, 13 de 03 de 2003 a las 20:07, Pablo Baena escribió:
> Oh boy! Now I can't even launch the processes as root! It stopped
> working after a reboot! :(
> 
> When executing:  './ptest.exe ls .' the output is:
> 
> 
>  ** (./ptest.exe:745): WARNING **: Shared memory sanity check failed.
>  
> ** (./ptest.exe:745): WARNING **: Failed to attach shared memory! Falling back to non-shared handles
> RC: 136643012 The output is:

Try removing the $HOME/.wapi directory for both, root and the user.

-Gonzalo


___
Mono-list maillist  -  [EMAIL PROTECTED]
http://lists.ximian.com/mailman/listinfo/mono-list




-- 
Pablo Baena <[EMAIL PROTECTED]>








Re: [Mono-list] Can't launch processes as normal user

2003-03-13 Thread Gonzalo Paniagua Javier
El jue, 13 de 03 de 2003 a las 20:07, Pablo Baena escribió:
> Oh boy! Now I can't even launch the processes as root! It stopped
> working after a reboot! :(
> 
> When executing:  './ptest.exe ls .' the output is:
> 
> 
>  ** (./ptest.exe:745): WARNING **: Shared memory sanity check failed.
>  
> ** (./ptest.exe:745): WARNING **: Failed to attach shared memory! Falling back to 
> non-shared handles
> RC: 136643012 The output is:

Try removing the $HOME/.wapi directory for both, root and the user.

-Gonzalo


___
Mono-list maillist  -  [EMAIL PROTECTED]
http://lists.ximian.com/mailman/listinfo/mono-list


Re: [Mono-list] Can't launch processes as normal user

2003-03-13 Thread Pablo Baena




Oh boy! Now I can't even launch the processes as root! It stopped working after a reboot! 

When executing:  './ptest.exe ls .' the output is:

 
** (./ptest.exe:745): WARNING **: Shared memory sanity check failed.
 
** (./ptest.exe:745): WARNING **: Failed to attach shared memory! Falling back to non-shared handles
RC: 136643012 The output is:
 

Attached is the strace output for my test. It looks different now. I remember that I tried strace with other mono versions and it said something about get_uid or something like that, now it shows something really strange.

Thank you!!

On Thu, 2003-03-13 at 19:18, Gonzalo Paniagua Javier wrote:

El jue, 13 de 03 de 2003 a las 16:23, Pablo Baena escribió:
> as user, shows nothing, but running it as root shows the contents of
> the directory. It is just an example, I tried to see if it actually
> executes the command, and it doesn't as user.
> 
> I tried all the versions of mono from 0.19 to 0.23 and none of them
> worked.
> 
> Again: is this a bug or a new policy?

It works fine for me. Try the attached program (run it like 'mono
ptest.exe binary_program args to binary program').

-Gonzalo




-- 
Pablo Baena <[EMAIL PROTECTED]>






<>execve("./test.exe", ["./test.exe", "2"], [/* 25 vars */]) = 0
uname({sys="Linux", node="hal", ...})   = 0
brk(0)  = 0x8149be8
access("/etc/ld.so.nohwcap", F_OK)  = -1 ENOENT (No such file or directory)
open("/etc/ld.so.preload", O_RDONLY)= -1 ENOENT (No such file or directory)
open("/etc/ld.so.cache", O_RDONLY)  = 3
fstat64(3, {st_mode=S_IFREG|0644, st_size=76737, ...}) = 0
old_mmap(NULL, 76737, PROT_READ, MAP_PRIVATE, 3, 0) = 0x40012000
close(3)= 0
open("/lib/libdl.so.2", O_RDONLY)   = 3
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0S\27\0\000"..., 1024) = 1024
fstat64(3, {st_mode=S_IFREG|0644, st_size=7992, ...}) = 0
old_mmap(NULL, 10924, PROT_READ|PROT_EXEC, MAP_PRIVATE, 3, 0) = 0x40025000
mprotect(0x40027000, 2732, PROT_NONE)   = 0
old_mmap(0x40027000, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED, 3, 0x1000) = 
0x40027000
close(3)= 0
open("/usr/lib/libgmodule-2.0.so.0", O_RDONLY) = 3
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0\264\16"..., 1024) = 1024
fstat64(3, {st_mode=S_IFREG|0644, st_size=10184, ...}) = 0
old_mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 
0x40028000
old_mmap(NULL, 13244, PROT_READ|PROT_EXEC, MAP_PRIVATE, 3, 0) = 0x40029000
mprotect(0x4002c000, 956, PROT_NONE)= 0
old_mmap(0x4002c000, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED, 3, 0x2000) = 
0x4002c000
close(3)= 0
open("/usr/lib/libglib-2.0.so.0", O_RDONLY) = 3
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0X\275\0"..., 1024) = 1024
fstat64(3, {st_mode=S_IFREG|0644, st_size=402376, ...}) = 0
old_mmap(NULL, 401348, PROT_READ|PROT_EXEC, MAP_PRIVATE, 3, 0) = 0x4002d000
mprotect(0x4008e000, 4036, PROT_NONE)   = 0
old_mmap(0x4008e000, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED, 3, 0x61000) = 
0x4008e000
close(3)= 0
open("/lib/libm.so.6", O_RDONLY)= 3
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0\2605\0"..., 1024) = 1024
fstat64(3, {st_mode=S_IFREG|0644, st_size=130964, ...}) = 0
old_mmap(NULL, 133536, PROT_READ|PROT_EXEC, MAP_PRIVATE, 3, 0) = 0x4008f000
mprotect(0x400af000, 2464, PROT_NONE)   = 0
old_mmap(0x400af000, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED, 3, 0x1f000) = 
0x400af000
close(3)= 0
open("/usr/lib/libgc.so.6", O_RDONLY)   = 3
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0\224\221"..., 1024) = 1024
fstat64(3, {st_mode=S_IFREG|0644, st_size=123784, ...}) = 0
old_mmap(NULL, 173472, PROT_READ|PROT_EXEC, MAP_PRIVATE, 3, 0) = 0x400b
mprotect(0x400cd000, 54688, PROT_NONE)  = 0
old_mmap(0x400cd000, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED, 3, 0x1d000) = 
0x400cd000
old_mmap(0x400ce000, 50592, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, 
-1, 0) = 0x400ce000
close(3)= 0
open("/lib/libnsl.so.1", O_RDONLY)  = 3
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0d;\0\000"..., 1024) = 1024
fstat64(3, {st_mode=S_IFREG|0644, st_size=69132, ...}) = 0
old_mmap(NULL, 76448, PROT_READ|PROT_EXEC, MAP_PRIVATE, 3, 0) = 0x400db000
mprotect(0x400eb000, 10912, PROT_NONE)  = 0
old_mmap(0x400eb000, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED, 3, 0x1) = 
0x400eb000
old_mmap(0x400ec000, 6816, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, 
-1, 0) = 0x400ec000
close(3)= 0
open("/lib/libpthread.so.0", O_RDONLY)  = 3
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0\224D\0"..., 1024) = 1024
fstat64(3, {st_mode=S_IFREG|0644, st_size=81959, ...}) = 0
old_mmap(NULL, 323104, PROT_READ|PROT_EXEC, MAP_PRIVATE, 3, 0) = 0x400ee000
mpro

Re: [Mono-list] Can't launch processes as normal user

2003-03-13 Thread Gonzalo Paniagua Javier
El jue, 13 de 03 de 2003 a las 16:23, Pablo Baena escribió:
> as user, shows nothing, but running it as root shows the contents of
> the directory. It is just an example, I tried to see if it actually
> executes the command, and it doesn't as user.
> 
> I tried all the versions of mono from 0.19 to 0.23 and none of them
> worked.
> 
> Again: is this a bug or a new policy?

It works fine for me. Try the attached program (run it like 'mono
ptest.exe binary_program args to binary program').

-Gonzalo

using System;
using System.Diagnostics;
using System.Text;

class C
{
static void Main (string [] args)
{
if (args.Length == 0) {
Console.WriteLine ("No args");
return;
}

Process process = new Process ();
process.StartInfo.FileName = args [0];
string arguments = String.Empty;
if (args.Length > 1) {
StringBuilder b = new StringBuilder ();
for (int i = 1; i < args.Length; i++) {
b.Append (args [i]);
b.Append (' ');
}
arguments = b.ToString ();
}

process.StartInfo.Arguments = arguments;
process.StartInfo.UseShellExecute = false;
process.StartInfo.RedirectStandardOutput = true;
process.Start ();
string poutput = process.StandardOutput.ReadToEnd ();
process.WaitForExit ();
int result = process.ExitCode;
process.Close ();
Console.WriteLine ("RC: {1} The output is:\n{0}", poutput, result);
}
}



Re: [Mono-list] Can't launch processes as normal user

2003-03-13 Thread Erik Bågfors
Hi


Works for me:


: [EMAIL PROTECTED] ; cat test3.cs
namespace hello {
using System;
using System.Diagnostics;

public class hello 
{
public static void Main (string[] args)
{
Process pt = new Process ();
pt.StartInfo.FileName="ls";
pt.StartInfo.UseShellExecute=false;
pt.Start ();
}
}
}


: [EMAIL PROTECTED] ; mcs test3.cs
Compilation succeeded


: [EMAIL PROTECTED] ; mono test3.exe
bug hello-world-gtk.cs~  magic.sh   test2.exe  test.cs
convert helloworld-gtk.csmagic.sh~  test3.cs   test.exe
glade   helloworld-gtk.exe   test2.cs   test3.exe  ticc
glade-test  installertest2.cs~  test.c

: [EMAIL PROTECTED] ; id
uid=501(bagfors) gid=501(bagfors) groups=501(bagfors)




On Thu, 2003-03-13 at 16:23, Pablo Baena wrote:
> Just to make myself clear.
> 
> Running this example:
> 
> 
> namespace hello {
> using System;
> using System.Diagnostics;
>  
> public class hello 
> {
>  
> public static void Main (string[] args)
> {
> Process pt = new Process ();
> pt.StartInfo.FileName="ls";
> pt.StartInfo.UseShellExecute=false;
> pt.Start ();
> }
> }
> }
> as user, shows nothing, but running it as root shows the contents of
> the directory. It is just an example, I tried to see if it actually
> executes the command, and it doesn't as user.
> 
> I tried all the versions of mono from 0.19 to 0.23 and none of them
> worked.
> 
> Again: is this a bug or a new policy?
> 
> On Thu, 2003-03-13 at 03:56, Pablo Baena wrote: 
> > Hello! There was a time when I could launch processes with mono as a
> > normal user, but that isn't the case anymore. Now I have to be
> > logged in as root. Is it a bug or a new policy?
> > 
> > Regards!
> 
> -- 
> Pablo Baena <[EMAIL PROTECTED]>
/Erik

-- 
[EMAIL PROTECTED]
fingerprint:  A85B 95D3 D26B 296B 6C60 4F32 2C0B 693D 6E32

___
Mono-list maillist  -  [EMAIL PROTECTED]
http://lists.ximian.com/mailman/listinfo/mono-list


Re: [Mono-list] Can't launch processes as normal user

2003-03-13 Thread Chris Ball
>> On 13 Mar 2003 15:23:36, Pablo Baena <[EMAIL PROTECTED]> said:

   > [creating a process] as user, shows nothing, but running it as root
   > shows the contents of the directory. It is just an example, I tried
   > to see if it actually executes the command, and it doesn't as user.

Works for me.  Do you have permissions to get the contents of the dir as
the unprivileged user you're trying it as?  An strace to see the return
codes on the getcwd() and access() calls might be helpful.

- Chris.
-- 
$a="printf.net";  Chris Ball | [EMAIL PROTECTED] | www.$a | finger: [EMAIL PROTECTED]

___
Mono-list maillist  -  [EMAIL PROTECTED]
http://lists.ximian.com/mailman/listinfo/mono-list


Re: [Mono-list] Can't launch processes as normal user

2003-03-13 Thread Pablo Baena




Just to make myself clear.

Running this example:

namespace hello {
    using System;
    using System.Diagnostics;
 
    public class hello 
    {
 
    public static void Main (string[] args)
    {
    Process pt = new Process ();
    pt.StartInfo.FileName="ls";
    pt.StartInfo.UseShellExecute=false;
    pt.Start ();
    }
    }
}
as user, shows nothing, but running it as root shows the contents of the directory. It is just an example, I tried to see if it actually executes the command, and it doesn't as user.

I tried all the versions of mono from 0.19 to 0.23 and none of them worked.

Again: is this a bug or a new policy?

On Thu, 2003-03-13 at 03:56, Pablo Baena wrote:

Hello! There was a time when I could launch processes with mono as a normal user, but that isn't the case anymore. Now I have to be logged in as root. Is it a bug or a new policy?

Regards!





-- 
Pablo Baena <[EMAIL PROTECTED]>









[Mono-list] Can't launch processes as normal user

2003-03-12 Thread Pablo Baena




Hello! There was a time when I could launch processes with mono as a normal user, but that isn't the case anymore. Now I have to be logged in as root. Is it a bug or a new policy?

Regards!



-- 
Pablo Baena <[EMAIL PROTECTED]>