aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2008-11-26 16:13:12 +0000
committerNick Mathewson <nickm@torproject.org>2008-11-26 16:13:12 +0000
commit4cddcf887362d3a5c8f938694ba413f08ee6311c (patch)
tree8c5e61440c13974f2fe642cafa4d18a6e073685e /src
parentbc597758dc79008226a25c0f11a8713709b94f2f (diff)
downloadtor-4cddcf887362d3a5c8f938694ba413f08ee6311c.tar
tor-4cddcf887362d3a5c8f938694ba413f08ee6311c.tar.gz
Cast uid_t and gid_t to unsigned before passing to printf %u.
svn:r17392
Diffstat (limited to 'src')
-rw-r--r--src/common/compat.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/src/common/compat.c b/src/common/compat.c
index df1e94b02..31fbf263e 100644
--- a/src/common/compat.c
+++ b/src/common/compat.c
@@ -978,7 +978,8 @@ log_credential_status(void)
return -1;
} else {
log_fn(CREDENTIAL_LOG_LEVEL, LD_GENERAL,
- "UID is %u (real), %u (effective), %u (saved)", ruid, euid, suid);
+ "UID is %u (real), %u (effective), %u (saved)",
+ (unsigned)ruid, (unsigned)euid, (unsigned)suid);
}
#else
/* getresuid is not present on MacOS X, so we can't get the saved (E)UID */
@@ -987,7 +988,8 @@ log_credential_status(void)
(void)suid;
log_fn(CREDENTIAL_LOG_LEVEL, LD_GENERAL,
- "UID is %u (real), %u (effective), unknown (saved)", ruid, euid);
+ "UID is %u (real), %u (effective), unknown (saved)",
+ (unsigned)ruid, (unsigned)euid);
#endif
/* log GIDs */
@@ -997,7 +999,8 @@ log_credential_status(void)
return -1;
} else {
log_fn(CREDENTIAL_LOG_LEVEL, LD_GENERAL,
- "GID is %u (real), %u (effective), %u (saved)", rgid, egid, sgid);
+ "GID is %u (real), %u (effective), %u (saved)",
+ (unsigned)rgid, (unsigned)egid, (unsigned)sgid);
}
#else
/* getresgid is not present on MacOS X, so we can't get the saved (E)GID */
@@ -1005,7 +1008,8 @@ log_credential_status(void)
egid = getegid();
(void)sgid;
log_fn(CREDENTIAL_LOG_LEVEL, LD_GENERAL,
- "GID is %u (real), %u (effective), unknown (saved)", rgid, egid);
+ "GID is %u (real), %u (effective), unknown (saved)",
+ (unsigned)rgid, (unsigned)egid);
#endif
/* log supplementary groups */