mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-11-19 18:00:33 +01:00
Cast uid_t and gid_t to unsigned before passing to printf %u.
svn:r17392
This commit is contained in:
parent
bc597758dc
commit
4cddcf8873
@ -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 */
|
||||
|
Loading…
Reference in New Issue
Block a user