summaryrefslogtreecommitdiff
path: root/auth-pam.c
diff options
context:
space:
mode:
authorColin Watson <cjwatson@debian.org>2016-12-20 00:22:52 +0000
committerColin Watson <cjwatson@debian.org>2016-12-20 00:22:52 +0000
commit971a7653746a6972b907dfe0ce139c06e4a6f482 (patch)
tree70fb964265d57ae4967be55b75dbb2a122e9b969 /auth-pam.c
parenta8ed8d256b2e2c05b0c15565a7938028c5192277 (diff)
parent4a354fc231174901f2629437c2a6e924a2dd6772 (diff)
Import openssh_7.4p1.orig.tar.gz
Diffstat (limited to 'auth-pam.c')
-rw-r--r--auth-pam.c18
1 files changed, 5 insertions, 13 deletions
diff --git a/auth-pam.c b/auth-pam.c
index 348fe370a..7d8b2926b 100644
--- a/auth-pam.c
+++ b/auth-pam.c
@@ -66,6 +66,11 @@
66#include <pam/pam_appl.h> 66#include <pam/pam_appl.h>
67#endif 67#endif
68 68
69#if !defined(SSHD_PAM_SERVICE)
70extern char *__progname;
71# define SSHD_PAM_SERVICE __progname
72#endif
73
69/* OpenGroup RFC86.0 and XSSO specify no "const" on arguments */ 74/* OpenGroup RFC86.0 and XSSO specify no "const" on arguments */
70#ifdef PAM_SUN_CODEBASE 75#ifdef PAM_SUN_CODEBASE
71# define sshpam_const /* Solaris, HP-UX, SunOS */ 76# define sshpam_const /* Solaris, HP-UX, SunOS */
@@ -615,7 +620,6 @@ sshpam_cleanup(void)
615static int 620static int
616sshpam_init(Authctxt *authctxt) 621sshpam_init(Authctxt *authctxt)
617{ 622{
618 extern char *__progname;
619 const char *pam_rhost, *pam_user, *user = authctxt->user; 623 const char *pam_rhost, *pam_user, *user = authctxt->user;
620 const char **ptr_pam_user = &pam_user; 624 const char **ptr_pam_user = &pam_user;
621 struct ssh *ssh = active_state; /* XXX */ 625 struct ssh *ssh = active_state; /* XXX */
@@ -947,18 +951,6 @@ do_pam_account(void)
947} 951}
948 952
949void 953void
950do_pam_set_tty(const char *tty)
951{
952 if (tty != NULL) {
953 debug("PAM: setting PAM_TTY to \"%s\"", tty);
954 sshpam_err = pam_set_item(sshpam_handle, PAM_TTY, tty);
955 if (sshpam_err != PAM_SUCCESS)
956 fatal("PAM: failed to set PAM_TTY: %s",
957 pam_strerror(sshpam_handle, sshpam_err));
958 }
959}
960
961void
962do_pam_setcred(int init) 954do_pam_setcred(int init)
963{ 955{
964 sshpam_err = pam_set_item(sshpam_handle, PAM_CONV, 956 sshpam_err = pam_set_item(sshpam_handle, PAM_CONV,