Project

General

Profile

Submit #2695 ยป usr.src.contrib.diff

dclink, 07/04/2014 07:58 AM

View differences:

contrib/opie/opieftpd.c
536 536
  if (!guest) { /* "ftp" is only account allowed no password */
537 537
#endif	/* DOANONYMOUS */
538 538
    i = opieverify(&opiestate, passwd);
539
    if (legit && i && pwok) 
540
      i = strcmp(crypt(passwd, pw->pw_passwd), pw->pw_passwd);
539
    if (legit && i && pwok) {
540
      char *pp = crypt(passwd, pw->pw_passwd);
541
      i = (pp ? strcmp(pp, pw->pw_passwd) : 0);
542
    }
541 543
    if (!legit || i) {
542 544
      reply(530, "Login incorrect.");
543 545
      pw = NULL;
contrib/opie/opielogin.c
1177 1177
        } else {
1178 1178
	  if (authsok & 2) {
1179 1179
	    pp = crypt(buf, thisuser.pw_passwd);
1180
	    invalid = strcmp(pp, thisuser.pw_passwd);
1180
	    invalid = (pp ? strcmp(pp, thisuser.pw_passwd) : TRUE);
1181 1181
	  } else
1182 1182
            invalid = TRUE;
1183 1183
	}
contrib/tcsh-6/tc.func.c
733 733
	pp = xgetpass("Password:");
734 734

  
735 735
	crpp = XCRYPT(pw, pp, srpp);
736
	if ((strcmp(crpp, srpp) == 0)
736
	if (crpp && (strcmp(crpp, srpp) == 0)
737 737
#ifdef AFS
738 738
	    || (ka_UserAuthenticateGeneral(KA_USERAUTH_VERSION,
739 739
					   afsname,     /* name */
    (1-1/1)