diff options
| author | Theo Buehler <tb@openbsd.org> | 2024-11-03 08:53:29 +0100 |
|---|---|---|
| committer | Theo Buehler <tb@openbsd.org> | 2024-11-03 08:53:29 +0100 |
| commit | 880ac26cefc7bfc0df23cae5261a824206a48723 (patch) | |
| tree | 104f9897a4afdb9615dfe9846452d98bf9aa07bc | |
| parent | 7aaf263936db21ef8716ffc373633e1657d5f7ac (diff) | |
| parent | 66f0dba5fe32bf7fe598f9152924a1f43fa21533 (diff) | |
| download | portable-880ac26cefc7bfc0df23cae5261a824206a48723.tar.gz portable-880ac26cefc7bfc0df23cae5261a824206a48723.tar.bz2 portable-880ac26cefc7bfc0df23cae5261a824206a48723.zip | |
Land #1122 - fix uid_t printing portability
| -rw-r--r-- | patches/tls_config.c.patch | 21 |
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); | ||
