Skip to content

Commit

Permalink
Print uid_t portably with PRIu64.
Browse files Browse the repository at this point in the history
  • Loading branch information
sortie committed Nov 2, 2024
1 parent 7aaf263 commit 66f0dba
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions patches/tls_config.c.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
--- tls/tls_config.c.orig 2024-11-02 21:19:47.090322191 +0100
+++ tls/tls_config.c 2024-11-02 21:38:22.527071689 +0100
@@ -20,6 +20,7 @@
#include <ctype.h>
#include <errno.h>
#include <fcntl.h>
+#include <inttypes.h>
#include <pthread.h>
#include <stdlib.h>
#include <string.h>
@@ -742,8 +743,8 @@

if (sb.st_uid != getuid()) {
tls_config_set_errorx(config, TLS_ERROR_UNKNOWN,
- "session file has incorrect owner (uid %u != %u)",
- sb.st_uid, getuid());
+ "session file has incorrect owner (uid %" PRIu64" != %" PRIu64 ")",
+ (uint64_t)sb.st_uid, (uint64_t)getuid());
return (-1);
}
mugo = sb.st_mode & (S_IRWXU|S_IRWXG|S_IRWXO);

0 comments on commit 66f0dba

Please sign in to comment.