s->authctxt->krb5_ticket_file);
#endif
#ifdef USE_PAM
- /* Pull in any environment variables that may have been set by PAM. */
- copy_environment(fetch_pam_environment(), &env, &envsize);
+ /*
+ * Pull in any environment variables that may have
+ * been set by PAM.
+ */
+ {
+ char **p;
+
+ p = fetch_pam_environment();
+ copy_environment(p, &env, &envsize);
+ free_pam_environment(p);
+ }
#endif /* USE_PAM */
if (auth_sock_name != NULL)
void
do_setusercontext(struct passwd *pw)
{
- char tty='\0';
-
#ifdef HAVE_CYGWIN
if (is_winnt) {
#else /* HAVE_CYGWIN */
setpcred(pw->pw_name);
#endif /* HAVE_SETPCRED */
#ifdef HAVE_LOGIN_CAP
-#ifdef __bsdi__
+# ifdef __bsdi__
setpgid(0, 0);
-#endif
+# endif
if (setusercontext(lc, pw, pw->pw_uid,
(LOGIN_SETALL & ~LOGIN_SETPATH)) < 0) {
perror("unable to set user context");
irix_setusercontext(pw);
# endif /* defined(WITH_IRIX_PROJECT) || defined(WITH_IRIX_JOBS) || defined(WITH_IRIX_ARRAY) */
# ifdef _AIX
- /* XXX: Disable tty setting. Enabled if required later */
- aix_usrinfo(pw, &tty, -1);
+ aix_usrinfo(pw);
# endif /* _AIX */
/* Permanently switch to the desired uid. */
permanently_set_uid(pw);