View | Details | Raw Unified | Return to bug 1601 | Differences between
and this patch

Collapse All | Expand All

(-)ssh-gss.old.h (+1 lines)
Lines 122-131 Link Here
122
OM_uint32 ssh_gssapi_server_ctx(Gssctxt **, gss_OID);
122
OM_uint32 ssh_gssapi_server_ctx(Gssctxt **, gss_OID);
123
int ssh_gssapi_userok(char *name);
123
int ssh_gssapi_userok(char *name);
124
OM_uint32 ssh_gssapi_checkmic(Gssctxt *, gss_buffer_t, gss_buffer_t);
124
OM_uint32 ssh_gssapi_checkmic(Gssctxt *, gss_buffer_t, gss_buffer_t);
125
void ssh_gssapi_do_child(char ***, u_int *);
125
void ssh_gssapi_do_child(char ***, u_int *);
126
void ssh_gssapi_cleanup_creds(void);
126
void ssh_gssapi_cleanup_creds(void);
127
void ssh_gssapi_free_store(void);
127
void ssh_gssapi_storecreds(void);
128
void ssh_gssapi_storecreds(void);
128
129
129
#endif /* GSSAPI */
130
#endif /* GSSAPI */
130
131
131
#endif /* _SSH_GSS_H */
132
#endif /* _SSH_GSS_H */
(-)sshd.old.c (-1 / +6 lines)
Lines 674-683 Link Here
674
674
675
	pmonitor->m_pid = fork();
675
	pmonitor->m_pid = fork();
676
	if (pmonitor->m_pid == -1)
676
	if (pmonitor->m_pid == -1)
677
		fatal("fork of unprivileged child failed");
677
		fatal("fork of unprivileged child failed");
678
	else if (pmonitor->m_pid != 0) {
678
	else if (pmonitor->m_pid != 0) {
679
#ifdef GSSAPI
680
		ssh_gssapi_free_store();
681
#endif
679
		verbose("User child is on pid %ld", (long)pmonitor->m_pid);
682
		verbose("User child is on pid %ld", (long)pmonitor->m_pid);
680
		close(pmonitor->m_recvfd);
683
		close(pmonitor->m_recvfd);
681
		buffer_clear(&loginmsg);
684
		buffer_clear(&loginmsg);
682
		monitor_child_postauth(pmonitor);
685
		monitor_child_postauth(pmonitor);
683
686
Lines 1922-1932 Link Here
1922
	packet_get_state(MODE_IN, NULL, NULL, NULL, &ibytes);
1925
	packet_get_state(MODE_IN, NULL, NULL, NULL, &ibytes);
1923
	packet_get_state(MODE_OUT, NULL, NULL, NULL, &obytes);
1926
	packet_get_state(MODE_OUT, NULL, NULL, NULL, &obytes);
1924
	verbose("Transferred: sent %llu, received %llu bytes", obytes, ibytes);
1927
	verbose("Transferred: sent %llu, received %llu bytes", obytes, ibytes);
1925
1928
1926
	verbose("Closing connection to %.500s port %d", remote_ip, remote_port);
1929
	verbose("Closing connection to %.500s port %d", remote_ip, remote_port);
1927
1930
#ifdef GSSAPI
1931
	ssh_gssapi_free_store();
1932
#endif
1928
#ifdef USE_PAM
1933
#ifdef USE_PAM
1929
	if (options.use_pam)
1934
	if (options.use_pam)
1930
		finish_pam();
1935
		finish_pam();
1931
#endif /* USE_PAM */
1936
#endif /* USE_PAM */
1932
1937
(-)session.old.c (+1 lines)
Lines 2741-2750 Link Here
2741
#endif
2741
#endif
2742
2742
2743
#ifdef GSSAPI
2743
#ifdef GSSAPI
2744
	if (compat20 && options.gss_cleanup_creds)
2744
	if (compat20 && options.gss_cleanup_creds)
2745
		ssh_gssapi_cleanup_creds();
2745
		ssh_gssapi_cleanup_creds();
2746
	ssh_gssapi_free_store();
2746
#endif
2747
#endif
2747
2748
2748
	/* remove agent socket */
2749
	/* remove agent socket */
2749
	auth_sock_cleanup_proc(authctxt->pw);
2750
	auth_sock_cleanup_proc(authctxt->pw);
2750
2751
(-)gss-serv.old.c (+14 lines)
Lines 296-305 Link Here
296
		    gssapi_client.store.filename);
296
		    gssapi_client.store.filename);
297
		unlink(gssapi_client.store.filename);
297
		unlink(gssapi_client.store.filename);
298
	}
298
	}
299
}
299
}
300
300
301
void
302
ssh_gssapi_free_store(void)
303
{
304
        if (gssapi_client.store.filename != NULL) {
305
                xfree(gssapi_client.store.filename);
306
                gssapi_client.store.filename = NULL;
307
        }
308
309
        if (gssapi_client.store.envval != NULL) {
310
                xfree(gssapi_client.store.envval);
311
                gssapi_client.store.envval = NULL;
312
        }
313
}
314
301
/* As user */
315
/* As user */
302
void
316
void
303
ssh_gssapi_storecreds(void)
317
ssh_gssapi_storecreds(void)
304
{
318
{
305
	if (gssapi_client.mech && gssapi_client.mech->storecreds) {
319
	if (gssapi_client.mech && gssapi_client.mech->storecreds) {

Return to bug 1601