diff options
author | pjd <pjd@FreeBSD.org> | 2011-03-09 22:50:15 +0000 |
---|---|---|
committer | pjd <pjd@FreeBSD.org> | 2011-03-09 22:50:15 +0000 |
commit | cf63dbabf1283eaba52766e12ab0d7be3c38a1c4 (patch) | |
tree | fea30cb1a0574ee0b798d36c9e39df01620a9d99 /tools | |
parent | 7d5541f691c2d9dfe361a513cc553fef55089903 (diff) | |
download | FreeBSD-src-cf63dbabf1283eaba52766e12ab0d7be3c38a1c4.zip FreeBSD-src-cf63dbabf1283eaba52766e12ab0d7be3c38a1c4.tar.gz |
Pass descriptor number to write(2), now that it is possible.
Diffstat (limited to 'tools')
-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} |