summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJakub Hrozek <jhrozek@redhat.com>2013-04-03 11:18:31 +0200
committerJakub Hrozek <jhrozek@redhat.com>2013-04-03 13:26:41 +0200
commit274fe6a4f8bcb23e31929430110c0b52e9ce233a (patch)
treec3fb9185e2e5da9d79cd16f1890b6134e61ab9ff
parentbebeea7ed99394c4061810ed15121bd0f5ac4964 (diff)
downloadsssd-274fe6a4f8bcb23e31929430110c0b52e9ce233a.tar.gz
sssd-274fe6a4f8bcb23e31929430110c0b52e9ce233a.tar.bz2
sssd-274fe6a4f8bcb23e31929430110c0b52e9ce233a.zip
Check for correct variable name
https://fedorahosted.org/sssd/ticket/1864
-rw-r--r--src/providers/krb5/krb5_child.c4
-rw-r--r--src/providers/proxy/proxy_auth.c2
-rw-r--r--src/resolv/async_resolv.c2
-rw-r--r--src/responder/sudo/sudosrv_get_sudorules.c2
-rw-r--r--src/util/crypto/nss/nss_obfuscate.c2
-rw-r--r--src/util/usertools.c2
6 files changed, 5 insertions, 9 deletions
diff --git a/src/providers/krb5/krb5_child.c b/src/providers/krb5/krb5_child.c
index 425effb1..dd01e70b 100644
--- a/src/providers/krb5/krb5_child.c
+++ b/src/providers/krb5/krb5_child.c
@@ -1974,10 +1974,6 @@ static int k5c_setup(struct krb5_req *kr, uint32_t offline)
* expired. The library shall not use the prompter to ask for a new password
* but shall return KRB5KDC_ERR_KEY_EXP. */
krb5_get_init_creds_opt_set_change_password_prompt(kr->options, 0);
- if (kerr != 0) {
- KRB5_CHILD_DEBUG(SSSDBG_CRIT_FAILURE, kerr);
- return kerr;
- }
#endif
lifetime_str = getenv(SSSD_KRB5_RENEWABLE_LIFETIME);
diff --git a/src/providers/proxy/proxy_auth.c b/src/providers/proxy/proxy_auth.c
index 011de4fb..99b1a76c 100644
--- a/src/providers/proxy/proxy_auth.c
+++ b/src/providers/proxy/proxy_auth.c
@@ -531,7 +531,7 @@ static void proxy_child_sig_handler(struct tevent_context *ev,
/* schedule another immediate timer to delete the sigchld handler */
imm2 = tevent_create_immediate(ev);
- if (imm == NULL) {
+ if (imm2 == NULL) {
DEBUG(1, ("tevent_create_immediate failed.\n"));
return;
}
diff --git a/src/resolv/async_resolv.c b/src/resolv/async_resolv.c
index 04651511..4ecc4836 100644
--- a/src/resolv/async_resolv.c
+++ b/src/resolv/async_resolv.c
@@ -1664,7 +1664,7 @@ resolv_getsrv_done(void *arg, int status, int timeouts, unsigned char *abuf, int
}
ret = ares_parse_srv_reply(abuf, alen, &reply_list);
- if (status != ARES_SUCCESS) {
+ if (ret != ARES_SUCCESS) {
DEBUG(2, ("SRV record parsing failed: %d: %s\n", ret, ares_strerror(ret)));
ret = return_code(ret);
goto fail;
diff --git a/src/responder/sudo/sudosrv_get_sudorules.c b/src/responder/sudo/sudosrv_get_sudorules.c
index f1537820..6b6e6b23 100644
--- a/src/responder/sudo/sudosrv_get_sudorules.c
+++ b/src/responder/sudo/sudosrv_get_sudorules.c
@@ -197,7 +197,7 @@ static errno_t sudosrv_get_user(struct sudo_dom_ctx *dctx)
/* user is stored in cache, remember cased and original name */
original_name = ldb_msg_find_attr_as_string(user->msgs[0],
SYSDB_NAME, NULL);
- if (name == NULL) {
+ if (original_name == NULL) {
DEBUG(SSSDBG_CRIT_FAILURE, ("A user with no name?\n"));
ret = EFAULT;
goto done;
diff --git a/src/util/crypto/nss/nss_obfuscate.c b/src/util/crypto/nss/nss_obfuscate.c
index c0882d4e..842b58d1 100644
--- a/src/util/crypto/nss/nss_obfuscate.c
+++ b/src/util/crypto/nss/nss_obfuscate.c
@@ -112,7 +112,7 @@ static int generate_random_key(TALLOC_CTX *mem_ctx,
}
randkeydata = PK11_GetKeyData(randkey);
- if (randkey == NULL) {
+ if (randkeydata == NULL) {
DEBUG(1, ("Failure to get key data (err %d)\n",
PR_GetError()));
ret = EIO;
diff --git a/src/util/usertools.c b/src/util/usertools.c
index 587fd9cb..7323d9f8 100644
--- a/src/util/usertools.c
+++ b/src/util/usertools.c
@@ -383,7 +383,7 @@ int sss_parse_name_for_domains(TALLOC_CTX *memctx,
rdomain = NULL;
if (default_domain != NULL) {
rdomain = talloc_strdup(tmp_ctx, default_domain);
- if (default_domain == NULL) {
+ if (rdomain == NULL) {
DEBUG(SSSDBG_OP_FAILURE, ("talloc_strdup failed.\n"));
ret = ENOMEM;
goto done;