On Thu, 16 Dec 2010 16:18:16 -0500
Simo Sorce <[email protected]> wrote:

> On Thu, 16 Dec 2010 11:55:41 -0500
> Stephen Gallagher <[email protected]> wrote:
> 
> > --- a/src/sss_client/pam_sss.c
> > +++ b/src/sss_client/pam_sss.c
> > @@ -413,7 +413,7 @@ static int do_pam_conversation(pam_handle_t
> > *pamh, const int msg_style, }
> >      } while (state != SSS_PAM_CONV_DONE);
> >  
> > -    *_answer = answer;
> > +    if(answer) *_answer = answer;
> 
> FAIL-Style ^^^ there should be a space after the if :)
> 
> However it is not clear to me how this would prevent a segfault.
> 
> I think you meant it to be:
> if (_answer) *_answer = answer;

Attached find patch to fix the fix :)

Simo.

-- 
Simo Sorce * Red Hat, Inc * New York
>From dc332b7aacb440d1791a77cba02ed83a141db1fd Mon Sep 17 00:00:00 2001
From: Simo Sorce <[email protected]>
Date: Thu, 16 Dec 2010 16:18:43 -0500
Subject: [PATCH] Fix wrong test in pam_sss

---
 src/sss_client/pam_sss.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/src/sss_client/pam_sss.c b/src/sss_client/pam_sss.c
index f35f06f261434f70deebda77b84d564f4da0213a..6155e49d891b9b0ca9566ecb1cd2def903f18036 100644
--- a/src/sss_client/pam_sss.c
+++ b/src/sss_client/pam_sss.c
@@ -413,7 +413,7 @@ static int do_pam_conversation(pam_handle_t *pamh, const int msg_style,
         }
     } while (state != SSS_PAM_CONV_DONE);
 
-    if(answer) *_answer = answer;
+    if (_answer) *_answer = answer;
     return PAM_SUCCESS;
 
 failed:
-- 
1.7.3.3

_______________________________________________
sssd-devel mailing list
[email protected]
https://fedorahosted.org/mailman/listinfo/sssd-devel

Reply via email to