Lines Matching defs:passwd
166 /* Set if we got the contents of passwd[] from the pap-secrets file. */
179 int (*pap_auth_hook) __P((char *user, char *passwd, char **msgp,
187 int (*pap_passwd_hook) __P((char *user, char *passwd)) = NULL;
193 int (*chap_passwd_hook) __P((char *user, char *passwd)) = NULL;
227 bool uselogin = 0; /* Use /etc/passwd for checking PAP */
373 { "password", o_string, passwd,
455 if (override_value("passwd", option_priority, fname))
456 strlcpy(passwd, p, sizeof(passwd));
657 if (passwd[0] == 0) {
659 if (!get_pap_passwd(passwd))
662 upap_authwithpeer(unit, user, passwd);
862 BZERO(passwd, MAXSECRETLEN);
901 BZERO(passwd, MAXSECRETLEN);
1188 ao->neg_upap = !refuse_pap && (passwd[0] != 0 || get_pap_passwd(NULL));
1190 && (passwd[0] != 0 ||
1194 passwd[0] != 0 ||
1218 * check_passwd - Check the user name and passwd against the PAP secrets
1240 char passwd[256], user[256];
1249 slprintf(passwd, sizeof(passwd), "%.*v", passwdlen, apasswd);
1257 ret = (*pap_auth_hook)(user, passwd, msg, &addrs, &opts);
1266 BZERO(passwd, sizeof(passwd));
1295 if ((ret = plogin(user, passwd, msg)) == UPAP_AUTHACK)
1300 if ((cryptpap || strcmp(passwd, secret) != 0)
1301 && strcmp(crypt(passwd, secret), secret) != 0)
1313 * Frustrate passwd stealer programs.
1335 BZERO(passwd, sizeof(passwd));
1421 plogin(user, passwd, msg)
1423 char *passwd;
1442 PAM_password = passwd;
1476 struct passwd *pw = getpwnam(user);
1501 * If no passwd, don't let them login.
1504 || strcmp(crypt(passwd, pw->pw_passwd), pw->pw_passwd) != 0)
1519 if (pw != (struct passwd *)NULL) {
1622 * Assumes passwd points to MAXSECRETLEN bytes of space (if non-null).
1625 get_pap_passwd(passwd)
1626 char *passwd;
1637 ret = (*pap_passwd_hook)(user, passwd);
1653 if (passwd != NULL)
1654 strlcpy(passwd, secret, MAXSECRETLEN);
1811 if (!am_server && passwd[0] != 0) {
1812 strlcpy(secbuf, passwd, sizeof(secbuf));
1875 if (!am_server && passwd[0] != '\0') {
1876 strlcpy(secret, passwd, MAXWORDLEN);
2420 struct passwd *pw;