From 5036f91e7b61a73a1ec2d39ce1cc6bbf60dd82ab Mon Sep 17 00:00:00 2001 From: Greg Hudson Date: Sat, 5 Oct 2013 20:13:39 -0400 Subject: 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 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/plugins/audit/test/au_test.c b/src/plugins/audit/test/au_test.c index 54bf564b1..76e711e53 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; } -- cgit