krb5 commit [krb5-1.12]: Fix audit test module initialization
Tom Yu
tlyu at MIT.EDU
Fri Oct 11 17:00:44 EDT 2013
https://github.com/krb5/krb5/commit/0b5ea2766879ec1e2e632c16e5219daeec599446
commit 0b5ea2766879ec1e2e632c16e5219daeec599446
Author: Greg Hudson <ghudson at mit.edu>
Date: Sat Oct 5 20:13:39 2013 -0400
Fix audit test module initialization
Check if the fopen result is NULL, not whether it's less than zero.
(cherry picked from commit 5036f91e7b61a73a1ec2d39ce1cc6bbf60dd82ab)
ticket: 7713
version_fixed: 1.12
status: resolved
src/plugins/audit/test/au_test.c | 3 +--
1 files changed, 1 insertions(+), 2 deletions(-)
diff --git a/src/plugins/audit/test/au_test.c b/src/plugins/audit/test/au_test.c
index 54bf564..76e711e 100644
--- a/src/plugins/audit/test/au_test.c
+++ b/src/plugins/audit/test/au_test.c
@@ -55,9 +55,8 @@ static krb5_error_code
open_au(krb5_audit_moddata *auctx)
{
au_fd = fopen("au.log", "a+");
- if ( au_fd < 0) {
+ if (au_fd == NULL)
return KRB5_PLUGIN_NO_HANDLE; /* audit module is unavailable */
- }
k5_mutex_init(&lock);
return 0;
}
More information about the cvs-krb5
mailing list