summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSumit Bose <sbose@redhat.com>2009-09-08 10:56:33 +0200
committerStephen Gallagher <sgallagh@redhat.com>2009-09-08 10:22:16 -0400
commit8390c75752f96b55185e8be91896574723ffe4c7 (patch)
treec5a2bb358df3b3577af3e0c86b5d9874a715c1e9
parentc7cbf6f2f6d008afe2987356163122d3773ec823 (diff)
downloadsssd-8390c75752f96b55185e8be91896574723ffe4c7.tar.gz
sssd-8390c75752f96b55185e8be91896574723ffe4c7.tar.bz2
sssd-8390c75752f96b55185e8be91896574723ffe4c7.zip
initialize sockaddr_in structure
-rw-r--r--server/krb5_plugin/sssd_krb5_locator_plugin.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/server/krb5_plugin/sssd_krb5_locator_plugin.c b/server/krb5_plugin/sssd_krb5_locator_plugin.c
index 699cad40..62f5f727 100644
--- a/server/krb5_plugin/sssd_krb5_locator_plugin.c
+++ b/server/krb5_plugin/sssd_krb5_locator_plugin.c
@@ -21,6 +21,10 @@ krb5_error_code sssd_krb5_locator_init(krb5_context context,
struct sssd_ctx *ctx;
char *dummy;
+#ifdef KRB5_PLUGIN_DEBUG
+ fprintf(stderr,"sssd_krb5_locator_init called\n");
+#endif
+
ctx = calloc(1,sizeof(struct sssd_ctx));
if (ctx == NULL) return ENOMEM;
@@ -51,6 +55,10 @@ void sssd_krb5_locator_close(void *private_data)
{
struct sssd_ctx *ctx;
+#ifdef KRB5_PLUGIN_DEBUG
+ fprintf(stderr,"sssd_krb5_locator_close called\n");
+#endif
+
if (private_data == NULL) return;
ctx = (struct sssd_ctx *) private_data;
@@ -73,6 +81,8 @@ krb5_error_code sssd_krb5_locator_lookup(void *private_data,
struct sockaddr_in addr;
struct sssd_ctx *ctx;
+ memset(&addr, 0, sizeof(struct sockaddr_in));
+
if (private_data == NULL) return KRB5_PLUGIN_NO_HANDLE;
ctx = (struct sssd_ctx *) private_data;