From 8390c75752f96b55185e8be91896574723ffe4c7 Mon Sep 17 00:00:00 2001 From: Sumit Bose Date: Tue, 8 Sep 2009 10:56:33 +0200 Subject: initialize sockaddr_in structure --- server/krb5_plugin/sssd_krb5_locator_plugin.c | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'server') 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; -- cgit