From 5eadfd50562c19f3e71ee754cd58173a25420996 Mon Sep 17 00:00:00 2001 From: Simo Sorce Date: Tue, 26 May 2009 10:19:00 -0400 Subject: Silence warnings --- server/providers/ldap/ldap_auth.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'server/providers/ldap/ldap_auth.c') diff --git a/server/providers/ldap/ldap_auth.c b/server/providers/ldap/ldap_auth.c index 7d48ba077..b21008954 100644 --- a/server/providers/ldap/ldap_auth.c +++ b/server/providers/ldap/ldap_auth.c @@ -299,7 +299,7 @@ static void sdap_pam_loop(struct tevent_context *ev, struct tevent_fd *te, char *errmsgp = NULL; /* FIXME: user timeout form config */ char *filter=NULL; - char *attrs[] = { LDAP_NO_ATTRS, NULL }; + char *attrs[2] = { NULL, NULL }; lr = talloc_get_type(pvt, struct sdap_req); @@ -394,6 +394,7 @@ static void sdap_pam_loop(struct tevent_context *ev, struct tevent_fd *te, lr->sdap_ctx->user_name_attribute, lr->pd->user, lr->sdap_ctx->user_object_class); + attrs[0] = talloc_strdup(lr->sdap_ctx, LDAP_NO_ATTRS); DEBUG(4, ("calling ldap_search_ext with [%s].\n", filter)); ret = ldap_search_ext(lr->ldap, @@ -695,7 +696,7 @@ static void sdap_cache_pw_op(struct sysdb_req *req, void *pvt) struct sdap_pw_cache *data = talloc_get_type(pvt, struct sdap_pw_cache); struct pam_data *pd; const char *username; - const char *password; + char *password; int ret; data->sysreq = req; -- cgit