diff -u -r ssh-3.2.0-commercial/apps/ssh/ssh2version.h ssh-3.2.1-commercial/apps/ssh/ssh2version.h --- ssh-3.2.0-commercial/apps/ssh/ssh2version.h 2002-05-16 13:30:24.000000000 +0300 +++ ssh-3.2.1-commercial/apps/ssh/ssh2version.h 2002-07-26 17:40:26.830000000 +0300 @@ -1 +1 @@ -#define SSH2_VERSION "3.2.0" +#define SSH2_VERSION "3.2.1" diff -u -r ssh-3.2.0-commercial/lib/sshsession/sshunixuser.c ssh-3.2.1-commercial/lib/sshsession/sshunixuser.c --- ssh-3.2.0-commercial/lib/sshsession/sshunixuser.c 2002-05-16 13:30:21.000000000 +0300 +++ ssh-3.2.1-commercial/lib/sshsession/sshunixuser.c 2002-07-26 17:40:57.230008000 +0300 @@ -1428,16 +1428,6 @@ SSH_DEBUG(2, ("setlogin failed: %.100s", strerror(errno))); #endif /* HAVE_SETLOGIN */ -#ifdef HAVE_USERSEC_H - /* On AIX, this "sets process credentials". I am not sure what this - includes, but it seems to be important. This also does setuid - (but we do it below as well just in case). */ - /* XXX does chroot work after this? If not, this should be done after - chroot (and before setuid()).*/ - if (setpcred(ssh_user_name(uc), NULL)) - SSH_DEBUG(2, ("setpcred %.100s: %.100s", strerror(errno))); -#endif /* HAVE_USERSEC_H */ - /* Close any extra file descriptors. Note that there may still be descriptors left by system functions. They will be closed later. */ endpwent(); @@ -1528,6 +1518,16 @@ } } +#ifdef HAVE_USERSEC_H + /* On AIX, this "sets process credentials". I am not sure what this + includes, but it seems to be important. This also does setuid + (but we do it below as well just in case). */ + /* XXX does chroot work after this? If not, this should be done after + chroot (and before setuid()). */ + if (setpcred(ssh_user_name(uc), NULL)) + SSH_DEBUG(2, ("setpcred %.100s: %.100s", strerror(errno))); +#endif /* HAVE_USERSEC_H */ + #ifdef HAVE_SIA #ifdef SSHDIST_SESSION_SIA /* Temporarily switch to the desired uid. We'll permanently switch