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