summaryrefslogtreecommitdiff
path: root/auth.h
diff options
context:
space:
mode:
authorBen Lindstrom <mouring@eviladmin.org>2001-07-04 04:21:14 +0000
committerBen Lindstrom <mouring@eviladmin.org>2001-07-04 04:21:14 +0000
commitec95ed9b4ca014643a0272f6fa5b24ac9c70d263 (patch)
tree91a5c1b319337e52f7cc80742eda081f6dbfd6c2 /auth.h
parentb4c774cf8878d9100fde92ff4e938671c3b0301b (diff)
- dugsong@cvs.openbsd.org 2001/06/26 16:15:25
[auth1.c auth.h auth-krb4.c auth-passwd.c readconf.c readconf.h servconf.c servconf.h session.c sshconnect1.c sshd.c] Kerberos v5 support for SSH1, mostly from Assar Westerlund <assar@freebsd.org> and Bjorn Gronvall <bg@sics.se>. markus@ ok
Diffstat (limited to 'auth.h')
-rw-r--r--auth.h53
1 files changed, 36 insertions, 17 deletions
diff --git a/auth.h b/auth.h
index a29944113..1c72dffa3 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.20 2001/06/26 06:32:47 itojun Exp $ 24 * $OpenBSD: auth.h,v 1.21 2001/06/26 16:15:23 dugsong Exp $
25 */ 25 */
26#ifndef AUTH_H 26#ifndef AUTH_H
27#define AUTH_H 27#define AUTH_H
@@ -36,23 +36,36 @@
36#ifdef BSD_AUTH 36#ifdef BSD_AUTH
37#include <bsd_auth.h> 37#include <bsd_auth.h>
38#endif 38#endif
39#ifdef KRB5
40#include <krb5.h>
41#endif
39 42
40typedef struct Authctxt Authctxt; 43typedef struct Authctxt Authctxt;
41typedef struct KbdintDevice KbdintDevice; 44typedef struct KbdintDevice KbdintDevice;
42 45
43struct Authctxt { 46struct Authctxt {
44 int success; 47 int success;
45 int postponed; 48 int postponed;
46 int valid; 49 int valid;
47 int attempt; 50 int attempt;
48 int failures; 51 int failures;
49 char *user; 52 char *user;
50 char *service; 53 char *service;
51 struct passwd *pw; 54 struct passwd *pw;
52 char *style; 55 char *style;
53 void *kbdintctxt; 56 void *kbdintctxt;
54#ifdef BSD_AUTH 57#ifdef BSD_AUTH
55 auth_session_t *as; 58 auth_session_t *as;
59#endif
60#ifdef KRB4
61 char *krb4_ticket_file;
62#endif
63#ifdef KRB5
64 krb5_context krb5_ctx;
65 krb5_auth_context krb5_auth_ctx;
66 krb5_ccache krb5_fwd_ccache;
67 krb5_principal krb5_user;
68 char *krb5_ticket_file;
56#endif 69#endif
57}; 70};
58 71
@@ -125,21 +138,27 @@ int auth_rsa_challenge_dialog(RSA *);
125 * if the client could not be authenticated, and 1 if authentication was 138 * if the client could not be authenticated, and 1 if authentication was
126 * successful. This may exit if there is a serious protocol violation. 139 * successful. This may exit if there is a serious protocol violation.
127 */ 140 */
128int auth_krb4(const char *, KTEXT, char **); 141int auth_krb4(Authctxt *, KTEXT, char **);
129int krb4_init(uid_t); 142int auth_krb4_password(Authctxt *, const char *);
130void krb4_cleanup_proc(void *); 143void krb4_cleanup_proc(void *);
131int auth_krb4_password(struct passwd *, const char *);
132 144
133#ifdef AFS 145#ifdef AFS
134#include <kafs.h> 146#include <kafs.h>
135 147
136/* Accept passed Kerberos v4 ticket-granting ticket and AFS tokens. */ 148/* Accept passed Kerberos v4 ticket-granting ticket and AFS tokens. */
137int auth_kerberos_tgt(struct passwd *, const char *); 149int auth_krb4_tgt(Authctxt *, const char *);
138int auth_afs_token(struct passwd *, const char *); 150int auth_afs_token(Authctxt *, const char *);
139#endif /* AFS */ 151#endif /* AFS */
140 152
141#endif /* KRB4 */ 153#endif /* KRB4 */
142 154
155#ifdef KRB5
156int auth_krb5(Authctxt *authctxt, krb5_data *auth, char **client);
157int auth_krb5_tgt(Authctxt *authctxt, krb5_data *tgt);
158int auth_krb5_password(Authctxt *authctxt, const char *password);
159void krb5_cleanup_proc(void *authctxt);
160#endif /* KRB5 */
161
143#include "auth-pam.h" 162#include "auth-pam.h"
144#include "auth2-pam.h" 163#include "auth2-pam.h"
145 164