diff options
author | Ben Lindstrom <mouring@eviladmin.org> | 2001-07-04 04:46:56 +0000 |
---|---|---|
committer | Ben Lindstrom <mouring@eviladmin.org> | 2001-07-04 04:46:56 +0000 |
commit | 4cc240dabbd81a308f06f2717b1942041fe0e205 (patch) | |
tree | 07291c8c2c467fc2ecec9166ed0d8ec1e75631a3 /auth.h | |
parent | 5bf5d67d497ed91c19851db6b904d54003afe67e (diff) |
- markus@cvs.openbsd.org 2001/06/26 17:27:25
[authfd.h authfile.h auth.h auth-options.h bufaux.h buffer.h
canohost.h channels.h cipher.h clientloop.h compat.h compress.h
crc32.h deattack.h dh.h dispatch.h groupaccess.c groupaccess.h
hostfile.h kex.h key.h log.c log.h mac.h misc.c misc.h mpaux.h
packet.h radix.h readconf.h readpass.h rsa.h servconf.h serverloop.h
session.h sftp-common.c sftp-common.h sftp-glob.h sftp-int.h
sshconnect.h ssh-dss.h sshlogin.h sshpty.h ssh-rsa.h sshtty.h
tildexpand.h uidswap.h uuencode.h xmalloc.h]
remove comments from .h, since they are cut&paste from the .c files
and out of sync
Diffstat (limited to 'auth.h')
-rw-r--r-- | auth.h | 60 |
1 files changed, 8 insertions, 52 deletions
@@ -21,7 +21,7 @@ | |||
21 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF | 21 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF |
22 | * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 22 | * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
23 | * | 23 | * |
24 | * $OpenBSD: auth.h,v 1.21 2001/06/26 16:15:23 dugsong Exp $ | 24 | * $OpenBSD: auth.h,v 1.22 2001/06/26 17:27:22 markus Exp $ |
25 | */ | 25 | */ |
26 | #ifndef AUTH_H | 26 | #ifndef AUTH_H |
27 | #define AUTH_H | 27 | #define AUTH_H |
@@ -87,70 +87,29 @@ struct KbdintDevice | |||
87 | void (*free_ctx) __P((void *ctx)); | 87 | void (*free_ctx) __P((void *ctx)); |
88 | }; | 88 | }; |
89 | 89 | ||
90 | /* | ||
91 | * Tries to authenticate the user using the .rhosts file. Returns true if | ||
92 | * authentication succeeds. If ignore_rhosts is non-zero, this will not | ||
93 | * consider .rhosts and .shosts (/etc/hosts.equiv will still be used). | ||
94 | */ | ||
95 | int auth_rhosts(struct passwd *, const char *); | 90 | int auth_rhosts(struct passwd *, const char *); |
96 | |||
97 | /* extended interface similar to auth_rhosts() */ | ||
98 | int | 91 | int |
99 | auth_rhosts2(struct passwd *, const char *, const char *, const char *); | 92 | auth_rhosts2(struct passwd *, const char *, const char *, const char *); |
100 | 93 | ||
101 | /* | 94 | int auth_rhosts_rsa(struct passwd *, const char *, RSA *); |
102 | * Tries to authenticate the user using the .rhosts file and the host using | 95 | int auth_password(Authctxt *, const char *); |
103 | * its host key. Returns true if authentication succeeds. | 96 | int auth_rsa(struct passwd *, BIGNUM *); |
104 | */ | 97 | int auth_rsa_read_key(char **, u_int *, BIGNUM *, BIGNUM *); |
105 | int | 98 | int auth_rsa_challenge_dialog(RSA *); |
106 | auth_rhosts_rsa(struct passwd *, const char *, RSA *); | ||
107 | |||
108 | /* | ||
109 | * Tries to authenticate the user using password. Returns true if | ||
110 | * authentication succeeds. | ||
111 | */ | ||
112 | int auth_password(Authctxt *, const char *); | ||
113 | |||
114 | /* | ||
115 | * Performs the RSA authentication dialog with the client. This returns 0 if | ||
116 | * the client could not be authenticated, and 1 if authentication was | ||
117 | * successful. This may exit if there is a serious protocol violation. | ||
118 | */ | ||
119 | int auth_rsa(struct passwd *, BIGNUM *); | ||
120 | |||
121 | /* | ||
122 | * Parses an RSA key (number of bits, e, n) from a string. Moves the pointer | ||
123 | * over the key. Skips any whitespace at the beginning and at end. | ||
124 | */ | ||
125 | int auth_rsa_read_key(char **, u_int *, BIGNUM *, BIGNUM *); | ||
126 | |||
127 | /* | ||
128 | * Performs the RSA authentication challenge-response dialog with the client, | ||
129 | * and returns true (non-zero) if the client gave the correct answer to our | ||
130 | * challenge; returns zero if the client gives a wrong answer. | ||
131 | */ | ||
132 | int auth_rsa_challenge_dialog(RSA *); | ||
133 | 99 | ||
134 | #ifdef KRB4 | 100 | #ifdef KRB4 |
135 | #include <krb.h> | 101 | #include <krb.h> |
136 | /* | ||
137 | * Performs Kerberos v4 mutual authentication with the client. This returns 0 | ||
138 | * if the client could not be authenticated, and 1 if authentication was | ||
139 | * successful. This may exit if there is a serious protocol violation. | ||
140 | */ | ||
141 | int auth_krb4(Authctxt *, KTEXT, char **); | 102 | int auth_krb4(Authctxt *, KTEXT, char **); |
142 | int auth_krb4_password(Authctxt *, const char *); | 103 | int auth_krb4_password(Authctxt *, const char *); |
143 | void krb4_cleanup_proc(void *); | 104 | void krb4_cleanup_proc(void *); |
144 | 105 | ||
145 | #ifdef AFS | 106 | #ifdef AFS |
146 | #include <kafs.h> | 107 | #include <kafs.h> |
147 | |||
148 | /* Accept passed Kerberos v4 ticket-granting ticket and AFS tokens. */ | ||
149 | int auth_krb4_tgt(Authctxt *, const char *); | 108 | int auth_krb4_tgt(Authctxt *, const char *); |
150 | int auth_afs_token(Authctxt *, const char *); | 109 | int auth_afs_token(Authctxt *, const char *); |
151 | #endif /* AFS */ | 110 | #endif /* AFS */ |
152 | 111 | ||
153 | #endif /* KRB4 */ | 112 | #endif /* KRB4 */ |
154 | 113 | ||
155 | #ifdef KRB5 | 114 | #ifdef KRB5 |
156 | int auth_krb5(Authctxt *authctxt, krb5_data *auth, char **client); | 115 | int auth_krb5(Authctxt *authctxt, krb5_data *auth, char **client); |
@@ -179,16 +138,13 @@ int verify_response(Authctxt *, const char *); | |||
179 | 138 | ||
180 | struct passwd * auth_get_user(void); | 139 | struct passwd * auth_get_user(void); |
181 | 140 | ||
182 | /* expand a filename - return buffer is allocated by xmalloc */ | ||
183 | char *expand_filename(const char *, struct passwd *); | 141 | char *expand_filename(const char *, struct passwd *); |
184 | char *authorized_keys_file(struct passwd *); | 142 | char *authorized_keys_file(struct passwd *); |
185 | char *authorized_keys_file2(struct passwd *); | 143 | char *authorized_keys_file2(struct passwd *); |
186 | 144 | ||
187 | /* check a file and the path to it */ | ||
188 | int | 145 | int |
189 | secure_filename(FILE *, const char *, struct passwd *, char *, size_t); | 146 | secure_filename(FILE *, const char *, struct passwd *, char *, size_t); |
190 | 147 | ||
191 | /* helper for hostbased auth */ | ||
192 | HostStatus | 148 | HostStatus |
193 | check_key_in_hostfiles(struct passwd *, Key *, const char *, | 149 | check_key_in_hostfiles(struct passwd *, Key *, const char *, |
194 | const char *, const char *); | 150 | const char *, const char *); |