mirror of
https://github.com/freebsd/freebsd-src.git
synced 2024-11-29 02:22:43 +00:00
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
This commit is contained in:
parent
e20fd30969
commit
abc9a36083
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=83794
@ -223,7 +223,7 @@ main(int argc, char *argv[])
|
|||||||
}
|
}
|
||||||
|
|
||||||
#ifdef EACCESS_AVAILABLE
|
#ifdef EACCESS_AVAILABLE
|
||||||
error = eaccess("test2", R_OK);
|
error = eaccess("test1", R_OK);
|
||||||
if (!error) {
|
if (!error) {
|
||||||
fprintf(stderr, "saved uid used instead of effective uid\n");
|
fprintf(stderr, "saved uid used instead of effective uid\n");
|
||||||
errorseen++;
|
errorseen++;
|
||||||
@ -270,7 +270,7 @@ main(int argc, char *argv[])
|
|||||||
#ifdef EACCESS_AVAILABLE
|
#ifdef EACCESS_AVAILABLE
|
||||||
/* Check that the effective uid is used, not the real uid */
|
/* Check that the effective uid is used, not the real uid */
|
||||||
error = eaccess("test2", R_OK);
|
error = eaccess("test2", R_OK);
|
||||||
if (error) {
|
if (!error) {
|
||||||
fprintf(stderr, "Real uid was used instead of effective uid in eaccess().\n");
|
fprintf(stderr, "Real uid was used instead of effective uid in eaccess().\n");
|
||||||
errorseen++;
|
errorseen++;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user