summaryrefslogtreecommitdiff
path: root/src/providers
diff options
context:
space:
mode:
authorNick Guay <nguay@redhat.com>2012-07-18 11:55:35 -0400
committerJakub Hrozek <jhrozek@redhat.com>2012-07-18 20:07:45 +0200
commit8bbf89c5ab798c112773fe23515c3a9df56dde71 (patch)
treed25ac1f047e70fd01d4c636d9cc743ffeddaa0e9 /src/providers
parentcd52ba11971c5bbfd2fdfc114b0f1c66caa512bf (diff)
downloadsssd-8bbf89c5ab798c112773fe23515c3a9df56dde71.tar.gz
sssd-8bbf89c5ab798c112773fe23515c3a9df56dde71.tar.bz2
sssd-8bbf89c5ab798c112773fe23515c3a9df56dde71.zip
Fix uninitialized values
https://fedorahosted.org/sssd/ticket/1379
Diffstat (limited to 'src/providers')
-rw-r--r--src/providers/ipa/ipa_session.c8
-rw-r--r--src/providers/krb5/krb5_child_handler.c2
-rw-r--r--src/providers/krb5/krb5_utils.c2
-rw-r--r--src/providers/ldap/sdap_async_connection.c2
-rw-r--r--src/providers/ldap/sdap_async_sudo.c2
-rw-r--r--src/providers/ldap/sdap_sudo.c12
6 files changed, 14 insertions, 14 deletions
diff --git a/src/providers/ipa/ipa_session.c b/src/providers/ipa/ipa_session.c
index 38f0acd7..3a87e957 100644
--- a/src/providers/ipa/ipa_session.c
+++ b/src/providers/ipa/ipa_session.c
@@ -102,12 +102,12 @@ static void ipa_session_handler_done(struct tevent_req *req)
struct be_req *breq = tevent_req_callback_data(req, struct be_req);
struct sysdb_ctx *sysdb = breq->be_ctx->sysdb;
errno_t ret, sret;
- size_t map_count;
- struct sysdb_attrs **maps;
+ size_t map_count = 0;
+ struct sysdb_attrs **maps = NULL;
bool in_transaction = false;
- char *default_user;
+ char *default_user = NULL;
struct pam_data *pd = talloc_get_type(breq->req_data, struct pam_data);
- char *map_order;
+ char *map_order = NULL;
ret = ipa_get_selinux_recv(req, breq, &map_count, &maps,
&default_user, &map_order);
diff --git a/src/providers/krb5/krb5_child_handler.c b/src/providers/krb5/krb5_child_handler.c
index 0526ff01..768d8c7d 100644
--- a/src/providers/krb5/krb5_child_handler.c
+++ b/src/providers/krb5/krb5_child_handler.c
@@ -92,7 +92,7 @@ static errno_t create_send_buffer(struct krb5child_req *kr,
size_t rp;
const char *keytab;
uint32_t validate;
- size_t username_len;
+ size_t username_len = 0;
keytab = dp_opt_get_cstring(kr->krb5_ctx->opts, KRB5_KEYTAB);
if (keytab == NULL) {
diff --git a/src/providers/krb5/krb5_utils.c b/src/providers/krb5/krb5_utils.c
index ceadcd58..f92a2cc6 100644
--- a/src/providers/krb5/krb5_utils.c
+++ b/src/providers/krb5/krb5_utils.c
@@ -578,7 +578,7 @@ done:
struct sss_krb5_cc_be *
get_cc_be_ops(enum sss_krb5_cc_type type)
{
- struct sss_krb5_cc_be *be;
+ struct sss_krb5_cc_be *be = NULL;
switch (type) {
case SSS_KRB5_TYPE_FILE:
diff --git a/src/providers/ldap/sdap_async_connection.c b/src/providers/ldap/sdap_async_connection.c
index 65bc667b..d7beaa80 100644
--- a/src/providers/ldap/sdap_async_connection.c
+++ b/src/providers/ldap/sdap_async_connection.c
@@ -1310,7 +1310,7 @@ static void sdap_cli_resolve_done(struct tevent_req *subreq)
struct sdap_cli_connect_state *state = tevent_req_data(req,
struct sdap_cli_connect_state);
int ret;
- bool use_tls;
+ bool use_tls = true;
switch (state->force_tls) {
case CON_TLS_DFL:
diff --git a/src/providers/ldap/sdap_async_sudo.c b/src/providers/ldap/sdap_async_sudo.c
index 92200aa7..db5e056d 100644
--- a/src/providers/ldap/sdap_async_sudo.c
+++ b/src/providers/ldap/sdap_async_sudo.c
@@ -460,7 +460,7 @@ static void sdap_sudo_load_sudoers_done(struct tevent_req *subreq)
struct tevent_req *req = NULL; /* req from sdap_sudo_refresh_send() */
struct sdap_sudo_refresh_state *state = NULL;
struct sysdb_attrs **rules = NULL;
- size_t rules_count;
+ size_t rules_count = 0;
int ret;
errno_t sret;
bool in_transaction = false;
diff --git a/src/providers/ldap/sdap_sudo.c b/src/providers/ldap/sdap_sudo.c
index 0d590023..cd3435b8 100644
--- a/src/providers/ldap/sdap_sudo.c
+++ b/src/providers/ldap/sdap_sudo.c
@@ -437,8 +437,8 @@ static void sdap_sudo_reply(struct tevent_req *req)
{
struct be_req *be_req = NULL;
struct be_sudo_req *sudo_req = NULL;
- int dp_error;
- int error;
+ int dp_error = DP_ERR_OK;
+ int error = EOK;
int ret;
be_req = tevent_req_callback_data(req, struct be_req);
@@ -926,8 +926,8 @@ static void sdap_sudo_periodical_first_refresh_done(struct tevent_req *req)
struct tevent_req *subreq = NULL; /* req from sdap_sudo_full_refresh_send() */
struct sdap_sudo_ctx *sudo_ctx = NULL;
time_t delay;
- int dp_error;
- int error;
+ int dp_error = DP_ERR_OK;
+ int error = EOK;
int ret;
ret = sdap_sudo_timer_recv(req, req, &subreq);
@@ -985,8 +985,8 @@ static void sdap_sudo_periodical_full_refresh_done(struct tevent_req *req)
struct tevent_req *subreq = NULL; /* req from sdap_sudo_full_refresh_send() */
struct sdap_sudo_ctx *sudo_ctx = NULL;
time_t delay;
- int dp_error;
- int error;
+ int dp_error = DP_ERR_OK;
+ int error = EOK;
int ret;
ret = sdap_sudo_timer_recv(req, req, &subreq);