[Raw Msg Headers][Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: hold messages for unknown users

On Mon, Dec 04, 2000 at 10:16:32PM +0300, Eugene Crosser wrote:
> The problem was not *exactly* what I expected.
> My custom getpwnam() returns NULL and errno==0 if there is no such user.
> I think that errno==0 may very well be indication of "user does not exist"
> condition in "real" unices as well.

  Actually my non-custom Solaris 2.6 getpwnam() doing some door_xxx() calls
  will do exactly same errno returning - but seems to be sensitive on incoming
  errno value as well!

  The  run_homedir()  function at the router of course didn't accept
  errno == 0   as "all clear, no user" indication :-/

> My observation on various versions of Solaris show this: depending on
> whether MT-safe or non-MT-safe versions of getpwnam[_r]() are used, you
> can get for a non-existing user EINVAL or EBADF (sic!).  "Common sense"
> tells me that ENOENT and zero might be used to indicate "no error, user
> does not exist" condition on other systems.
> Of course, all of this is pure black magic...

  If you look into Single UNIX Specifications (and POSIX work), you
  will see that they won't define errnos all that specific either!

> Eugene

/Matti Aarnio	<mea@nic.funet.fi>