]> git.ipfire.org Git - thirdparty/openssh-portable.git/commitdiff
- (dtucker) [auth.c] Bug #1710: call setauthdb on AIX before getpwuid so that
authorDarren Tucker <dtucker@zip.com.au>
Sun, 7 Mar 2010 00:56:59 +0000 (11:56 +1100)
committerDarren Tucker <dtucker@zip.com.au>
Sun, 7 Mar 2010 00:56:59 +0000 (11:56 +1100)
   it gets the passwd struct from the LAM that knows about the user which is
   not necessarily the default.  Patch from Alexandre Letourneau.

ChangeLog
auth.c

index 0f062fa60474ce36f21544ce1ee1b1ab17f41efc..63beb9482e9f40ad9e22f9e0ddc528005acb348c 100644 (file)
--- 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 e8fbe9fd575b29e5c5c47a1166f5a68f630d76cf..89a9360684b47d2699b38cbc49b337bc3dec21f4 100644 (file)
--- 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