2001-11-07 Jennifer Averett <jennifer@OARcorp.com>

Reported by Ibragimov Ilya <ibr@oktet.ru> and tracked as PR63.
	* psxstat/test.c: Fix test ENOTDIR to correspond to chdir() change.
	Since we check permissions before evaluating enough to see if it
	a regular file or directory, this hack is needed to make the regular
	file executable.
This commit is contained in:
Joel Sherrill
2001-11-07 23:57:59 +00:00
parent bc2db66fcb
commit f2278a8585
4 changed files with 24 additions and 2 deletions

View File

@@ -1,3 +1,11 @@
2001-11-07 Jennifer Averett <jennifer@OARcorp.com>
Reported by Ibragimov Ilya <ibr@oktet.ru> and tracked as PR63.
* psxstat/test.c: Fix test ENOTDIR to correspond to chdir() change.
Since we check permissions before evaluating enough to see if it
a regular file or directory, this hack is needed to make the regular
file executable.
2001-10-11 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
* .cvsignore: Add autom4te.cache for autoconf > 2.52.

View File

@@ -483,9 +483,12 @@ void Cause_faults()
assert( errno == EPERM );
/*
* Try to chdir to a file.
* Change file to executable then try to chdir to it.
*/
status = chmod( Files[0], S_IXUSR );
assert( status != -1 );
printf("chdir to a file should fail with ENOTDIR\n");
status = chdir( Files[0] );
assert( status == -1 );

View File

@@ -1,3 +1,11 @@
2001-11-07 Jennifer Averett <jennifer@OARcorp.com>
Reported by Ibragimov Ilya <ibr@oktet.ru> and tracked as PR63.
* psxstat/test.c: Fix test ENOTDIR to correspond to chdir() change.
Since we check permissions before evaluating enough to see if it
a regular file or directory, this hack is needed to make the regular
file executable.
2001-10-11 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
* .cvsignore: Add autom4te.cache for autoconf > 2.52.

View File

@@ -483,9 +483,12 @@ void Cause_faults()
assert( errno == EPERM );
/*
* Try to chdir to a file.
* Change file to executable then try to chdir to it.
*/
status = chmod( Files[0], S_IXUSR );
assert( status != -1 );
printf("chdir to a file should fail with ENOTDIR\n");
status = chdir( Files[0] );
assert( status == -1 );