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, OpenBSD doesn't appear to be conforming to the standard here: http://www.opengroup.org/onlinepubs/009695399/functions/getpwnam_r.html If successful, the getpwnam_r() function shall return zero; otherwise, an error number shall be returned to indicate the error. The value '1' is likely not the correct errno for ERANGE (Under Linux, EPERM has the value 1), and since the return value isn't -1 recheck_range() won't check errno against ERANGE either. However, this does point out a bug in MonoPosixHelper: if getpwnam_r() returns non-zero it should treat it as an error, which is clearly not happening here (and is why we're printing garbage data to the screen). This would only marginally help you, though, as it would result in no users being found, ever. The fundamental problem is that Mono_Posix_Syscall_getpwnam_r()'s logic for checking for ERANGE (so it'll resize the buffer and try the call again) is failing under OpenBSD, and from what I can see here the problem is within OpenBSD, not MonoPosixHelper. Patches welcome to properly support OpenBSD. :-) - Jon _______________________________________________ Mono-devel-list mailing list Mono-devel-list@lists.ximian.com http://lists.ximian.com/mailman/listinfo/mono-devel-list