From b3d20a3ff0f822e2b39c3f6d31bfdea89f577465 Mon Sep 17 00:00:00 2001 From: Darren Tucker Date: Sun, 7 Mar 2010 11:56:59 +1100 Subject: [PATCH] - (dtucker) [auth.c] Bug #1710: call setauthdb on AIX before getpwuid so that it gets the passwd struct from the LAM that knows about the user which is not necessarily the default. Patch from Alexandre Letourneau. --- ChangeLog | 5 +++++ auth.c | 8 ++++++++ 2 files changed, 13 insertions(+) diff --git a/ChangeLog b/ChangeLog index 0f062fa60..63beb9482 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +20100307 + - (dtucker) [auth.c] Bug #1710: call setauthdb on AIX before getpwuid so that + it gets the passwd struct from the LAM that knows about the user which is + not necessarily the default. Patch from Alexandre Letourneau. + 20100305 - OpenBSD CVS Sync - jmc@cvs.openbsd.org 2010/03/04 12:51:25 diff --git a/auth.c b/auth.c index e8fbe9fd5..89a936068 100644 --- a/auth.c +++ b/auth.c @@ -535,7 +535,15 @@ getpwnamallow(const char *user) parse_server_match_config(&options, user, get_canonical_hostname(options.use_dns), get_remote_ipaddr()); +#if defined(_AIX) && defined(HAVE_SETAUTHDB) + aix_setauthdb(user); +#endif + pw = getpwnam(user); + +#if defined(_AIX) && defined(HAVE_SETAUTHDB) + aix_restoreauthdb(); +#endif #ifdef HAVE_CYGWIN /* * Windows usernames are case-insensitive. To avoid later problems