summaryrefslogtreecommitdiff
path: root/modules/pam_loginuid/pam_loginuid.c
diff options
context:
space:
mode:
authorTomas Mraz <tm@t8m.info>2008-08-29 07:33:20 +0000
committerTomas Mraz <tm@t8m.info>2008-08-29 07:33:20 +0000
commitd524b169597996b61f10ce7cdb4aa39d27867eb9 (patch)
tree0ad51468ba352d991680dd89fc1d7358e3de4f75 /modules/pam_loginuid/pam_loginuid.c
parentcd2a462877d9f0510d03375845dbd6dad433cf92 (diff)
Relevant BUGIDs: rhbz#460241
Purpose of commit: bugfix Commit summary: --------------- 2008-08-29 Tomas Mraz <t8m@centrum.cz> * modules/pam_loginuid/pam_loginuid.c(set_loginuid): Uids are unsigned.
Diffstat (limited to 'modules/pam_loginuid/pam_loginuid.c')
-rw-r--r--modules/pam_loginuid/pam_loginuid.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/modules/pam_loginuid/pam_loginuid.c b/modules/pam_loginuid/pam_loginuid.c
index 13509e7e..4fa486c7 100644
--- a/modules/pam_loginuid/pam_loginuid.c
+++ b/modules/pam_loginuid/pam_loginuid.c
@@ -53,7 +53,7 @@ static int set_loginuid(pam_handle_t *pamh, uid_t uid)
int fd, count, rc = 0;
char loginuid[24];
- count = snprintf(loginuid, sizeof(loginuid), "%d", uid);
+ count = snprintf(loginuid, sizeof(loginuid), "%lu", (unsigned long)uid);
fd = open("/proc/self/loginuid", O_NOFOLLOW|O_WRONLY|O_TRUNC);
if (fd < 0) {
if (errno != ENOENT) {