summaryrefslogtreecommitdiff
path: root/auth.h
diff options
context:
space:
mode:
authorBen Lindstrom <mouring@eviladmin.org>2001-07-04 04:46:56 +0000
committerBen Lindstrom <mouring@eviladmin.org>2001-07-04 04:46:56 +0000
commit4cc240dabbd81a308f06f2717b1942041fe0e205 (patch)
tree07291c8c2c467fc2ecec9166ed0d8ec1e75631a3 /auth.h
parent5bf5d67d497ed91c19851db6b904d54003afe67e (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.h60
1 files changed, 8 insertions, 52 deletions
diff --git a/auth.h b/auth.h
index 1c72dffa3..edfc9fb55 100644
--- a/auth.h
+++ b/auth.h
@@ -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 */
95int auth_rhosts(struct passwd *, const char *); 90int auth_rhosts(struct passwd *, const char *);
96
97/* extended interface similar to auth_rhosts() */
98int 91int
99auth_rhosts2(struct passwd *, const char *, const char *, const char *); 92auth_rhosts2(struct passwd *, const char *, const char *, const char *);
100 93
101/* 94int auth_rhosts_rsa(struct passwd *, const char *, RSA *);
102 * Tries to authenticate the user using the .rhosts file and the host using 95int auth_password(Authctxt *, const char *);
103 * its host key. Returns true if authentication succeeds. 96int auth_rsa(struct passwd *, BIGNUM *);
104 */ 97int auth_rsa_read_key(char **, u_int *, BIGNUM *, BIGNUM *);
105int 98int auth_rsa_challenge_dialog(RSA *);
106auth_rhosts_rsa(struct passwd *, const char *, RSA *);
107
108/*
109 * Tries to authenticate the user using password. Returns true if
110 * authentication succeeds.
111 */
112int 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 */
119int 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 */
125int 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 */
132int 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 */
141int auth_krb4(Authctxt *, KTEXT, char **); 102int auth_krb4(Authctxt *, KTEXT, char **);
142int auth_krb4_password(Authctxt *, const char *); 103int auth_krb4_password(Authctxt *, const char *);
143void krb4_cleanup_proc(void *); 104void 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. */
149int auth_krb4_tgt(Authctxt *, const char *); 108int auth_krb4_tgt(Authctxt *, const char *);
150int auth_afs_token(Authctxt *, const char *); 109int 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
156int auth_krb5(Authctxt *authctxt, krb5_data *auth, char **client); 115int auth_krb5(Authctxt *authctxt, krb5_data *auth, char **client);
@@ -179,16 +138,13 @@ int verify_response(Authctxt *, const char *);
179 138
180struct passwd * auth_get_user(void); 139struct passwd * auth_get_user(void);
181 140
182/* expand a filename - return buffer is allocated by xmalloc */
183char *expand_filename(const char *, struct passwd *); 141char *expand_filename(const char *, struct passwd *);
184char *authorized_keys_file(struct passwd *); 142char *authorized_keys_file(struct passwd *);
185char *authorized_keys_file2(struct passwd *); 143char *authorized_keys_file2(struct passwd *);
186 144
187/* check a file and the path to it */
188int 145int
189secure_filename(FILE *, const char *, struct passwd *, char *, size_t); 146secure_filename(FILE *, const char *, struct passwd *, char *, size_t);
190 147
191/* helper for hostbased auth */
192HostStatus 148HostStatus
193check_key_in_hostfiles(struct passwd *, Key *, const char *, 149check_key_in_hostfiles(struct passwd *, Key *, const char *,
194 const char *, const char *); 150 const char *, const char *);