Diff

Differences From Artifact [2be3827d5b]:

To Artifact [bd9ce42f76]:


4606
4607
4608
4609
4610
4611
4612
4613

4614
4615
4616
4617
4618
4619
4620
4606
4607
4608
4609
4610
4611
4612

4613
4614
4615
4616
4617
4618
4619
4620







-
+







	int gotit, need_pw, can_pubkey, can_passwd, can_keyb_inter;
	int tried_pubkey_config, tried_agent, tried_keyb_inter;
	int kbd_inter_running;
	int we_are_in;
	int num_prompts, curr_prompt, echo;
	char username[100];
	int got_username;
	char pwprompt[200];
	char pwprompt[512];
	char password[100];
	void *publickey_blob;
	int publickey_bloblen;
	unsigned char request[5], *response, *p;
	int responselen;
	int keyi, nkeys;
	int authed;
5185
5186
5187
5188
5189
5190
5191




5192
5193





5194

5195
5196
5197
5198
5199
5200
5201
5185
5186
5187
5188
5189
5190
5191
5192
5193
5194
5195


5196
5197
5198
5199
5200

5201
5202
5203
5204
5205
5206
5207
5208







+
+
+
+
-
-
+
+
+
+
+
-
+







		 */
		if (s->curr_prompt < s->num_prompts) {
		    char *prompt;
		    int prompt_len;

		    ssh_pkt_getstring(ssh, &prompt, &prompt_len);
		    if (prompt_len > 0) {
			static const char trunc[] = "<prompt truncated>: ";
			static const int prlen = sizeof(s->pwprompt) -
						 lenof(trunc);
			if (prompt_len > prlen) {
			strncpy(s->pwprompt, prompt, sizeof(s->pwprompt));
			s->pwprompt[prompt_len < sizeof(s->pwprompt) ?
			    memcpy(s->pwprompt, prompt, prlen);
			    strcpy(s->pwprompt + prlen, trunc);
			} else {
			    memcpy(s->pwprompt, prompt, prompt_len);
			    s->pwprompt[prompt_len] = '\0';
				    prompt_len : sizeof(s->pwprompt)-1] = '\0';
			}
		    } else {
			strcpy(s->pwprompt,
			       "<server failed to send prompt>: ");
		    }
		    s->echo = ssh2_pkt_getbool(ssh);
		    s->need_pw = TRUE;
		} else