krb5 commit: Fix audit test module initialization
Greg Hudson
ghudson at MIT.EDU
Sat Oct 5 21:35:21 EDT 2013
https://github.com/krb5/krb5/commit/5036f91e7b61a73a1ec2d39ce1cc6bbf60dd82ab
commit 5036f91e7b61a73a1ec2d39ce1cc6bbf60dd82ab
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.
ticket: 7713 (new)
target_version: 1.12
tags: pullups
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