[BACK]Return to sshconnect2.c CVS log [TXT][DIR] Up to [local] / src / usr.bin / ssh

Diff for /src/usr.bin/ssh/sshconnect2.c between version 1.217 and 1.218

version 1.217, 2015/01/19 19:52:16 version 1.218, 2015/01/19 20:07:45
Line 279 
Line 279 
         int     *batch_flag;    /* flag in option struct that disables method */          int     *batch_flag;    /* flag in option struct that disables method */
 };  };
   
 void    input_userauth_success(int, u_int32_t, void *);  int     input_userauth_success(int, u_int32_t, void *);
 void    input_userauth_success_unexpected(int, u_int32_t, void *);  int     input_userauth_success_unexpected(int, u_int32_t, void *);
 void    input_userauth_failure(int, u_int32_t, void *);  int     input_userauth_failure(int, u_int32_t, void *);
 void    input_userauth_banner(int, u_int32_t, void *);  int     input_userauth_banner(int, u_int32_t, void *);
 void    input_userauth_error(int, u_int32_t, void *);  int     input_userauth_error(int, u_int32_t, void *);
 void    input_userauth_info_req(int, u_int32_t, void *);  int     input_userauth_info_req(int, u_int32_t, void *);
 void    input_userauth_pk_ok(int, u_int32_t, void *);  int     input_userauth_pk_ok(int, u_int32_t, void *);
 void    input_userauth_passwd_changereq(int, u_int32_t, void *);  int     input_userauth_passwd_changereq(int, u_int32_t, void *);
   
 int     userauth_none(Authctxt *);  int     userauth_none(Authctxt *);
 int     userauth_pubkey(Authctxt *);  int     userauth_pubkey(Authctxt *);
Line 296 
Line 296 
   
 #ifdef GSSAPI  #ifdef GSSAPI
 int     userauth_gssapi(Authctxt *authctxt);  int     userauth_gssapi(Authctxt *authctxt);
 void    input_gssapi_response(int type, u_int32_t, void *);  int     input_gssapi_response(int type, u_int32_t, void *);
 void    input_gssapi_token(int type, u_int32_t, void *);  int     input_gssapi_token(int type, u_int32_t, void *);
 void    input_gssapi_hash(int type, u_int32_t, void *);  int     input_gssapi_hash(int type, u_int32_t, void *);
 void    input_gssapi_error(int, u_int32_t, void *);  int     input_gssapi_error(int, u_int32_t, void *);
 void    input_gssapi_errtok(int, u_int32_t, void *);  int     input_gssapi_errtok(int, u_int32_t, void *);
 #endif  #endif
   
 void    userauth(Authctxt *, char *);  void    userauth(Authctxt *, char *);
