Diff

Differences From Artifact [2b8085bd64]:

To Artifact [6fe8160432]:


3869
3870
3871
3872
3873
3874
3875

3876
3877
3878
3879
3880
3881
3882
    } type;
    static int gotit, need_pw, can_pubkey, can_passwd, can_keyb_inter;
    static int tried_pubkey_config, tried_agent, tried_keyb_inter;
    static int kbd_inter_running;
    static int we_are_in;
    static int num_prompts, echo;
    static char username[100];

    static char pwprompt[200];
    static char password[100];
    static void *publickey_blob;
    static int publickey_bloblen;

    crBegin;








>







3869
3870
3871
3872
3873
3874
3875
3876
3877
3878
3879
3880
3881
3882
3883
    } type;
    static int gotit, need_pw, can_pubkey, can_passwd, can_keyb_inter;
    static int tried_pubkey_config, tried_agent, tried_keyb_inter;
    static int kbd_inter_running;
    static int we_are_in;
    static int num_prompts, echo;
    static char username[100];
    static int got_username;
    static char pwprompt[200];
    static char password[100];
    static void *publickey_blob;
    static int publickey_bloblen;

    crBegin;

3913
3914
3915
3916
3917
3918
3919

3920
3921
3922
3923
3924
3925
3926
3927
3928
3929
3930
3931
3932
3933
3934
3935
     *    logged in to a particular machine before; so they want to
     *    type a username, and then _either_ their key will be
     *    accepted, _or_ they will type a password. If they mistype
     *    the username they will want to be able to get back and
     *    retype it!
     */
    username[0] = '\0';

    do {
	static int pos;
	static char c;

	/*
	 * Get a username.
	 */
	pos = 0;
	if (*username && !cfg.change_username) {
	    /*
	     * We got a username last time round this loop, and
	     * with change_username turned off we don't try to get
	     * it again.
	     */
	} else if ((flags & FLAG_INTERACTIVE) && !*cfg.username) {
	    if (ssh_get_line) {







>








|







3914
3915
3916
3917
3918
3919
3920
3921
3922
3923
3924
3925
3926
3927
3928
3929
3930
3931
3932
3933
3934
3935
3936
3937
     *    logged in to a particular machine before; so they want to
     *    type a username, and then _either_ their key will be
     *    accepted, _or_ they will type a password. If they mistype
     *    the username they will want to be able to get back and
     *    retype it!
     */
    username[0] = '\0';
    got_username = FALSE;
    do {
	static int pos;
	static char c;

	/*
	 * Get a username.
	 */
	pos = 0;
	if (got_username && !cfg.change_username) {
	    /*
	     * We got a username last time round this loop, and
	     * with change_username turned off we don't try to get
	     * it again.
	     */
	} else if ((flags & FLAG_INTERACTIVE) && !*cfg.username) {
	    if (ssh_get_line) {
3991
3992
3993
3994
3995
3996
3997

3998
3999
4000
4001
4002
4003
4004
	    strncpy(username, cfg.username, 99);
	    username[99] = '\0';
	    if ((flags & FLAG_VERBOSE) || (flags & FLAG_INTERACTIVE)) {
		sprintf(stuff, "Using username \"%s\".\r\n", username);
		c_write_str(stuff);
	    }
	}


	/*
	 * Send an authentication request using method "none": (a)
	 * just in case it succeeds, and (b) so that we know what
	 * authentication methods we can usefully try next.
	 */
	ssh_pkt_ctx &= ~SSH2_PKTCTX_AUTH_MASK;







>







3993
3994
3995
3996
3997
3998
3999
4000
4001
4002
4003
4004
4005
4006
4007
	    strncpy(username, cfg.username, 99);
	    username[99] = '\0';
	    if ((flags & FLAG_VERBOSE) || (flags & FLAG_INTERACTIVE)) {
		sprintf(stuff, "Using username \"%s\".\r\n", username);
		c_write_str(stuff);
	    }
	}
	got_username = TRUE;

	/*
	 * Send an authentication request using method "none": (a)
	 * just in case it succeeds, and (b) so that we know what
	 * authentication methods we can usefully try next.
	 */
	ssh_pkt_ctx &= ~SSH2_PKTCTX_AUTH_MASK;