diff options
-rw-r--r-- | tools/regression/pjdfstest/pjdfstest.c | 4 | ||||
-rw-r--r-- | tools/regression/pjdfstest/tests/chmod/12.t | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/tools/regression/pjdfstest/pjdfstest.c b/tools/regression/pjdfstest/pjdfstest.c index 9c4ec1d..db3bc55 100644 --- a/tools/regression/pjdfstest/pjdfstest.c +++ b/tools/regression/pjdfstest/pjdfstest.c @@ -163,7 +163,7 @@ static struct syscall_desc syscalls[] = { { "prependacl", ACTION_PREPENDACL, { TYPE_STRING, TYPE_STRING, TYPE_NONE } }, { "readacl", ACTION_READACL, { TYPE_STRING, TYPE_NONE } }, #endif - { "write", ACTION_WRITE, { TYPE_NUMBER, TYPE_NONE } }, + { "write", ACTION_WRITE, { TYPE_NUMBER, TYPE_STRING, TYPE_NONE } }, { NULL, -1, { TYPE_NONE } } }; @@ -745,7 +745,7 @@ call_syscall(struct syscall_desc *scall, char *argv[]) break; #endif case ACTION_WRITE: - rval = write(DESC(0), "x", 1); + rval = write(DESC(0), STR(1), strlen(STR(1))); break; default: fprintf(stderr, "unsupported syscall\n"); diff --git a/tools/regression/pjdfstest/tests/chmod/12.t b/tools/regression/pjdfstest/tests/chmod/12.t index 0c72bd7..4b5c58c 100644 --- a/tools/regression/pjdfstest/tests/chmod/12.t +++ b/tools/regression/pjdfstest/tests/chmod/12.t @@ -18,13 +18,13 @@ cd ${n2} # Check whether writing to the file by non-owner clears the SUID. expect 0 create ${n0} 04777 -expect 0 -u 65534 -g 65534 write ${n0} x +expect 0 -u 65534 -g 65534 open ${n0} O_WRONLY : write 0 x expect 0777 stat ${n0} mode expect 0 unlink ${n0} # Check whether writing to the file by non-owner clears the SGID. expect 0 create ${n0} 02777 -expect 0 -u 65534 -g 65534 write ${n0} x +expect 0 -u 65534 -g 65534 open ${n0} O_RDWR : write 0 x expect 0777 stat ${n0} mode expect 0 unlink ${n0} |