The Samba-Bugzilla – Attachment 8783 Details for
Bug 9807
wbinfo --pam-logon segfaults on failure
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
patch for 3.6 and 4.0 branches
0001-Bug-9807-wbinfo-fix-segfault-in-wbinfo_pam_logon.patch (text/plain), 1.63 KB, created by
David Disseldorp
on 2013-04-17 20:28:31 UTC
(
hide
)
Description:
patch for 3.6 and 4.0 branches
Filename:
MIME Type:
Creator:
David Disseldorp
Created:
2013-04-17 20:28:31 UTC
Size:
1.63 KB
patch
obsolete
>From 0fa404c7d5c8de826d31958613b3e97587f0835d Mon Sep 17 00:00:00 2001 >From: David Disseldorp <ddiss@samba.org> >Date: Wed, 17 Apr 2013 10:39:12 -0700 >Subject: [PATCH] Bug 9807 - wbinfo: fix segfault in wbinfo_pam_logon > >wbinfo_pam_logon() incorrectly assumes that wbcLogonUser() always >returns an allocated wbcAuthErrorInfo struct on failure. > >Signed-off-by: David Disseldorp <ddiss@samba.org> >Reviewed-by: Jeremy Allison <jra@samba.org> > >Autobuild-User(master): Jeremy Allison <jra@samba.org> >Autobuild-Date(master): Wed Apr 17 21:29:29 CEST 2013 on sn-devel-104 >--- > nsswitch/wbinfo.c | 7 +++---- > 1 file changed, 3 insertions(+), 4 deletions(-) > >diff --git a/nsswitch/wbinfo.c b/nsswitch/wbinfo.c >index cd6de34..8b17859 100644 >--- a/nsswitch/wbinfo.c >+++ b/nsswitch/wbinfo.c >@@ -1749,7 +1749,7 @@ static bool wbinfo_pam_logon(char *username) > { > wbcErr wbc_status = WBC_ERR_UNKNOWN_FAILURE; > struct wbcLogonUserParams params; >- struct wbcAuthErrorInfo *error; >+ struct wbcAuthErrorInfo *error = NULL; > char *s = NULL; > char *p = NULL; > TALLOC_CTX *frame = talloc_tos(); >@@ -1800,16 +1800,15 @@ static bool wbinfo_pam_logon(char *username) > d_printf("plaintext password authentication %s\n", > WBC_ERROR_IS_OK(wbc_status) ? "succeeded" : "failed"); > >- if (!WBC_ERROR_IS_OK(wbc_status)) { >+ if (!WBC_ERROR_IS_OK(wbc_status) && (error != NULL)) { > d_fprintf(stderr, > "error code was %s (0x%x)\nerror message was: %s\n", > error->nt_string, > (int)error->nt_status, > error->display_string); > wbcFreeMemory(error); >- return false; > } >- return true; >+ return WBC_ERROR_IS_OK(wbc_status); > } > > /* Save creds with winbind */ >-- >1.8.1.4 >
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:
jra
:
review+
Actions:
View
Attachments on
bug 9807
: 8783