diff options
Diffstat (limited to 'monitor_wrap.c')
-rw-r--r-- | monitor_wrap.c | 47 |
1 files changed, 46 insertions, 1 deletions
diff --git a/monitor_wrap.c b/monitor_wrap.c index b8e8710f7..a737fce7a 100644 --- a/monitor_wrap.c +++ b/monitor_wrap.c | |||
@@ -1248,7 +1248,7 @@ mm_ssh_gssapi_checkmic(Gssctxt *ctx, gss_buffer_t gssbuf, gss_buffer_t gssmic) | |||
1248 | } | 1248 | } |
1249 | 1249 | ||
1250 | int | 1250 | int |
1251 | mm_ssh_gssapi_userok(char *user) | 1251 | mm_ssh_gssapi_userok(char *user, struct passwd *pw) |
1252 | { | 1252 | { |
1253 | Buffer m; | 1253 | Buffer m; |
1254 | int authenticated = 0; | 1254 | int authenticated = 0; |
@@ -1265,6 +1265,51 @@ mm_ssh_gssapi_userok(char *user) | |||
1265 | debug3("%s: user %sauthenticated",__func__, authenticated ? "" : "not "); | 1265 | debug3("%s: user %sauthenticated",__func__, authenticated ? "" : "not "); |
1266 | return (authenticated); | 1266 | return (authenticated); |
1267 | } | 1267 | } |
1268 | |||
1269 | OM_uint32 | ||
1270 | mm_ssh_gssapi_sign(Gssctxt *ctx, gss_buffer_desc *data, gss_buffer_desc *hash) | ||
1271 | { | ||
1272 | Buffer m; | ||
1273 | OM_uint32 major; | ||
1274 | u_int len; | ||
1275 | |||
1276 | buffer_init(&m); | ||
1277 | buffer_put_string(&m, data->value, data->length); | ||
1278 | |||
1279 | mm_request_send(pmonitor->m_recvfd, MONITOR_REQ_GSSSIGN, &m); | ||
1280 | mm_request_receive_expect(pmonitor->m_recvfd, MONITOR_ANS_GSSSIGN, &m); | ||
1281 | |||
1282 | major = buffer_get_int(&m); | ||
1283 | hash->value = buffer_get_string(&m, &len); | ||
1284 | hash->length = len; | ||
1285 | |||
1286 | buffer_free(&m); | ||
1287 | |||
1288 | return(major); | ||
1289 | } | ||
1290 | |||
1291 | int | ||
1292 | mm_ssh_gssapi_update_creds(ssh_gssapi_ccache *store) | ||
1293 | { | ||
1294 | Buffer m; | ||
1295 | int ok; | ||
1296 | |||
1297 | buffer_init(&m); | ||
1298 | |||
1299 | buffer_put_cstring(&m, store->filename ? store->filename : ""); | ||
1300 | buffer_put_cstring(&m, store->envvar ? store->envvar : ""); | ||
1301 | buffer_put_cstring(&m, store->envval ? store->envval : ""); | ||
1302 | |||
1303 | mm_request_send(pmonitor->m_recvfd, MONITOR_REQ_GSSUPCREDS, &m); | ||
1304 | mm_request_receive_expect(pmonitor->m_recvfd, MONITOR_ANS_GSSUPCREDS, &m); | ||
1305 | |||
1306 | ok = buffer_get_int(&m); | ||
1307 | |||
1308 | buffer_free(&m); | ||
1309 | |||
1310 | return (ok); | ||
1311 | } | ||
1312 | |||
1268 | #endif /* GSSAPI */ | 1313 | #endif /* GSSAPI */ |
1269 | 1314 | ||
1270 | #ifdef JPAKE | 1315 | #ifdef JPAKE |