~ubuntu-branches/ubuntu/utopic/dropbear/utopic-proposed

« back to all changes in this revision

Viewing changes to auth.h

  • Committer: Bazaar Package Importer
  • Author(s): Matt Johnston
  • Date: 2005-12-08 19:20:21 UTC
  • mfrom: (1.2.2 upstream)
  • Revision ID: james.westby@ubuntu.com-20051208192021-nyp9rwnt77nsg6ty
Tags: 0.47-1
* New upstream release.
* SECURITY: Fix incorrect buffer sizing.

Show diffs side-by-side

added added

removed removed

Lines of Context:
41
41
/* Client functions */
42
42
void recv_msg_userauth_failure();
43
43
void recv_msg_userauth_success();
 
44
void recv_msg_userauth_specific_60();
44
45
void recv_msg_userauth_pk_ok();
 
46
void recv_msg_userauth_info_request();
45
47
void cli_get_user();
46
48
void cli_auth_getmethods();
47
49
void cli_auth_try();
48
50
void recv_msg_userauth_banner();
49
51
void cli_pubkeyfail();
50
 
int cli_auth_password();
 
52
void cli_auth_password();
51
53
int cli_auth_pubkey();
 
54
void cli_auth_interactive();
52
55
 
53
56
 
54
57
#define MAX_USERNAME_LEN 25 /* arbitrary for the moment */
55
58
 
56
 
#define AUTH_TYPE_PUBKEY        1 << 0
57
 
#define AUTH_TYPE_PASSWORD      1 << 1
 
59
#define AUTH_TYPE_NONE      1
 
60
#define AUTH_TYPE_PUBKEY    1 << 1
 
61
#define AUTH_TYPE_PASSWORD  1 << 2
 
62
#define AUTH_TYPE_INTERACT  1 << 3
58
63
 
59
 
/* auth types, "none" means we should return list of acceptable types */
60
 
#define AUTH_METHOD_NONE        "none"
 
64
#define AUTH_METHOD_NONE "none"
61
65
#define AUTH_METHOD_NONE_LEN 4
62
66
#define AUTH_METHOD_PUBKEY "publickey"
63
67
#define AUTH_METHOD_PUBKEY_LEN 9
64
68
#define AUTH_METHOD_PASSWORD "password"
65
69
#define AUTH_METHOD_PASSWORD_LEN 8
 
70
#define AUTH_METHOD_INTERACT "keyboard-interactive"
 
71
#define AUTH_METHOD_INTERACT_LEN 20
 
72
 
 
73
 
66
74
 
67
75
/* This structure is shared between server and client - it contains
68
76
 * relatively little extraneous bits when used for the client rather than the
77
85
        unsigned authdone : 1; /* 0 if we haven't authed, 1 if we have. Applies for
78
86
                                                          client and server (though has differing [obvious]
79
87
                                                          meanings). */
 
88
        unsigned perm_warn : 1; /* Server only, set if bad permissions on 
 
89
                                                           ~/.ssh/authorized_keys have already been
 
90
                                                           logged. */
80
91
 
81
92
        /* These are only used for the server */
82
93
        char *printableuser; /* stripped of control chars, used for logs etc */
84
95
 
85
96
};
86
97
 
87
 
struct PubkeyList;
88
 
/* A singly linked list of pubkeys */
89
 
struct PubkeyList {
 
98
struct SignKeyList;
 
99
/* A singly linked list of signing keys */
 
100
struct SignKeyList {
90
101
 
91
102
        sign_key *key;
92
103
        int type; /* The type of key */
93
 
        struct PubkeyList *next;
 
104
        struct SignKeyList *next;
94
105
        /* filename? or the buffer? for encrypted keys, so we can later get
95
106
         * the private key portion */
96
107