ViewVC Help
View File | Revision Log | Show Annotations | Download File | View Changeset | Root Listing
root/src/vendor-crypto/openssh/dist/auth-pam.c
(Generate patch)

Comparing vendor-crypto/openssh/dist/auth-pam.c (file contents):
Revision 12134 by laffer1, Sat Nov 5 20:28:15 2016 UTC vs.
Revision 12135 by laffer1, Fri Jan 18 20:47:32 2019 UTC

# Line 66 | Line 66
66   #include <pam/pam_appl.h>
67   #endif
68  
69 + #if !defined(SSHD_PAM_SERVICE)
70 + extern char *__progname;
71 + # define SSHD_PAM_SERVICE               __progname
72 + #endif
73 +
74   /* OpenGroup RFC86.0 and XSSO specify no "const" on arguments */
75   #ifdef PAM_SUN_CODEBASE
76   # define sshpam_const           /* Solaris, HP-UX, SunOS */
# Line 615 | Line 620 | sshpam_cleanup(void)
620   static int
621   sshpam_init(Authctxt *authctxt)
622   {
618        extern char *__progname;
623          const char *pam_rhost, *pam_user, *user = authctxt->user;
624          const char **ptr_pam_user = &pam_user;
625          struct ssh *ssh = active_state; /* XXX */
# Line 826 | Line 830 | fake_password(const char *wire_password)
830                  fatal("%s: password length too long: %zu", __func__, l);
831  
832          ret = malloc(l + 1);
833 +        if (ret == NULL)
834 +                return NULL;
835          for (i = 0; i < l; i++)
836                  ret[i] = junk[i % (sizeof(junk) - 1)];
837          ret[i] = '\0';
# Line 944 | Line 950 | do_pam_account(void)
950  
951          sshpam_account_status = 1;
952          return (sshpam_account_status);
947 }
948
949 void
950 do_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        }
953   }
954  
955   void

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines