mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-05-28 16:22:29 +00:00
Fix bugs and add security features to redbean
- Fix a regression with the previous change that broke redbean - Add chroot(), resource limit, seccomp, and other stuff to redbean - Write lots and lots of documentation - Iron out more system call issues
This commit is contained in:
parent
f1dfa4bdfa
commit
7166679620
182 changed files with 1855 additions and 918 deletions
|
@ -29,8 +29,20 @@
|
|||
|
||||
char testlib_enable_tmp_setup_teardown;
|
||||
|
||||
TEST(access, testNull_returnsEfault) {
|
||||
TEST(access, efault) {
|
||||
ASSERT_SYS(EFAULT, -1, access(0, F_OK));
|
||||
if (IsWindows() && !IsAsan()) return; // not possible
|
||||
ASSERT_SYS(EFAULT, -1, access((void *)77, F_OK));
|
||||
}
|
||||
|
||||
TEST(access, enoent) {
|
||||
ASSERT_SYS(ENOENT, -1, access("doesnotexist", F_OK));
|
||||
ASSERT_SYS(ENOENT, -1, access("o/doesnotexist", F_OK));
|
||||
}
|
||||
|
||||
TEST(access, enotdir) {
|
||||
ASSERT_SYS(0, 0, touch("o", 0644));
|
||||
ASSERT_SYS(ENOTDIR, -1, access("o/doesnotexist", F_OK));
|
||||
}
|
||||
|
||||
TEST(access, test) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue