tests: We can no longer open /bin/sh r/w due to PM for flock
* Use /etc/passwd
This commit is contained in:
@@ -61,7 +61,7 @@ try_to_lock(void *_fd)
|
|||||||
int
|
int
|
||||||
main(int argc, char **argv)
|
main(int argc, char **argv)
|
||||||
{
|
{
|
||||||
intptr_t fd = open("/bin/sh", O_RDONLY);
|
intptr_t fd = open("/etc/passwd", O_RDONLY);
|
||||||
if (fd < 0) {
|
if (fd < 0) {
|
||||||
fprintf(stderr, "could not open file: %s\n", strerror(errno));
|
fprintf(stderr, "could not open file: %s\n", strerror(errno));
|
||||||
return -1;
|
return -1;
|
||||||
@@ -92,7 +92,7 @@ main(int argc, char **argv)
|
|||||||
|
|
||||||
close(fd);
|
close(fd);
|
||||||
|
|
||||||
fd = open("/bin/sh", O_RDWR);
|
fd = open("/etc/passwd", O_RDWR);
|
||||||
if (fd < 0) {
|
if (fd < 0) {
|
||||||
fprintf(stderr, "could not open file: %s\n", strerror(errno));
|
fprintf(stderr, "could not open file: %s\n", strerror(errno));
|
||||||
return -1;
|
return -1;
|
||||||
|
|||||||
Reference in New Issue
Block a user