summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorjvoisin2023-08-21 17:46:03 +0200
committerjvoisin2023-08-21 17:48:29 +0200
commitcceaaa8161eb8b0b39854215417b39a9703b7aa5 (patch)
tree8a9fa4b7179b2955fcbc5a9e699ffc250f8a023e /tests
parent5a387cee873365069ad40201fa4d1c514476aa55 (diff)
Harden umask
Diffstat (limited to 'tests')
-rw-r--r--tests/Makefile1
-rw-r--r--tests/test_umask.c10
2 files changed, 11 insertions, 0 deletions
diff --git a/tests/Makefile b/tests/Makefile
index 5145b3b..5bc7fdb 100644
--- a/tests/Makefile
+++ b/tests/Makefile
@@ -91,6 +91,7 @@ TARGETS= \
91 test_strrchr_static_read \ 91 test_strrchr_static_read \
92 test_ttyname_r_dynamic \ 92 test_ttyname_r_dynamic \
93 test_ttyname_r_static \ 93 test_ttyname_r_static \
94 test_umask \
94 test_vsnprintf_dynamic \ 95 test_vsnprintf_dynamic \
95 test_vsnprintf_static \ 96 test_vsnprintf_static \
96 test_vsprintf \ 97 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 @@
1#include "common.h"
2
3#include <sys/stat.h>
4
5int main(int argc, char** argv) {
6#if !defined(__clang__)
7 umask(0666);
8#endif
9 return ret;
10}