From abc9a360839859593f7a3c50aa7b22a125683110 Mon Sep 17 00:00:00 2001 From: Robert Watson Date: Fri, 21 Sep 2001 21:28:43 +0000 Subject: [PATCH] o Fix two eaccess() checks -- in one case, the wrong test file was used, resulting in a regression failure, and in the other, the test on an error return was inverted. Obtained from: TrustedBSD Project --- tools/regression/security/access/testaccess.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/regression/security/access/testaccess.c b/tools/regression/security/access/testaccess.c index bd6945e2aee5..7d0c843bcc81 100644 --- a/tools/regression/security/access/testaccess.c +++ b/tools/regression/security/access/testaccess.c @@ -223,7 +223,7 @@ main(int argc, char *argv[]) } #ifdef EACCESS_AVAILABLE - error = eaccess("test2", R_OK); + error = eaccess("test1", R_OK); if (!error) { fprintf(stderr, "saved uid used instead of effective uid\n"); errorseen++; @@ -270,7 +270,7 @@ main(int argc, char *argv[]) #ifdef EACCESS_AVAILABLE /* Check that the effective uid is used, not the real uid */ error = eaccess("test2", R_OK); - if (error) { + if (!error) { fprintf(stderr, "Real uid was used instead of effective uid in eaccess().\n"); errorseen++; }