[Raw Msg Headers][Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
getpwnam pathalogy
On Solaris, getpwnam() itself does not change errno in case of "no such user",
but if you make getpwnam() a wrapper around getpwnam_r() than you get
EINVAL. Oh yes, you can get EBADF even easier but let's ignore this ;-)
Yes I know that this is very pathalogical case but let's remove
"#ifdef _osf_" in mailbox.c:
--- mailbox.c.orig Wed Oct 27 21:20:06 1999
+++ mailbox.c Mon Nov 22 18:39:33 1999
@@ -1156,12 +1156,10 @@
fine lookup -- to mark lack of data */
if (errno == ENOENT)
errno = 0;
-#ifdef __osf__
/* ... and OSF/1 *must* be different, of course ...
(I just wonder what AIX does) */
if (errno == EINVAL)
errno = 0;
-#endif
if (errno != 0) { /* getpwnam() failed for some other
reason than simply not finding the
given user... */