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 0986fc518..5f608b3b6 100644 --- a/monitor_wrap.c +++ b/monitor_wrap.c | |||
@@ -1239,7 +1239,7 @@ mm_ssh_gssapi_checkmic(Gssctxt *ctx, gss_buffer_t gssbuf, gss_buffer_t gssmic) | |||
1239 | } | 1239 | } |
1240 | 1240 | ||
1241 | int | 1241 | int |
1242 | mm_ssh_gssapi_userok(char *user) | 1242 | mm_ssh_gssapi_userok(char *user, struct passwd *pw) |
1243 | { | 1243 | { |
1244 | Buffer m; | 1244 | Buffer m; |
1245 | int authenticated = 0; | 1245 | int authenticated = 0; |
@@ -1256,6 +1256,51 @@ mm_ssh_gssapi_userok(char *user) | |||
1256 | debug3("%s: user %sauthenticated",__func__, authenticated ? "" : "not "); | 1256 | debug3("%s: user %sauthenticated",__func__, authenticated ? "" : "not "); |
1257 | return (authenticated); | 1257 | return (authenticated); |
1258 | } | 1258 | } |
1259 | |||
1260 | OM_uint32 | ||
1261 | mm_ssh_gssapi_sign(Gssctxt *ctx, gss_buffer_desc *data, gss_buffer_desc *hash) | ||
1262 | { | ||
1263 | Buffer m; | ||
1264 | OM_uint32 major; | ||
1265 | u_int len; | ||
1266 | |||
1267 | buffer_init(&m); | ||
1268 | buffer_put_string(&m, data->value, data->length); | ||
1269 | |||
1270 | mm_request_send(pmonitor->m_recvfd, MONITOR_REQ_GSSSIGN, &m); | ||
1271 | mm_request_receive_expect(pmonitor->m_recvfd, MONITOR_ANS_GSSSIGN, &m); | ||
1272 | |||
1273 | major = buffer_get_int(&m); | ||
1274 | hash->value = buffer_get_string(&m, &len); | ||
1275 | hash->length = len; | ||
1276 | |||
1277 | buffer_free(&m); | ||
1278 | |||
1279 | return(major); | ||
1280 | } | ||
1281 | |||
1282 | int | ||
1283 | mm_ssh_gssapi_update_creds(ssh_gssapi_ccache *store) | ||
1284 | { | ||
1285 | Buffer m; | ||
1286 | int ok; | ||
1287 | |||
1288 | buffer_init(&m); | ||
1289 | |||
1290 | buffer_put_cstring(&m, store->filename ? store->filename : ""); | ||
1291 | buffer_put_cstring(&m, store->envvar ? store->envvar : ""); | ||
1292 | buffer_put_cstring(&m, store->envval ? store->envval : ""); | ||
1293 | |||
1294 | mm_request_send(pmonitor->m_recvfd, MONITOR_REQ_GSSUPCREDS, &m); | ||
1295 | mm_request_receive_expect(pmonitor->m_recvfd, MONITOR_ANS_GSSUPCREDS, &m); | ||
1296 | |||
1297 | ok = buffer_get_int(&m); | ||
1298 | |||
1299 | buffer_free(&m); | ||
1300 | |||
1301 | return (ok); | ||
1302 | } | ||
1303 | |||
1259 | #endif /* GSSAPI */ | 1304 | #endif /* GSSAPI */ |
1260 | 1305 | ||
1261 | #ifdef JPAKE | 1306 | #ifdef JPAKE |