summaryrefslogtreecommitdiff
path: root/monitor_wrap.c
diff options
context:
space:
mode:
Diffstat (limited to 'monitor_wrap.c')
-rw-r--r--monitor_wrap.c47
1 files changed, 46 insertions, 1 deletions
diff --git a/monitor_wrap.c b/monitor_wrap.c
index faeb02cfa..a01500c81 100644
--- a/monitor_wrap.c
+++ b/monitor_wrap.c
@@ -1231,7 +1231,7 @@ mm_ssh_gssapi_checkmic(Gssctxt *ctx, gss_buffer_t gssbuf, gss_buffer_t gssmic)
1231} 1231}
1232 1232
1233int 1233int
1234mm_ssh_gssapi_userok(char *user) 1234mm_ssh_gssapi_userok(char *user, struct passwd *pw)
1235{ 1235{
1236 Buffer m; 1236 Buffer m;
1237 int authenticated = 0; 1237 int authenticated = 0;
@@ -1248,6 +1248,51 @@ mm_ssh_gssapi_userok(char *user)
1248 debug3("%s: user %sauthenticated",__func__, authenticated ? "" : "not "); 1248 debug3("%s: user %sauthenticated",__func__, authenticated ? "" : "not ");
1249 return (authenticated); 1249 return (authenticated);
1250} 1250}
1251
1252OM_uint32
1253mm_ssh_gssapi_sign(Gssctxt *ctx, gss_buffer_desc *data, gss_buffer_desc *hash)
1254{
1255 Buffer m;
1256 OM_uint32 major;
1257 u_int len;
1258
1259 buffer_init(&m);
1260 buffer_put_string(&m, data->value, data->length);
1261
1262 mm_request_send(pmonitor->m_recvfd, MONITOR_REQ_GSSSIGN, &m);
1263 mm_request_receive_expect(pmonitor->m_recvfd, MONITOR_ANS_GSSSIGN, &m);
1264
1265 major = buffer_get_int(&m);
1266 hash->value = buffer_get_string(&m, &len);
1267 hash->length = len;
1268
1269 buffer_free(&m);
1270
1271 return(major);
1272}
1273
1274int
1275mm_ssh_gssapi_update_creds(ssh_gssapi_ccache *store)
1276{
1277 Buffer m;
1278 int ok;
1279
1280 buffer_init(&m);
1281
1282 buffer_put_cstring(&m, store->filename ? store->filename : "");
1283 buffer_put_cstring(&m, store->envvar ? store->envvar : "");
1284 buffer_put_cstring(&m, store->envval ? store->envval : "");
1285
1286 mm_request_send(pmonitor->m_recvfd, MONITOR_REQ_GSSUPCREDS, &m);
1287 mm_request_receive_expect(pmonitor->m_recvfd, MONITOR_ANS_GSSUPCREDS, &m);
1288
1289 ok = buffer_get_int(&m);
1290
1291 buffer_free(&m);
1292
1293 return (ok);
1294}
1295
1251#endif /* GSSAPI */ 1296#endif /* GSSAPI */
1252 1297
1253#ifdef JPAKE 1298#ifdef JPAKE