summaryrefslogtreecommitdiff
path: root/modules/pam_loginuid/pam_loginuid.c
diff options
context:
space:
mode:
Diffstat (limited to 'modules/pam_loginuid/pam_loginuid.c')
-rw-r--r--modules/pam_loginuid/pam_loginuid.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/modules/pam_loginuid/pam_loginuid.c b/modules/pam_loginuid/pam_loginuid.c
index 13d915e3..3e9b4779 100644
--- a/modules/pam_loginuid/pam_loginuid.c
+++ b/modules/pam_loginuid/pam_loginuid.c
@@ -56,12 +56,10 @@ static int set_loginuid(pam_handle_t *pamh, uid_t uid)
count = snprintf(loginuid, sizeof(loginuid), "%d", uid);
fd = open("/proc/self/loginuid", O_NOFOLLOW|O_WRONLY|O_TRUNC);
if (fd < 0) {
- int loglevel = LOG_DEBUG;
if (errno != ENOENT) {
rc = 1;
- loglevel = LOG_ERR;
+ pam_syslog(pamh, LOG_ERR, "set_loginuid failed opening loginuid");
}
- pam_syslog(pamh, loglevel, "set_loginuid failed opening loginuid");
return rc;
}
if (pam_modutil_write(fd, loginuid, count) != count)