Consistently cast tty and user to const char * in printf()-like contexts.
This commit is contained in:
parent
83e95fb30b
commit
1628e293fd
@ -85,20 +85,21 @@ pam_sm_acct_mgmt(pam_handle_t *pamh, int flags __unused,
|
|||||||
if (login_access(user, rhost) != 0)
|
if (login_access(user, rhost) != 0)
|
||||||
return (PAM_SUCCESS);
|
return (PAM_SUCCESS);
|
||||||
PAM_VERBOSE_ERROR("%s is not allowed to log in from %s",
|
PAM_VERBOSE_ERROR("%s is not allowed to log in from %s",
|
||||||
user, rhost);
|
(const char *)user, (const char *)rhost);
|
||||||
} else if (tty != NULL && *(const char *)tty != '\0') {
|
} else if (tty != NULL && *(const char *)tty != '\0') {
|
||||||
PAM_LOG("Checking login.access for user %s on tty %s",
|
PAM_LOG("Checking login.access for user %s on tty %s",
|
||||||
(const char *)user, (const char *)tty);
|
(const char *)user, (const char *)tty);
|
||||||
if (login_access(user, tty) != 0)
|
if (login_access(user, tty) != 0)
|
||||||
return (PAM_SUCCESS);
|
return (PAM_SUCCESS);
|
||||||
PAM_VERBOSE_ERROR("%s is not allowed to log in on %s",
|
PAM_VERBOSE_ERROR("%s is not allowed to log in on %s",
|
||||||
user, tty);
|
(const char *)user, (const char *)tty);
|
||||||
} else {
|
} else {
|
||||||
PAM_LOG("Checking login.access for user %s",
|
PAM_LOG("Checking login.access for user %s",
|
||||||
(const char *)user);
|
(const char *)user);
|
||||||
if (login_access(user, "***unknown***") != 0)
|
if (login_access(user, "***unknown***") != 0)
|
||||||
return (PAM_SUCCESS);
|
return (PAM_SUCCESS);
|
||||||
PAM_VERBOSE_ERROR("%s is not allowed to log in", user);
|
PAM_VERBOSE_ERROR("%s is not allowed to log in",
|
||||||
|
(const char *)user);
|
||||||
}
|
}
|
||||||
|
|
||||||
return (PAM_AUTH_ERR);
|
return (PAM_AUTH_ERR);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user