From cceaaa8161eb8b0b39854215417b39a9703b7aa5 Mon Sep 17 00:00:00 2001 From: jvoisin Date: Mon, 21 Aug 2023 17:46:03 +0200 Subject: Harden umask --- tests/Makefile | 1 + tests/test_umask.c | 10 ++++++++++ 2 files changed, 11 insertions(+) create mode 100644 tests/test_umask.c (limited to 'tests') diff --git a/tests/Makefile b/tests/Makefile index 5145b3b..5bc7fdb 100644 --- a/tests/Makefile +++ b/tests/Makefile @@ -91,6 +91,7 @@ TARGETS= \ test_strrchr_static_read \ test_ttyname_r_dynamic \ test_ttyname_r_static \ + test_umask \ test_vsnprintf_dynamic \ test_vsnprintf_static \ test_vsprintf \ diff --git a/tests/test_umask.c b/tests/test_umask.c new file mode 100644 index 0000000..075782f --- /dev/null +++ b/tests/test_umask.c @@ -0,0 +1,10 @@ +#include "common.h" + +#include + +int main(int argc, char** argv) { +#if !defined(__clang__) + umask(0666); +#endif + return ret; +} -- cgit v1.3