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 1a5dda561..20c37ebd2 100644 --- a/monitor_wrap.c +++ b/monitor_wrap.c | |||
@@ -1232,7 +1232,7 @@ mm_ssh_gssapi_checkmic(Gssctxt *ctx, gss_buffer_t gssbuf, gss_buffer_t gssmic) | |||
1232 | } | 1232 | } |
1233 | 1233 | ||
1234 | int | 1234 | int |
1235 | mm_ssh_gssapi_userok(char *user) | 1235 | mm_ssh_gssapi_userok(char *user, struct passwd *pw) |
1236 | { | 1236 | { |
1237 | Buffer m; | 1237 | Buffer m; |
1238 | int authenticated = 0; | 1238 | int authenticated = 0; |
@@ -1249,6 +1249,51 @@ mm_ssh_gssapi_userok(char *user) | |||
1249 | debug3("%s: user %sauthenticated",__func__, authenticated ? "" : "not "); | 1249 | debug3("%s: user %sauthenticated",__func__, authenticated ? "" : "not "); |
1250 | return (authenticated); | 1250 | return (authenticated); |
1251 | } | 1251 | } |
1252 | |||
1253 | OM_uint32 | ||
1254 | mm_ssh_gssapi_sign(Gssctxt *ctx, gss_buffer_desc *data, gss_buffer_desc *hash) | ||
1255 | { | ||
1256 | Buffer m; | ||
1257 | OM_uint32 major; | ||
1258 | u_int len; | ||
1259 | |||
1260 | buffer_init(&m); | ||
1261 | buffer_put_string(&m, data->value, data->length); | ||
1262 | |||
1263 | mm_request_send(pmonitor->m_recvfd, MONITOR_REQ_GSSSIGN, &m); | ||
1264 | mm_request_receive_expect(pmonitor->m_recvfd, MONITOR_ANS_GSSSIGN, &m); | ||
1265 | |||
1266 | major = buffer_get_int(&m); | ||
1267 | hash->value = buffer_get_string(&m, &len); | ||
1268 | hash->length = len; | ||
1269 | |||
1270 | buffer_free(&m); | ||
1271 | |||
1272 | return(major); | ||
1273 | } | ||
1274 | |||
1275 | int | ||
1276 | mm_ssh_gssapi_update_creds(ssh_gssapi_ccache *store) | ||
1277 | { | ||
1278 | Buffer m; | ||
1279 | int ok; | ||
1280 | |||
1281 | buffer_init(&m); | ||
1282 | |||
1283 | buffer_put_cstring(&m, store->filename ? store->filename : ""); | ||
1284 | buffer_put_cstring(&m, store->envvar ? store->envvar : ""); | ||
1285 | buffer_put_cstring(&m, store->envval ? store->envval : ""); | ||
1286 | |||
1287 | mm_request_send(pmonitor->m_recvfd, MONITOR_REQ_GSSUPCREDS, &m); | ||
1288 | mm_request_receive_expect(pmonitor->m_recvfd, MONITOR_ANS_GSSUPCREDS, &m); | ||
1289 | |||
1290 | ok = buffer_get_int(&m); | ||
1291 | |||
1292 | buffer_free(&m); | ||
1293 | |||
1294 | return (ok); | ||
1295 | } | ||
1296 | |||
1252 | #endif /* GSSAPI */ | 1297 | #endif /* GSSAPI */ |
1253 | 1298 | ||
1254 | #ifdef JPAKE | 1299 | #ifdef JPAKE |