The Samba-Bugzilla – Attachment 5361 Details for
Bug 6868
make bin/cifs.upcall fails
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
patch for 3.5
cifs.patch-v3-5-test (text/plain), 2.06 KB, created by
Guenther Deschner
on 2010-02-17 05:26:19 UTC
(
hide
)
Description:
patch for 3.5
Filename:
MIME Type:
Creator:
Guenther Deschner
Created:
2010-02-17 05:26:19 UTC
Size:
2.06 KB
patch
obsolete
>From 3e3fd21ebad5e7b15ed4c9be89f383f2d1b0adc0 Mon Sep 17 00:00:00 2001 >From: Jeff Layton <jlayton@redhat.com> >Date: Tue, 16 Feb 2010 09:16:42 -0500 >Subject: [PATCH] cifs.upcall: allocate a talloc context for smb_krb5_unparse_name >MIME-Version: 1.0 >Content-Type: text/plain; charset=UTF-8 >Content-Transfer-Encoding: 8bit > >cifs.upcall calls smb_krb5_unparse_name with a NULL talloc context. >Older versions of this function though will conditionally use >SMB_REALLOC instead of TALLOC_REALLOC when a NULL context is passed >in. To make it more consistent, just spawn a talloc context that >we can pass into this function. > >Resolves: >https://bugzilla.redhat.com/show_bug.cgi?id=565446 >https://bugzilla.samba.org/show_bug.cgi?id=6868 > >Reported-by: Ludek Finstrle <luf@seznam.cz> >Signed-off-by: Jeff Layton <jlayton@redhat.com> >Signed-off-by: Günther Deschner <gd@samba.org> >(cherry picked from commit a8cc2fa09ed43a167f62711bef363a5ac335dc78) >--- > client/cifs.upcall.c | 5 ++++- > 1 files changed, 4 insertions(+), 1 deletions(-) > >diff --git a/client/cifs.upcall.c b/client/cifs.upcall.c >index bfc70d1..42632a0 100644 >--- a/client/cifs.upcall.c >+++ b/client/cifs.upcall.c >@@ -56,6 +56,7 @@ get_tgt_time(const char *ccname) { > krb5_principal principal; > time_t credtime = 0; > char *realm = NULL; >+ TALLOC_CTX *mem_ctx; > > if (krb5_init_context(&context)) { > syslog(LOG_DEBUG, "%s: unable to init krb5 context", __func__); >@@ -87,9 +88,10 @@ get_tgt_time(const char *ccname) { > goto err_ccstart; > } > >+ mem_ctx = talloc_init("cifs.upcall"); > while (!credtime && !krb5_cc_next_cred(context, ccache, &cur, &creds)) { > char *name; >- if (smb_krb5_unparse_name(NULL, context, creds.server, &name)) { >+ if (smb_krb5_unparse_name(mem_ctx, context, creds.server, &name)) { > syslog(LOG_DEBUG, "%s: unable to unparse name", __func__); > goto err_endseq; > } >@@ -102,6 +104,7 @@ get_tgt_time(const char *ccname) { > TALLOC_FREE(name); > } > err_endseq: >+ TALLOC_FREE(mem_ctx); > krb5_cc_end_seq_get(context, ccache, &cur); > err_ccstart: > krb5_free_principal(context, principal); >-- >1.6.6 >
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 Raw
Flags:
gd
:
review+
Actions:
View
Attachments on
bug 6868
:
4952
|
4991
|
5012
| 5361 |
5362