[SSSD] [PATCH] Initialize pam_data in Kerberos child

Sumit Bose sbose at redhat.com
Thu Jun 3 12:56:07 UTC 2010


Hi,

this patch fixes a missing initialisation in the Kerberos child. Without
this accessing the response list might cause a segfault.

bye,
Sumit
-------------- next part --------------
From eb7c04ce34e6ddb90c73d04035b469fb80219da1 Mon Sep 17 00:00:00 2001
From: Sumit Bose <sbose at redhat.com>
Date: Thu, 3 Jun 2010 12:11:24 +0200
Subject: [PATCH] Initialize pam_data in Kerberos child.

---
 src/providers/krb5/krb5_child.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/src/providers/krb5/krb5_child.c b/src/providers/krb5/krb5_child.c
index 7249aeb..fea1e56 100644
--- a/src/providers/krb5/krb5_child.c
+++ b/src/providers/krb5/krb5_child.c
@@ -1004,7 +1004,7 @@ int main(int argc, const char *argv[])
 
     DEBUG(7, ("krb5_child started.\n"));
 
-    pd = talloc(NULL, struct pam_data);
+    pd = talloc_zero(NULL, struct pam_data);
     if (pd == NULL) {
         DEBUG(1, ("malloc failed.\n"));
         _exit(-1);
-- 
1.7.0.1



More information about the sssd-devel mailing list