• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /netgear-R7000-V1.0.7.12_1.2.5/ap/gpl/timemachine/netatalk-2.2.5/etc/uams/

Lines Matching refs:passwd

60 static struct passwd	*randpwd;
69 /* handle ~/.passwd. courtesy of shirsch@ibm.net. */
70 static int home_passwd(const struct passwd *pwd,
72 unsigned char *passwd, const int len,
100 if (write(fd, passwd, len) < 0) {
105 if (read(fd, passwd, len) < 0) {
112 if ((passwd[i] != ' ') && isspace(passwd[i]))
113 passwd[i] = '\0';
142 static int afppasswd(const struct passwd *pwd,
144 unsigned char *passwd, int len,
210 /* NOTE: this takes advantage of the fact that passwd doesn't
212 ecb_encrypt((C_Block *) passwd, (C_Block *) passwd, schedule,
228 key[j] = hextable[(passwd[i] & 0xF0) >> 4];
229 key[j + 1] = hextable[passwd[i] & 0x0F];
247 memcpy(passwd, p, len);
260 * depending upon whether or not the password is in ~/.passwd
262 static int randpass(const struct passwd *pwd, const char *file,
263 unsigned char *passwd, const int len, const int set)
268 /* Build pathname to user's '.passwd' file */
281 i = home_passwd(pwd, path, i, passwd, len, set);
294 i = afppasswd(pwd, file, i, passwd, len, set);
302 static int rand_login(void *obj, char *username, int ulen, struct passwd **uam_pwd _U_,
349 static int randnum_logincont(void *obj, struct passwd **uam_pwd,
388 static int rand2num_logincont(void *obj, struct passwd **uam_pwd,
438 struct passwd *pwd, char *ibuf,
459 /* use old passwd to decrypt new passwd */
461 ibuf += PASSWDLEN; /* new passwd */
465 /* now use new passwd to decrypt old passwd */
467 ibuf -= PASSWDLEN; /* old passwd */
484 memset(ibuf, 0, sizeof(seskey)); /* old passwd */
485 memset(ibuf + PASSWDLEN, 0, sizeof(seskey)); /* new passwd */
494 static int randnum_login(void *obj, struct passwd **uam_pwd,
529 static int randnum_login_ext(void *obj, char *uname, struct passwd **uam_pwd,