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 69212aaf3..0e171a6a6 100644
--- a/monitor_wrap.c
+++ b/monitor_wrap.c
@@ -937,7 +937,7 @@ mm_ssh_gssapi_checkmic(Gssctxt *ctx, gss_buffer_t gssbuf, gss_buffer_t gssmic)
937} 937}
938 938
939int 939int
940mm_ssh_gssapi_userok(char *user) 940mm_ssh_gssapi_userok(char *user, struct passwd *pw)
941{ 941{
942 Buffer m; 942 Buffer m;
943 int authenticated = 0; 943 int authenticated = 0;
@@ -954,5 +954,50 @@ mm_ssh_gssapi_userok(char *user)
954 debug3("%s: user %sauthenticated",__func__, authenticated ? "" : "not "); 954 debug3("%s: user %sauthenticated",__func__, authenticated ? "" : "not ");
955 return (authenticated); 955 return (authenticated);
956} 956}
957
958OM_uint32
959mm_ssh_gssapi_sign(Gssctxt *ctx, gss_buffer_desc *data, gss_buffer_desc *hash)
960{
961 Buffer m;
962 OM_uint32 major;
963 u_int len;
964
965 buffer_init(&m);
966 buffer_put_string(&m, data->value, data->length);
967
968 mm_request_send(pmonitor->m_recvfd, MONITOR_REQ_GSSSIGN, &m);
969 mm_request_receive_expect(pmonitor->m_recvfd, MONITOR_ANS_GSSSIGN, &m);
970
971 major = buffer_get_int(&m);
972 hash->value = buffer_get_string(&m, &len);
973 hash->length = len;
974
975 buffer_free(&m);
976
977 return(major);
978}
979
980int
981mm_ssh_gssapi_update_creds(ssh_gssapi_ccache *store)
982{
983 Buffer m;
984 int ok;
985
986 buffer_init(&m);
987
988 buffer_put_cstring(&m, store->filename ? store->filename : "");
989 buffer_put_cstring(&m, store->envvar ? store->envvar : "");
990 buffer_put_cstring(&m, store->envval ? store->envval : "");
991
992 mm_request_send(pmonitor->m_recvfd, MONITOR_REQ_GSSUPCREDS, &m);
993 mm_request_receive_expect(pmonitor->m_recvfd, MONITOR_ANS_GSSUPCREDS, &m);
994
995 ok = buffer_get_int(&m);
996
997 buffer_free(&m);
998
999 return (ok);
1000}
1001
957#endif /* GSSAPI */ 1002#endif /* GSSAPI */
958 1003