On Fri, 14 Jul 2006, Philip Hazel wrote:
>
>   Rejig debug output in route_finduser() to show more data, including the
>   error from getpwnam() if it issues one.

I think you need to set errno to 0 before calling getpwnam, in order to
correctly tell the difference between no result (in which case it
doesn't set errno at all, not even to zero) and error.

>   +  else DEBUG(D_uid)
>   +    {
>   +    if (errno != 0) debug_printf("getpwnam(%s) failed: %s\n", s,
>   +      strerror(errno));
>   +    }
>   +  }
>   +
>   +if (lastpw == NULL)
>   +  {
>   +  DEBUG(D_uid) debug_printf("getpwnam() returned NULL (user not found)\n");
>   +  return FALSE;
>      }

Tony.
-- 
<[EMAIL PROTECTED]>   <[EMAIL PROTECTED]>   http://dotat.at/   ${sg{\N${sg{\
N\}{([^N]*)(.)(.)(.*)}{\$1\$3\$2\$1\$3\n\$2\$3\$4\$3\n\$3\$2\$4}}\
\N}{([^N]*)(.)(.)(.*)}{\$1\$3\$2\$1\$3\n\$2\$3\$4\$3\n\$3\$2\$4}}

-- 
## List details at http://www.exim.org/mailman/listinfo/exim-dev Exim details 
at http://www.exim.org/ ##

Reply via email to