View | Details | Raw Unified | Return to bug 2876 | Differences between
and this patch

Collapse All | Expand All

(-)a/auth-pam.c (-8 / +8 lines)
Lines 867-881 sshpam_query(void *ctx, char **name, char **info, Link Here
867
			return (0);
867
			return (0);
868
		case PAM_ERROR_MSG:
868
		case PAM_ERROR_MSG:
869
		case PAM_TEXT_INFO:
869
		case PAM_TEXT_INFO:
870
			/* accumulate messages */
870
			*num = 2;
871
			len = plen + mlen + 2;
871
			free(*info);
872
			**prompts = xreallocarray(**prompts, 1, len);
872
			xasprintf(info, "%s\n", msg);
873
			strlcpy(**prompts + plen, msg, len - plen);
874
			plen += mlen;
875
			strlcat(**prompts + plen, "\n", len - plen);
876
			plen++;
877
			free(msg);
873
			free(msg);
878
			break;
874
			return (0);
879
		case PAM_ACCT_EXPIRED:
875
		case PAM_ACCT_EXPIRED:
880
		case PAM_MAXTRIES:
876
		case PAM_MAXTRIES:
881
			if (type == PAM_ACCT_EXPIRED)
877
			if (type == PAM_ACCT_EXPIRED)
Lines 983-988 sshpam_respond(void *ctx, u_int num, char **resp) Link Here
983
	default:
979
	default:
984
		return (-1);
980
		return (-1);
985
	}
981
	}
982
	if (num == 2){
983
		// returning one here continues it seems
984
		return (1);
985
	}
986
	if (num != 1) {
986
	if (num != 1) {
987
		error("PAM: expected one response, got %u", num);
987
		error("PAM: expected one response, got %u", num);
988
		return (-1);
988
		return (-1);

Return to bug 2876