Line 449 
Line 449 
 }  }
   
 /* ARGSUSED */  /* ARGSUSED */
 void  int
 input_userauth_error(int type, u_int32_t seq, void *ctxt)  input_userauth_error(int type, u_int32_t seq, void *ctxt)
 {  {
         fatal("input_userauth_error: bad message during authentication: "          fatal("input_userauth_error: bad message during authentication: "
             "type %d", type);              "type %d", type);
           return 0;
 }  }
   
 /* ARGSUSED */  /* ARGSUSED */
 void  int
 input_userauth_banner(int type, u_int32_t seq, void *ctxt)  input_userauth_banner(int type, u_int32_t seq, void *ctxt)
 {  {
         char *msg, *raw, *lang;          char *msg, *raw, *lang;
Line 476 
Line 477 
         }          }
         free(raw);          free(raw);
         free(lang);          free(lang);
           return 0;
 }  }
   
 /* ARGSUSED */  /* ARGSUSED */
 void  int
 input_userauth_success(int type, u_int32_t seq, void *ctxt)  input_userauth_success(int type, u_int32_t seq, void *ctxt)
 {  {
         Authctxt *authctxt = ctxt;          Authctxt *authctxt = ctxt;
Line 493 
Line 495 
         free(authctxt->methoddata);          free(authctxt->methoddata);
         authctxt->methoddata = NULL;          authctxt->methoddata = NULL;
         authctxt->success = 1;                  /* break out */          authctxt->success = 1;                  /* break out */
           return 0;
 }  }
   
 void  int
 input_userauth_success_unexpected(int type, u_int32_t seq, void *ctxt)  input_userauth_success_unexpected(int type, u_int32_t seq, void *ctxt)
 {  {
         Authctxt *authctxt = ctxt;          Authctxt *authctxt = ctxt;
Line 505 
Line 508 
   
         fatal("Unexpected authentication success during %s.",          fatal("Unexpected authentication success during %s.",
             authctxt->method->name);              authctxt->method->name);
           return 0;
 }  }
   
 /* ARGSUSED */  /* ARGSUSED */
 void  int
 input_userauth_failure(int type, u_int32_t seq, void *ctxt)  input_userauth_failure(int type, u_int32_t seq, void *ctxt)
 {  {
         Authctxt *authctxt = ctxt;          Authctxt *authctxt = ctxt;
Line 531 
Line 535 
         debug("Authentications that can continue: %s", authlist);          debug("Authentications that can continue: %s", authlist);
   
         userauth(authctxt, authlist);          userauth(authctxt, authlist);
           return 0;
 }  }
   
 /* ARGSUSED */  /* ARGSUSED */
 void  int
 input_userauth_pk_ok(int type, u_int32_t seq, void *ctxt)  input_userauth_pk_ok(int type, u_int32_t seq, void *ctxt)
 {  {
         Authctxt *authctxt = ctxt;          Authctxt *authctxt = ctxt;
Line 602 
Line 607 
         /* try another method if we did not send a packet */          /* try another method if we did not send a packet */
         if (sent == 0)          if (sent == 0)
                 userauth(authctxt, NULL);                  userauth(authctxt, NULL);
           return 0;
 }  }
   
 #ifdef GSSAPI  #ifdef GSSAPI
Line 885 
Line 891 
  * parse PASSWD_CHANGEREQ, prompt user and send SSH2_MSG_USERAUTH_REQUEST   * parse PASSWD_CHANGEREQ, prompt user and send SSH2_MSG_USERAUTH_REQUEST
  */   */
 /* ARGSUSED */  /* ARGSUSED */
 void  int
 input_userauth_passwd_changereq(int type, u_int32_t seqnr, void *ctxt)  input_userauth_passwd_changereq(int type, u_int32_t seqnr, void *ctxt)
 {  {
         Authctxt *authctxt = ctxt;          Authctxt *authctxt = ctxt;
Line 926 
Line 932 
                 password = read_passphrase(prompt, RP_ALLOW_EOF);                  password = read_passphrase(prompt, RP_ALLOW_EOF);
                 if (password == NULL) {                  if (password == NULL) {
                         /* bail out */                          /* bail out */
                         return;                          return 0;
                 }                  }
                 snprintf(prompt, sizeof(prompt),                  snprintf(prompt, sizeof(prompt),
                     "Retype %.30s@%.128s's new password: ",                      "Retype %.30s@%.128s's new password: ",
Line 949 
Line 955 
   
         dispatch_set(SSH2_MSG_USERAUTH_PASSWD_CHANGEREQ,          dispatch_set(SSH2_MSG_USERAUTH_PASSWD_CHANGEREQ,
             &input_userauth_passwd_changereq);              &input_userauth_passwd_changereq);
           return 0;
 }  }
   
 static int  static int
Line 1373 
Line 1380 
 /*  /*
  * parse INFO_REQUEST, prompt user and send INFO_RESPONSE   * parse INFO_REQUEST, prompt user and send INFO_RESPONSE
  */   */
 void  int
 input_userauth_info_req(int type, u_int32_t seq, void *ctxt)  input_userauth_info_req(int type, u_int32_t seq, void *ctxt)
 {  {
         Authctxt *authctxt = ctxt;          Authctxt *authctxt = ctxt;
Line 1425 
Line 1432 
   
         packet_add_padding(64);          packet_add_padding(64);
         packet_send();          packet_send();
           return 0;
 }  }
   
 static int  static int

Legend:
Removed from v.1.217  
changed lines
  Added in v.1.218