aboutsummaryrefslogtreecommitdiff
path: root/src/plugins/audit
diff options
context:
space:
mode:
authorGreg Hudson <ghudson@mit.edu>2013-10-05 20:13:39 -0400
committerGreg Hudson <ghudson@mit.edu>2013-10-05 20:13:39 -0400
commit5036f91e7b61a73a1ec2d39ce1cc6bbf60dd82ab (patch)
treedecf6b321ca1c907091a872083562d890cd04664 /src/plugins/audit
parent1003f0173f266a6428ccf2c89976f0029d3ee831 (diff)
downloadkrb5-5036f91e7b61a73a1ec2d39ce1cc6bbf60dd82ab.zip
krb5-5036f91e7b61a73a1ec2d39ce1cc6bbf60dd82ab.tar.gz
krb5-5036f91e7b61a73a1ec2d39ce1cc6bbf60dd82ab.tar.bz2
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
Diffstat (limited to 'src/plugins/audit')
-rw-r--r--src/plugins/audit/test/au_test.c3
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;
}