diff options
Diffstat (limited to 'ssh-gss.h')
-rw-r--r-- | ssh-gss.h | 28 |
1 files changed, 20 insertions, 8 deletions
@@ -1,6 +1,6 @@ | |||
1 | /* $OpenBSD: ssh-gss.h,v 1.10 2007/06/12 08:20:00 djm Exp $ */ | 1 | /* $OpenBSD: ssh-gss.h,v 1.10 2007/06/12 08:20:00 djm Exp $ */ |
2 | /* | 2 | /* |
3 | * Copyright (c) 2001-2003 Simon Wilkinson. All rights reserved. | 3 | * Copyright (c) 2001-2009 Simon Wilkinson. All rights reserved. |
4 | * | 4 | * |
5 | * Redistribution and use in source and binary forms, with or without | 5 | * Redistribution and use in source and binary forms, with or without |
6 | * modification, are permitted provided that the following conditions | 6 | * modification, are permitted provided that the following conditions |
@@ -75,6 +75,7 @@ typedef struct { | |||
75 | char *filename; | 75 | char *filename; |
76 | char *envvar; | 76 | char *envvar; |
77 | char *envval; | 77 | char *envval; |
78 | struct passwd *owner; | ||
78 | void *data; | 79 | void *data; |
79 | } ssh_gssapi_ccache; | 80 | } ssh_gssapi_ccache; |
80 | 81 | ||
@@ -82,8 +83,11 @@ typedef struct { | |||
82 | gss_buffer_desc displayname; | 83 | gss_buffer_desc displayname; |
83 | gss_buffer_desc exportedname; | 84 | gss_buffer_desc exportedname; |
84 | gss_cred_id_t creds; | 85 | gss_cred_id_t creds; |
86 | gss_name_t name; | ||
85 | struct ssh_gssapi_mech_struct *mech; | 87 | struct ssh_gssapi_mech_struct *mech; |
86 | ssh_gssapi_ccache store; | 88 | ssh_gssapi_ccache store; |
89 | int used; | ||
90 | int updated; | ||
87 | } ssh_gssapi_client; | 91 | } ssh_gssapi_client; |
88 | 92 | ||
89 | typedef struct ssh_gssapi_mech_struct { | 93 | typedef struct ssh_gssapi_mech_struct { |
@@ -94,6 +98,7 @@ typedef struct ssh_gssapi_mech_struct { | |||
94 | int (*userok) (ssh_gssapi_client *, char *); | 98 | int (*userok) (ssh_gssapi_client *, char *); |
95 | int (*localname) (ssh_gssapi_client *, char **); | 99 | int (*localname) (ssh_gssapi_client *, char **); |
96 | void (*storecreds) (ssh_gssapi_client *); | 100 | void (*storecreds) (ssh_gssapi_client *); |
101 | int (*updatecreds) (ssh_gssapi_ccache *, ssh_gssapi_client *); | ||
97 | } ssh_gssapi_mech; | 102 | } ssh_gssapi_mech; |
98 | 103 | ||
99 | typedef struct { | 104 | typedef struct { |
@@ -104,7 +109,7 @@ typedef struct { | |||
104 | gss_OID oid; /* client */ | 109 | gss_OID oid; /* client */ |
105 | gss_cred_id_t creds; /* server */ | 110 | gss_cred_id_t creds; /* server */ |
106 | gss_name_t client; /* server */ | 111 | gss_name_t client; /* server */ |
107 | gss_cred_id_t client_creds; /* server */ | 112 | gss_cred_id_t client_creds; /* both */ |
108 | } Gssctxt; | 113 | } Gssctxt; |
109 | 114 | ||
110 | extern ssh_gssapi_mech *supported_mechs[]; | 115 | extern ssh_gssapi_mech *supported_mechs[]; |
@@ -128,16 +133,21 @@ void ssh_gssapi_build_ctx(Gssctxt **); | |||
128 | void ssh_gssapi_delete_ctx(Gssctxt **); | 133 | void ssh_gssapi_delete_ctx(Gssctxt **); |
129 | OM_uint32 ssh_gssapi_sign(Gssctxt *, gss_buffer_t, gss_buffer_t); | 134 | OM_uint32 ssh_gssapi_sign(Gssctxt *, gss_buffer_t, gss_buffer_t); |
130 | void ssh_gssapi_buildmic(Buffer *, const char *, const char *, const char *); | 135 | void ssh_gssapi_buildmic(Buffer *, const char *, const char *, const char *); |
131 | int ssh_gssapi_check_mechanism(Gssctxt **, gss_OID, const char *); | 136 | int ssh_gssapi_check_mechanism(Gssctxt **, gss_OID, const char *, const char *); |
137 | OM_uint32 ssh_gssapi_client_identity(Gssctxt *, const char *); | ||
138 | int ssh_gssapi_credentials_updated(Gssctxt *); | ||
132 | 139 | ||
133 | /* In the server */ | 140 | /* In the server */ |
134 | typedef int ssh_gssapi_check_fn(Gssctxt **, gss_OID, const char *); | 141 | typedef int ssh_gssapi_check_fn(Gssctxt **, gss_OID, const char *, |
135 | char *ssh_gssapi_client_mechanisms(const char *host); | 142 | const char *); |
136 | char *ssh_gssapi_kex_mechs(gss_OID_set, ssh_gssapi_check_fn *, const char *); | 143 | char *ssh_gssapi_client_mechanisms(const char *, const char *); |
144 | char *ssh_gssapi_kex_mechs(gss_OID_set, ssh_gssapi_check_fn *, const char *, | ||
145 | const char *); | ||
137 | gss_OID ssh_gssapi_id_kex(Gssctxt *, char *, int); | 146 | gss_OID ssh_gssapi_id_kex(Gssctxt *, char *, int); |
138 | int ssh_gssapi_server_check_mech(Gssctxt **,gss_OID, const char *); | 147 | int ssh_gssapi_server_check_mech(Gssctxt **,gss_OID, const char *, |
148 | const char *); | ||
139 | OM_uint32 ssh_gssapi_server_ctx(Gssctxt **, gss_OID); | 149 | OM_uint32 ssh_gssapi_server_ctx(Gssctxt **, gss_OID); |
140 | int ssh_gssapi_userok(char *name); | 150 | int ssh_gssapi_userok(char *name, struct passwd *); |
141 | OM_uint32 ssh_gssapi_checkmic(Gssctxt *, gss_buffer_t, gss_buffer_t); | 151 | OM_uint32 ssh_gssapi_checkmic(Gssctxt *, gss_buffer_t, gss_buffer_t); |
142 | void ssh_gssapi_do_child(char ***, u_int *); | 152 | void ssh_gssapi_do_child(char ***, u_int *); |
143 | void ssh_gssapi_cleanup_creds(void); | 153 | void ssh_gssapi_cleanup_creds(void); |
@@ -145,6 +155,8 @@ void ssh_gssapi_storecreds(void); | |||
145 | 155 | ||
146 | char *ssh_gssapi_server_mechanisms(void); | 156 | char *ssh_gssapi_server_mechanisms(void); |
147 | int ssh_gssapi_oid_table_ok(); | 157 | int ssh_gssapi_oid_table_ok(); |
158 | |||
159 | int ssh_gssapi_update_creds(ssh_gssapi_ccache *store); | ||
148 | #endif /* GSSAPI */ | 160 | #endif /* GSSAPI */ |
149 | 161 | ||
150 | #endif /* _SSH_GSS_H */ | 162 | #endif /* _SSH_GSS_H */ |