View | Details | Raw Unified | Return to bug 29193
Collapse All | Expand All

(-)login.c (-12 / +9 lines)
Lines 575-592 Link Here
575
	if (!pflag)
575
	if (!pflag)
576
		environ = envinit;
576
		environ = envinit;
577
577
578
#ifdef USE_PAM
579
	/*
580
	 * Add any environmental variables that the
581
	 * PAM modules may have set.
582
	 */
583
	if (pamh) {
584
		environ_pam = pam_getenvlist(pamh);
585
		if (environ_pam)
586
			export_pam_environment();
587
	}
588
#endif /* USE_PAM */
589
590
	/*
578
	/*
591
	 * PAM modules might add supplementary groups during pam_setcred().
579
	 * PAM modules might add supplementary groups during pam_setcred().
592
	 */
580
	 */
Lines 605-610 Link Here
605
			syslog(LOG_ERR, "pam_setcred: %s",
593
			syslog(LOG_ERR, "pam_setcred: %s",
606
			    pam_strerror(pamh, e));
594
			    pam_strerror(pamh, e));
607
		}
595
		}
596
597
	        /*
598
	         * Add any environmental variables that the
599
	         * PAM modules may have set.
600
		 * Call *after* opening session!
601
		 */
602
		environ_pam = pam_getenvlist(pamh);
603
		if (environ_pam)
604
			export_pam_environment();
608
605
609
		/*
606
		/*
610
		 * We must fork() before setuid() because we need to call
607
		 * We must fork() before setuid() because we need to call

Return to bug 29193