diff options
author | pacien | 2021-07-12 00:14:32 +0200 |
---|---|---|
committer | pacien | 2021-07-12 00:14:32 +0200 |
commit | 66b3fcbc5069335770a6fb57021343232c354f78 (patch) | |
tree | 9b5df56216419ac983710b65aca4ea64e63ae11d /app/src/main/c | |
parent | c1d2e62664768477b2061a89b5b19a2a80dfb02b (diff) | |
download | tincapp-66b3fcbc5069335770a6fb57021343232c354f78.tar.gz |
deps: update tinc to 1.1pre18
Diffstat (limited to 'app/src/main/c')
-rw-r--r-- | app/src/main/c/0001-tincctl-restrict-umask-argument-for-FORTIFY.patch | 31 |
1 files changed, 0 insertions, 31 deletions
diff --git a/app/src/main/c/0001-tincctl-restrict-umask-argument-for-FORTIFY.patch b/app/src/main/c/0001-tincctl-restrict-umask-argument-for-FORTIFY.patch deleted file mode 100644 index 85ab949..0000000 --- a/app/src/main/c/0001-tincctl-restrict-umask-argument-for-FORTIFY.patch +++ /dev/null | |||
@@ -1,31 +0,0 @@ | |||
1 | From b6498e6402d9681743b697c1c9f0760448b3be54 Mon Sep 17 00:00:00 2001 | ||
2 | From: pacien <pacien.trangirard@pacien.net> | ||
3 | Date: Wed, 9 Sep 2020 01:24:28 +0200 | ||
4 | Subject: [PATCH] tincctl: restrict umask argument for FORTIFY | ||
5 | |||
6 | `umask(mode)` calls that do not verify `(mode & 0777) == mode` are | ||
7 | rejected when the libc FORTIFY checks are enabled [1]. | ||
8 | |||
9 | The unrestricted `~perms` was indeed making this assertion fail. | ||
10 | |||
11 | [1]: https://android.googlesource.com/platform/bionic/+/refs/tags/android-11.0.0_r3/libc/bionic/fortify.cpp#404 | ||
12 | --- | ||
13 | src/tincctl.c | 2 +- | ||
14 | 1 file changed, 1 insertion(+), 1 deletion(-) | ||
15 | |||
16 | diff --git a/src/tincctl.c b/src/tincctl.c | ||
17 | index 08f30189..11c1a96c 100644 | ||
18 | --- a/src/tincctl.c | ||
19 | +++ b/src/tincctl.c | ||
20 | @@ -237,7 +237,7 @@ static bool parse_options(int argc, char **argv) { | ||
21 | FILE *fopenmask(const char *filename, const char *mode, mode_t perms) { | ||
22 | mode_t mask = umask(0); | ||
23 | perms &= ~mask; | ||
24 | - umask(~perms); | ||
25 | + umask(~perms & 0777); | ||
26 | FILE *f = fopen(filename, mode); | ||
27 | |||
28 | if(!f) { | ||
29 | -- | ||
30 | 2.25.4 | ||
31 | |||