Bugzilla – Attachment 1642 Details for
Bug 1601
Memory leak caused by forwarded GSSAPI credential store
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
F
memleak.diff (text/plain), 2.39 KB, created by
Miguel Sanders
on 2009-05-23 23:01:58 AEST
(
hide
)
Description:
F
Filename:
MIME Type:
Creator:
Miguel Sanders
Created:
2009-05-23 23:01:58 AEST
Size:
2.39 KB
patch
obsolete
>--- ssh-gss.old.h 2007-06-12 15:40:39.000000000 +0200 >+++ ssh-gss.new.h 2009-05-23 12:13:47.000000000 +0200 >@@ -122,10 +122,11 @@ > OM_uint32 ssh_gssapi_server_ctx(Gssctxt **, gss_OID); > int ssh_gssapi_userok(char *name); > OM_uint32 ssh_gssapi_checkmic(Gssctxt *, gss_buffer_t, gss_buffer_t); > void ssh_gssapi_do_child(char ***, u_int *); > void ssh_gssapi_cleanup_creds(void); >+void ssh_gssapi_free_store(void); > void ssh_gssapi_storecreds(void); > > #endif /* GSSAPI */ > > #endif /* _SSH_GSS_H */ >--- sshd.old.c 2009-01-28 06:31:23.000000000 +0100 >+++ sshd.new.c 2009-05-23 14:55:14.000000000 +0200 >@@ -674,10 +674,13 @@ > > pmonitor->m_pid = fork(); > if (pmonitor->m_pid == -1) > fatal("fork of unprivileged child failed"); > else if (pmonitor->m_pid != 0) { >+#ifdef GSSAPI >+ ssh_gssapi_free_store(); >+#endif > verbose("User child is on pid %ld", (long)pmonitor->m_pid); > close(pmonitor->m_recvfd); > buffer_clear(&loginmsg); > monitor_child_postauth(pmonitor); > >@@ -1922,11 +1925,13 @@ > packet_get_state(MODE_IN, NULL, NULL, NULL, &ibytes); > packet_get_state(MODE_OUT, NULL, NULL, NULL, &obytes); > verbose("Transferred: sent %llu, received %llu bytes", obytes, ibytes); > > verbose("Closing connection to %.500s port %d", remote_ip, remote_port); >- >+#ifdef GSSAPI >+ ssh_gssapi_free_store(); >+#endif > #ifdef USE_PAM > if (options.use_pam) > finish_pam(); > #endif /* USE_PAM */ > >--- session.old.c 2009-01-28 06:29:49.000000000 +0100 >+++ session.new.c 2009-05-23 12:27:37.000000000 +0200 >@@ -2741,10 +2741,11 @@ > #endif > > #ifdef GSSAPI > if (compat20 && options.gss_cleanup_creds) > ssh_gssapi_cleanup_creds(); >+ ssh_gssapi_free_store(); > #endif > > /* remove agent socket */ > auth_sock_cleanup_proc(authctxt->pw); > >--- gss-serv.old.c 2008-05-19 07:05:07.000000000 +0200 >+++ gss-serv.new.c 2009-05-23 12:15:59.000000000 +0200 >@@ -296,10 +296,24 @@ > gssapi_client.store.filename); > unlink(gssapi_client.store.filename); > } > } > >+void >+ssh_gssapi_free_store(void) >+{ >+ if (gssapi_client.store.filename != NULL) { >+ xfree(gssapi_client.store.filename); >+ gssapi_client.store.filename = NULL; >+ } >+ >+ if (gssapi_client.store.envval != NULL) { >+ xfree(gssapi_client.store.envval); >+ gssapi_client.store.envval = NULL; >+ } >+} >+ > /* As user */ > void > ssh_gssapi_storecreds(void) > { > if (gssapi_client.mech && gssapi_client.mech->storecreds) {
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 1601
:
1641
|
1642
|
1643
|
1644