aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJonas 'Sortie' Termansen <sortie@maxsi.org>2024-11-02 21:48:40 +0100
committerJonas 'Sortie' Termansen <sortie@maxsi.org>2024-11-02 21:48:40 +0100
commit66f0dba5fe32bf7fe598f9152924a1f43fa21533 (patch)
tree104f9897a4afdb9615dfe9846452d98bf9aa07bc
parent7aaf263936db21ef8716ffc373633e1657d5f7ac (diff)
downloadportable-66f0dba5fe32bf7fe598f9152924a1f43fa21533.tar.gz
portable-66f0dba5fe32bf7fe598f9152924a1f43fa21533.tar.bz2
portable-66f0dba5fe32bf7fe598f9152924a1f43fa21533.zip
Print uid_t portably with PRIu64.
-rw-r--r--patches/tls_config.c.patch21
1 files changed, 21 insertions, 0 deletions
diff --git a/patches/tls_config.c.patch b/patches/tls_config.c.patch
new file mode 100644
index 0000000..38c667f
--- /dev/null
+++ b/patches/tls_config.c.patch
@@ -0,0 +1,21 @@
1--- tls/tls_config.c.orig 2024-11-02 21:19:47.090322191 +0100
2+++ tls/tls_config.c 2024-11-02 21:38:22.527071689 +0100
3@@ -20,6 +20,7 @@
4 #include <ctype.h>
5 #include <errno.h>
6 #include <fcntl.h>
7+#include <inttypes.h>
8 #include <pthread.h>
9 #include <stdlib.h>
10 #include <string.h>
11@@ -742,8 +743,8 @@
12
13 if (sb.st_uid != getuid()) {
14 tls_config_set_errorx(config, TLS_ERROR_UNKNOWN,
15- "session file has incorrect owner (uid %u != %u)",
16- sb.st_uid, getuid());
17+ "session file has incorrect owner (uid %" PRIu64" != %" PRIu64 ")",
18+ (uint64_t)sb.st_uid, (uint64_t)getuid());
19 return (-1);
20 }
21 mugo = sb.st_mode & (S_IRWXU|S_IRWXG|S_IRWXO);