summaryrefslogtreecommitdiff
path: root/sshd.c
diff options
context:
space:
mode:
authorDarren Tucker <dtucker@zip.com.au>2008-03-11 22:58:25 +1100
committerDarren Tucker <dtucker@zip.com.au>2008-03-11 22:58:25 +1100
commit52358d6df32d9ae923572c43a58159d84b673631 (patch)
tree83261a70dd007f2af900e1b22884c75b703f8b37 /sshd.c
parentfe1cf97ee811dc7a2bb7cea912c9292c976ab5af (diff)
- (dtucker) [auth-pam.c monitor.c session.c sshd.c] Bug #926: Move
pam_open_session and pam_close_session into the privsep monitor, which will ensure that pam_session_close is called as root. Patch from Tomas Mraz.
Diffstat (limited to 'sshd.c')
-rw-r--r--sshd.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/sshd.c b/sshd.c
index 5ea87f0f9..5dfc2b185 100644
--- a/sshd.c
+++ b/sshd.c
@@ -1847,6 +1847,20 @@ main(int ac, char **av)
1847 audit_event(SSH_AUTH_SUCCESS); 1847 audit_event(SSH_AUTH_SUCCESS);
1848#endif 1848#endif
1849 1849
1850#ifdef GSSAPI
1851 if (options.gss_authentication) {
1852 temporarily_use_uid(authctxt->pw);
1853 ssh_gssapi_storecreds();
1854 restore_uid();
1855 }
1856#endif
1857#ifdef USE_PAM
1858 if (options.use_pam) {
1859 do_pam_setcred(1);
1860 do_pam_session();
1861 }
1862#endif
1863
1850 /* 1864 /*
1851 * In privilege separation, we fork another child and prepare 1865 * In privilege separation, we fork another child and prepare
1852 * file descriptor passing. 1866 * file descriptor passing.