aboutsummaryrefslogtreecommitdiff
path: root/patches
diff options
context:
space:
mode:
authorTheo Buehler <tb@openbsd.org>2024-11-03 08:55:11 +0100
committerTheo Buehler <tb@openbsd.org>2024-11-03 08:55:11 +0100
commit5805f96b0650abfe0d60eb19da9b080a456e215a (patch)
tree0dbef84fd5bbd63dbb5b3eb64ee701639486fcfa /patches
parent880ac26cefc7bfc0df23cae5261a824206a48723 (diff)
downloadportable-5805f96b0650abfe0d60eb19da9b080a456e215a.tar.gz
portable-5805f96b0650abfe0d60eb19da9b080a456e215a.tar.bz2
portable-5805f96b0650abfe0d60eb19da9b080a456e215a.zip
Simplify patch and use %llu
Diffstat (limited to 'patches')
-rw-r--r--patches/tls_config.c.patch16
1 files changed, 5 insertions, 11 deletions
diff --git a/patches/tls_config.c.patch b/patches/tls_config.c.patch
index 38c667f..1342a60 100644
--- a/patches/tls_config.c.patch
+++ b/patches/tls_config.c.patch
@@ -1,21 +1,15 @@
1uid_t can be 64-bit
2
1--- tls/tls_config.c.orig 2024-11-02 21:19:47.090322191 +0100 3--- 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 4+++ tls/tls_config.c 2024-11-02 21:38:22.527071689 +0100
3@@ -20,6 +20,7 @@ 5@@ -742,8 +742,8 @@
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 6
13 if (sb.st_uid != getuid()) { 7 if (sb.st_uid != getuid()) {
14 tls_config_set_errorx(config, TLS_ERROR_UNKNOWN, 8 tls_config_set_errorx(config, TLS_ERROR_UNKNOWN,
15- "session file has incorrect owner (uid %u != %u)", 9- "session file has incorrect owner (uid %u != %u)",
16- sb.st_uid, getuid()); 10- sb.st_uid, getuid());
17+ "session file has incorrect owner (uid %" PRIu64" != %" PRIu64 ")", 11+ "session file has incorrect owner (uid %llu != %llu)",
18+ (uint64_t)sb.st_uid, (uint64_t)getuid()); 12+ (unsigned long long)sb.st_uid, (unsigned long long)getuid());
19 return (-1); 13 return (-1);
20 } 14 }
21 mugo = sb.st_mode & (S_IRWXU|S_IRWXG|S_IRWXO); 15 mugo = sb.st_mode & (S_IRWXU|S_IRWXG|S_IRWXO);