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

Diff for /src/usr.bin/ssh/auth2.c between version 1.65 and 1.66

version 1.65, 2001/06/23 03:04:43 version 1.66, 2001/06/23 15:12:17
Line 70 
Line 70 
   
 /* protocol */  /* protocol */
   
 void    input_service_request(int type, int plen, void *ctxt);  static void input_service_request(int, int, void *);
 void    input_userauth_request(int type, int plen, void *ctxt);  static void input_userauth_request(int, int, void *);
 void    protocol_error(int type, int plen, void *ctxt);  static void protocol_error(int, int, void *);
   
 /* helper */  /* helper */
 Authmethod      *authmethod_lookup(const char *name);  static Authmethod *authmethod_lookup(const char *);
 char    *authmethods_get(void);  char *authmethods_get(void);
 int     user_key_allowed(struct passwd *pw, Key *key);  static int user_key_allowed(struct passwd *, Key *);
 int  static int hostbased_key_allowed(struct passwd *, const char *, char *, Key *);
 hostbased_key_allowed(struct passwd *pw, const char *cuser, char *chost,  
     Key *key);  
   
 /* auth */  /* auth */
 void    userauth_banner(void);  static void userauth_banner(void);
 void    userauth_reply(Authctxt *authctxt, int authenticated);  static int userauth_none(Authctxt *);
 int     userauth_none(Authctxt *authctxt);  static int userauth_passwd(Authctxt *);
 int     userauth_passwd(Authctxt *authctxt);  static int userauth_pubkey(Authctxt *);
 int     userauth_pubkey(Authctxt *authctxt);  static int userauth_hostbased(Authctxt *);
 int     userauth_hostbased(Authctxt *authctxt);  static int userauth_kbdint(Authctxt *);
 int     userauth_kbdint(Authctxt *authctxt);  
   
 Authmethod authmethods[] = {  Authmethod authmethods[] = {
         {"none",          {"none",
Line 131 
Line 128 
         do_authenticated(authctxt);          do_authenticated(authctxt);
 }  }
   
 void  static void
 protocol_error(int type, int plen, void *ctxt)  protocol_error(int type, int plen, void *ctxt)
 {  {
         log("auth: protocol error: type %d plen %d", type, plen);          log("auth: protocol error: type %d plen %d", type, plen);
Line 141 
Line 138 
         packet_write_wait();          packet_write_wait();
 }  }
   
 void  static void
 input_service_request(int type, int plen, void *ctxt)  input_service_request(int type, int plen, void *ctxt)
 {  {
         Authctxt *authctxt = ctxt;          Authctxt *authctxt = ctxt;
Line 174 
Line 171 
         xfree(service);          xfree(service);
 }  }
   
 void  static void
 input_userauth_request(int type, int plen, void *ctxt)  input_userauth_request(int type, int plen, void *ctxt)
 {  {
         Authctxt *authctxt = ctxt;          Authctxt *authctxt = ctxt;
Line 280 
Line 277 
         }          }
 }  }
   
 void  static void
 userauth_banner(void)  userauth_banner(void)
 {  {
         struct stat st;          struct stat st;
Line 311 
Line 308 
         return;          return;
 }  }
   
 int  static int
 userauth_none(Authctxt *authctxt)  userauth_none(Authctxt *authctxt)
 {  {
         /* disable method "none", only allowed one time */          /* disable method "none", only allowed one time */
Line 323 
Line 320 
         return authctxt->valid ? auth_password(authctxt, "") : 0;          return authctxt->valid ? auth_password(authctxt, "") : 0;
 }  }
   
 int  static int
 userauth_passwd(Authctxt *authctxt)  userauth_passwd(Authctxt *authctxt)
 {  {
         char *password;          char *password;
Line 343 
Line 340 
         return authenticated;          return authenticated;
 }  }
   
 int  static int
 userauth_kbdint(Authctxt *authctxt)  userauth_kbdint(Authctxt *authctxt)
 {  {
         int authenticated = 0;          int authenticated = 0;
Line 363 
Line 360 
         return authenticated;          return authenticated;
 }  }
   
 int  static int
 userauth_pubkey(Authctxt *authctxt)  userauth_pubkey(Authctxt *authctxt)
 {  {
         Buffer b;          Buffer b;
Line 465 
Line 462 
         return authenticated;          return authenticated;
 }  }
   
 int  static int
 userauth_hostbased(Authctxt *authctxt)  userauth_hostbased(Authctxt *authctxt)
 {  {
         Buffer b;          Buffer b;
Line 582 
Line 579 
         return list;          return list;
 }  }
   
 Authmethod *  static Authmethod *
 authmethod_lookup(const char *name)  authmethod_lookup(const char *name)
 {  {
         Authmethod *method = NULL;          Authmethod *method = NULL;
Line 597 
Line 594 
 }  }
   
 /* return 1 if user allows given key */  /* return 1 if user allows given key */
 int  static int
 user_key_allowed2(struct passwd *pw, Key *key, char *file)  user_key_allowed2(struct passwd *pw, Key *key, char *file)
 {  {
         char line[8192];          char line[8192];
Line 685 
Line 682 
 }  }
   
 /* check whether given key is in .ssh/authorized_keys* */  /* check whether given key is in .ssh/authorized_keys* */
 int  static int
 user_key_allowed(struct passwd *pw, Key *key)  user_key_allowed(struct passwd *pw, Key *key)
 {  {
         int success;          int success;
Line 705 
Line 702 
 }  }
   
 /* return 1 if given hostkey is allowed */  /* return 1 if given hostkey is allowed */
 int  static int
 hostbased_key_allowed(struct passwd *pw, const char *cuser, char *chost,  hostbased_key_allowed(struct passwd *pw, const char *cuser, char *chost,
     Key *key)      Key *key)
 {  {

Legend:
Removed from v.1.65  
changed lines
  Added in v.1.66