summaryrefslogtreecommitdiff
path: root/src/login/pam-module.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/login/pam-module.c')
-rw-r--r--src/login/pam-module.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/login/pam-module.c b/src/login/pam-module.c
index 1259457efc..262621d43f 100644
--- a/src/login/pam-module.c
+++ b/src/login/pam-module.c
@@ -184,7 +184,7 @@ static int export_legacy_dbus_address(
return PAM_SUCCESS;
if (asprintf(&s, KERNEL_USER_BUS_FMT ";" UNIX_USER_BUS_FMT,
- (unsigned long) uid, runtime) < 0) {
+ uid, runtime) < 0) {
pam_syslog(handle, LOG_ERR, "Failed to set bus variable.");
return PAM_BUF_ERR;
}
@@ -252,7 +252,7 @@ _public_ PAM_EXTERN int pam_sm_open_session(
if (streq_ptr(service, "systemd-user")) {
_cleanup_free_ char *p = NULL, *rt = NULL;
- if (asprintf(&p, "/run/systemd/users/%lu", (unsigned long) pw->pw_uid) < 0)
+ if (asprintf(&p, "/run/systemd/users/"UID_FMT, pw->pw_uid) < 0)
return PAM_BUF_ERR;
r = parse_env_file(p, NEWLINE,