#include <sys/file.h>
#include <pwd.h>
#include <endian.h>
-#include <sys/capability.h>
#include <security/pam_modules.h>
#include <security/_pam_macros.h>
}
*ret_pw = pw;
- *ret_username = username ? username : pw->pw_name;
+ *ret_username = username;
return PAM_SUCCESS;
}
if (access("/sys/fs/kdbus", F_OK) < 0)
return PAM_SUCCESS;
- if (asprintf(&s, KERNEL_USER_BUS_FMT ";" UNIX_USER_BUS_FMT,
- uid, runtime) < 0) {
+ if (asprintf(&s, KERNEL_USER_BUS_ADDRESS_FMT ";" UNIX_USER_BUS_ADDRESS_FMT, uid, runtime) < 0) {
pam_syslog(handle, LOG_ERR, "Failed to set bus variable.");
return PAM_BUF_ERR;
}