-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 The attached patches fix two bugs found by the clang static analyser. Both of them masked potential errors, the first one when parsing of a HBAC rule fails, the second one when unexpected status of a service lookup..the routines would return EOK instead of some error code in both cases. -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (GNU/Linux) Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org/
iEYEARECAAYFAkxYSBMACgkQHsardTLnvCXEEACfaTmUfsGD5nFuovDuqeUyL955 Y8cAoJSB5IAmf/CwDdpTl9jqbTYc48tS =adMK -----END PGP SIGNATURE-----
From 6f07132cdfdcb87fb5be9b557d5706d47d0d18c3 Mon Sep 17 00:00:00 2001 From: Jakub Hrozek <jhro...@redhat.com> Date: Tue, 3 Aug 2010 18:39:33 +0200 Subject: [PATCH 1/2] Fix check_time_rule() return value on failure The value returned in the 'done:' label was always EOK which is wrong as any parsing errors are not returned to the caller. Fixes: #583 --- src/providers/ipa/ipa_timerules.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/src/providers/ipa/ipa_timerules.c b/src/providers/ipa/ipa_timerules.c index d55a154..28a61d7 100644 --- a/src/providers/ipa/ipa_timerules.c +++ b/src/providers/ipa/ipa_timerules.c @@ -1122,7 +1122,7 @@ int check_time_rule(TALLOC_CTX *mem_ctx, ret = EOK; done: talloc_free(ctx); - return EOK; + return ret; } /* -- 1.7.2
From 7fb8373e7aed2d414562d31a39719be139fb6726 Mon Sep 17 00:00:00 2001 From: Jakub Hrozek <jhro...@redhat.com> Date: Tue, 3 Aug 2010 18:42:24 +0200 Subject: [PATCH 2/2] Return proper error value when SRV lookup fails Fixes: #587 --- src/providers/fail_over.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/src/providers/fail_over.c b/src/providers/fail_over.c index 3dab38a..fe35994 100644 --- a/src/providers/fail_over.c +++ b/src/providers/fail_over.c @@ -989,7 +989,7 @@ resolve_srv_send(TALLOC_CTX *mem_ctx, struct tevent_context *ev, default: DEBUG(1, ("Unexpected status %d for a SRV server\n", status)); ret = EIO; - break; + goto done; } ret = EOK; -- 1.7.2
0001-Fix-check_time_rule-return-value-on-failure.patch.sig
Description: PGP signature
0002-Return-proper-error-value-when-SRV-lookup-fails.patch.sig
Description: PGP signature
_______________________________________________ sssd-devel mailing list sssd-devel@lists.fedorahosted.org https://fedorahosted.org/mailman/listinfo/sssd-devel