Re: [Mono-dev] UnixUserInfo issues in OpenBSD

2010-10-18 Thread pablosantosl...@terra.es
Hi, I got the same issue (Mono/C#) running as root. On 18/10/2010 0:44, Robert Nagy wrote: Ignore that diff i just sent, it's stupid, i did not read the code correctly. Working on something that fixes the problem correctly. On (2010-10-18 00:22), Robert Nagy wrote: You get errno 13

Re: [Mono-dev] UnixUserInfo issues in OpenBSD

2010-10-18 Thread Robert Nagy
Of course you do, that has nothing to do with the issue you see now. On (2010-10-18 11:54), pablosantosl...@terra.es wrote: Hi, I got the same issue (Mono/C#) running as root. On 18/10/2010 0:44, Robert Nagy wrote: Ignore that diff i just sent, it's stupid, i did not read the code

Re: [Mono-dev] UnixUserInfo issues in OpenBSD

2010-10-17 Thread Robert Nagy
I am going to have a look at this. On (2010-10-13 12:56), Jonathan Pryor wrote: On Wed, 2010-10-13 at 16:38 +0200, pablosantosl...@terra.es wrote: This is what I get: $ ./a.out tester # checking return value 1; errno=13 That's...horribly wrong. First, what's errno=13? (i.e. what

Re: [Mono-dev] UnixUserInfo issues in OpenBSD

2010-10-17 Thread Robert Nagy
You get errno 13 (EACCES) because you are not running it as root and getpwnam_r will try to give you struct passwd which inludes the encrypted password of the user so errno will be set to EACCES, but the other fields will be set. According to the comment in mph.h getpnam_r only returns ERANGE on

Re: [Mono-dev] UnixUserInfo issues in OpenBSD

2010-10-17 Thread Robert Nagy
Ignore that diff i just sent, it's stupid, i did not read the code correctly. Working on something that fixes the problem correctly. On (2010-10-18 00:22), Robert Nagy wrote: You get errno 13 (EACCES) because you are not running it as root and getpwnam_r will try to give you struct passwd which

[Mono-dev] UnixUserInfo issues in OpenBSD

2010-10-13 Thread pablosantosl...@terra.es
Hi all, The following simple program fails on OpenBSD: using System; using Mono.Unix; public class Info { public static void Main() { Console.WriteLine(Environment.UserName); Console.WriteLine(new UnixUserInfo(Environment.UserName).UserName);

Re: [Mono-dev] UnixUserInfo issues in OpenBSD

2010-10-13 Thread Jonathan Pryor
I have no idea why it's failing. Sorry. What I can do is send you a C program which closely mirrors what Mono.Unix is doing. Could you compile and run it, and see if it fails in the same ways? The program source is attached. - Jon On Wed, 2010-10-13 at 10:43 +0200, pablosantosl...@terra.es

Re: [Mono-dev] UnixUserInfo issues in OpenBSD

2010-10-13 Thread pablosantosl...@terra.es
Reading your C code I see once more how powerful C# is... :P This is what I get: $ ./a.out tester # checking return value 1; errno=13 User tester: pw_name=ÇEðÄ À ¢ pw_uid=752427404 pw_gid=-809631572 pw_gecos=(null) pw_dir=(null)

Re: [Mono-dev] UnixUserInfo issues in OpenBSD

2010-10-13 Thread Jonathan Pryor
On Wed, 2010-10-13 at 16:38 +0200, pablosantosl...@terra.es wrote: This is what I get: $ ./a.out tester # checking return value 1; errno=13 That's...horribly wrong. First, what's errno=13? (i.e. what EVALUE is 13? I'm sure OpenBSD has different values than Linux does.) Regardless,