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 4ce469605..44019f32a 100644
--- a/monitor_wrap.c
+++ b/monitor_wrap.c
@@ -1273,7 +1273,7 @@ mm_ssh_gssapi_checkmic(Gssctxt *ctx, gss_buffer_t gssbuf, gss_buffer_t gssmic)
1273} 1273}
1274 1274
1275int 1275int
1276mm_ssh_gssapi_userok(char *user) 1276mm_ssh_gssapi_userok(char *user, struct passwd *pw)
1277{ 1277{
1278 Buffer m; 1278 Buffer m;
1279 int authenticated = 0; 1279 int authenticated = 0;
@@ -1290,6 +1290,51 @@ mm_ssh_gssapi_userok(char *user)
1290 debug3("%s: user %sauthenticated",__func__, authenticated ? "" : "not "); 1290 debug3("%s: user %sauthenticated",__func__, authenticated ? "" : "not ");
1291 return (authenticated); 1291 return (authenticated);
1292} 1292}
1293
1294OM_uint32
1295mm_ssh_gssapi_sign(Gssctxt *ctx, gss_buffer_desc *data, gss_buffer_desc *hash)
1296{
1297 Buffer m;
1298 OM_uint32 major;
1299 u_int len;
1300
1301 buffer_init(&m);
1302 buffer_put_string(&m, data->value, data->length);
1303
1304 mm_request_send(pmonitor->m_recvfd, MONITOR_REQ_GSSSIGN, &m);
1305 mm_request_receive_expect(pmonitor->m_recvfd, MONITOR_ANS_GSSSIGN, &m);
1306
1307 major = buffer_get_int(&m);
1308 hash->value = buffer_get_string(&m, &len);
1309 hash->length = len;
1310
1311 buffer_free(&m);
1312
1313 return(major);
1314}
1315
1316int
1317mm_ssh_gssapi_update_creds(ssh_gssapi_ccache *store)
1318{
1319 Buffer m;
1320 int ok;
1321
1322 buffer_init(&m);
1323
1324 buffer_put_cstring(&m, store->filename ? store->filename : "");
1325 buffer_put_cstring(&m, store->envvar ? store->envvar : "");
1326 buffer_put_cstring(&m, store->envval ? store->envval : "");
1327
1328 mm_request_send(pmonitor->m_recvfd, MONITOR_REQ_GSSUPCREDS, &m);
1329 mm_request_receive_expect(pmonitor->m_recvfd, MONITOR_ANS_GSSUPCREDS, &m);
1330
1331 ok = buffer_get_int(&m);
1332
1333 buffer_free(&m);
1334
1335 return (ok);
1336}
1337
1293#endif /* GSSAPI */ 1338#endif /* GSSAPI */
1294 1339
1295#ifdef JPAKE 1340#ifdef JPAKE