Make build hermetically sealed again

It turned out that Landlock Make hasn't been applying sandboxing for a
while, due to a mistyped if statement for `$(USE_SYSTEM_TOOLCHAIN)` it
should have had the opposite meaning. Regressions in the build configs
have been fixed. The rmrf() function works better now. The rm.com tool
works according to POSIX with the exception of supporting prompts.
This commit is contained in:
Justine Tunney 2023-07-08 06:58:21 -07:00
parent 0c43c98de1
commit a75175fe94
No known key found for this signature in database
GPG key ID: BE714B4575D6E328
14 changed files with 202 additions and 93 deletions

View file

@ -27,6 +27,8 @@
#include "libc/str/str.h"
#include "libc/testlib/testlib.h"
STATIC_YOINK("realloc");
TEST(grow, testNull_hasAllocatingBehavior) {
void *p = NULL;
size_t capacity = 0;

View file

@ -101,6 +101,7 @@ TEST(pthread_setname_np, GetNameOfOtherThread) {
while (!atomic_load(&sync1)) pthread_yield();
errno_t e = pthread_getname_np(id, me, sizeof(me));
if (IsLinux() && e == ENOENT) return; // bah old kernel
if (IsLinux() && e == EACCES) return; // meh landlock
ASSERT_EQ(0, e);
EXPECT_STREQ("justine", me);
ASSERT_EQ(0, pthread_setname_np(id, "tunney"));