summaryrefslogtreecommitdiff
path: root/gss-serv.c
diff options
context:
space:
mode:
Diffstat (limited to 'gss-serv.c')
-rw-r--r--gss-serv.c32
1 files changed, 22 insertions, 10 deletions
diff --git a/gss-serv.c b/gss-serv.c
index de32a3f2e..fad79a1b4 100644
--- a/gss-serv.c
+++ b/gss-serv.c
@@ -62,6 +62,28 @@ ssh_gssapi_mech* supported_mechs[]= {
62}; 62};
63 63
64/* Unpriviledged */ 64/* Unpriviledged */
65char *
66ssh_gssapi_server_mechanisms() {
67 gss_OID_set supported;
68
69 ssh_gssapi_supported_oids(&supported);
70 return (ssh_gssapi_kex_mechs(supported, &ssh_gssapi_server_check_mech,
71 NULL));
72}
73
74/* Unpriviledged */
75int
76ssh_gssapi_server_check_mech(gss_OID oid, void *data) {
77 Gssctxt * ctx = NULL;
78 int res;
79
80 res = !GSS_ERROR(PRIVSEP(ssh_gssapi_server_ctx(&ctx, oid)));
81 ssh_gssapi_delete_ctx(&ctx);
82
83 return (res);
84}
85
86/* Unpriviledged */
65void 87void
66ssh_gssapi_supported_oids(gss_OID_set *oidset) 88ssh_gssapi_supported_oids(gss_OID_set *oidset)
67{ 89{
@@ -287,14 +309,4 @@ ssh_gssapi_userok(char *user)
287 return (0); 309 return (0);
288} 310}
289 311
290/* Priviledged */
291OM_uint32
292ssh_gssapi_checkmic(Gssctxt *ctx, gss_buffer_t gssbuf, gss_buffer_t gssmic)
293{
294 ctx->major = gss_verify_mic(&ctx->minor, ctx->context,
295 gssbuf, gssmic, NULL);
296
297 return (ctx->major);
298}
299
300#endif 312#endif