summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTomas Mraz <tmraz@fedoraproject.org>2014-10-17 08:39:58 +0200
committerTomas Mraz <tmraz@fedoraproject.org>2014-10-17 08:39:58 +0200
commit5df44a328abe4befc4479e16ce7fd86ff2caedcc (patch)
tree61694d3c284e9b4be6ccdcb843385ec1e7a1be5d
parent3ad8ed87726d5c3a6a9f15a5c2dce2ce8aca06b6 (diff)
pam_succeed_if: Fix copy&paste error in rhost and tty values.
modules/pam_succeed_if/pam_succeed_if.c (evaluate): Use PAM_RHOST and PAM_TTY properly for the rhost and tty values.
-rw-r--r--modules/pam_succeed_if/pam_succeed_if.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/modules/pam_succeed_if/pam_succeed_if.c b/modules/pam_succeed_if/pam_succeed_if.c
index 98a84745..aa828fcc 100644
--- a/modules/pam_succeed_if/pam_succeed_if.c
+++ b/modules/pam_succeed_if/pam_succeed_if.c
@@ -298,7 +298,7 @@ evaluate(pam_handle_t *pamh, int debug,
}
if (strcasecmp(left, "rhost") == 0) {
const void *rhost;
- if (pam_get_item(pamh, PAM_SERVICE, &rhost) != PAM_SUCCESS ||
+ if (pam_get_item(pamh, PAM_RHOST, &rhost) != PAM_SUCCESS ||
rhost == NULL)
rhost = "";
snprintf(buf, sizeof(buf), "%s", (const char *)rhost);
@@ -306,7 +306,7 @@ evaluate(pam_handle_t *pamh, int debug,
}
if (strcasecmp(left, "tty") == 0) {
const void *tty;
- if (pam_get_item(pamh, PAM_SERVICE, &tty) != PAM_SUCCESS ||
+ if (pam_get_item(pamh, PAM_TTY, &tty) != PAM_SUCCESS ||
tty == NULL)
tty = "";
snprintf(buf, sizeof(buf), "%s", (const char *)tty);