diff options
author | pjd <pjd@FreeBSD.org> | 2013-03-21 23:07:04 +0000 |
---|---|---|
committer | pjd <pjd@FreeBSD.org> | 2013-03-21 23:07:04 +0000 |
commit | c93f0c9d3c49c5b24cc52ab707ebdd772327e38e (patch) | |
tree | 53381556d8ab95fda769719c857f01568a130db3 /tools/regression/security/cap_test | |
parent | 75c735d00a173ab2e6e667aa31a422bf6f28050d (diff) | |
download | FreeBSD-src-c93f0c9d3c49c5b24cc52ab707ebdd772327e38e.zip FreeBSD-src-c93f0c9d3c49c5b24cc52ab707ebdd772327e38e.tar.gz |
Update regression tests after adding chflagsat(2).
Sponsored by: The FreeBSD Foundation
Diffstat (limited to 'tools/regression/security/cap_test')
-rw-r--r-- | tools/regression/security/cap_test/cap_test_capabilities.c | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/tools/regression/security/cap_test/cap_test_capabilities.c b/tools/regression/security/cap_test/cap_test_capabilities.c index 9f5dde8..d4347ee 100644 --- a/tools/regression/security/cap_test/cap_test_capabilities.c +++ b/tools/regression/security/cap_test/cap_test_capabilities.c @@ -293,14 +293,12 @@ try_file_ops(int filefd, int dirfd, cap_rights_t rights) CHECK_RESULT(fchflags, CAP_FCHFLAGS, ret == 0 || (is_nfs && errno == EOPNOTSUPP)); -#ifdef TODO /* No such syscalls yet. */ - ret = openat(dirfd, "cap_fchflagsat", O_CREAT, 0600); + ret = openat(dirfd, "cap_chflagsat", O_CREAT, 0600); CHECK(ret >= 0); CHECK(close(ret) == 0); - ret = fchflagsat(dfd_cap, "cap_fchflagsat", UF_NODUMP, 0); - CHECK_RESULT(fchflagsat, CAP_FCHFLAGSAT | CAP_LOOKUP, ret == 0); - CHECK(unlinkat(dirfd, "cap_fchflagsat", 0) == 0); -#endif + ret = chflagsat(dfd_cap, "cap_chflagsat", UF_NODUMP, 0); + CHECK_RESULT(chflagsat, CAP_CHFLAGSAT | CAP_LOOKUP, ret == 0); + CHECK(unlinkat(dirfd, "cap_chflagsat", 0) == 0); ret = fchown(fd_cap, -1, -1); CHECK_RESULT(fchown, CAP_FCHOWN, ret == 0); |