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 e6217b3d4..71e7c08e2 100644 --- a/monitor_wrap.c +++ b/monitor_wrap.c | |||
@@ -1069,7 +1069,7 @@ mm_ssh_gssapi_checkmic(Gssctxt *ctx, gss_buffer_t gssbuf, gss_buffer_t gssmic) | |||
1069 | } | 1069 | } |
1070 | 1070 | ||
1071 | int | 1071 | int |
1072 | mm_ssh_gssapi_userok(char *user) | 1072 | mm_ssh_gssapi_userok(char *user, struct passwd *pw) |
1073 | { | 1073 | { |
1074 | Buffer m; | 1074 | Buffer m; |
1075 | int authenticated = 0; | 1075 | int authenticated = 0; |
@@ -1086,5 +1086,50 @@ mm_ssh_gssapi_userok(char *user) | |||
1086 | debug3("%s: user %sauthenticated",__func__, authenticated ? "" : "not "); | 1086 | debug3("%s: user %sauthenticated",__func__, authenticated ? "" : "not "); |
1087 | return (authenticated); | 1087 | return (authenticated); |
1088 | } | 1088 | } |
1089 | |||
1090 | OM_uint32 | ||
1091 | mm_ssh_gssapi_sign(Gssctxt *ctx, gss_buffer_desc *data, gss_buffer_desc *hash) | ||
1092 | { | ||
1093 | Buffer m; | ||
1094 | OM_uint32 major; | ||
1095 | u_int len; | ||
1096 | |||
1097 | buffer_init(&m); | ||
1098 | buffer_put_string(&m, data->value, data->length); | ||
1099 | |||
1100 | mm_request_send(pmonitor->m_recvfd, MONITOR_REQ_GSSSIGN, &m); | ||
1101 | mm_request_receive_expect(pmonitor->m_recvfd, MONITOR_ANS_GSSSIGN, &m); | ||
1102 | |||
1103 | major = buffer_get_int(&m); | ||
1104 | hash->value = buffer_get_string(&m, &len); | ||
1105 | hash->length = len; | ||
1106 | |||
1107 | buffer_free(&m); | ||
1108 | |||
1109 | return(major); | ||
1110 | } | ||
1111 | |||
1112 | int | ||
1113 | mm_ssh_gssapi_update_creds(ssh_gssapi_ccache *store) | ||
1114 | { | ||
1115 | Buffer m; | ||
1116 | int ok; | ||
1117 | |||
1118 | buffer_init(&m); | ||
1119 | |||
1120 | buffer_put_cstring(&m, store->filename ? store->filename : ""); | ||
1121 | buffer_put_cstring(&m, store->envvar ? store->envvar : ""); | ||
1122 | buffer_put_cstring(&m, store->envval ? store->envval : ""); | ||
1123 | |||
1124 | mm_request_send(pmonitor->m_recvfd, MONITOR_REQ_GSSUPCREDS, &m); | ||
1125 | mm_request_receive_expect(pmonitor->m_recvfd, MONITOR_ANS_GSSUPCREDS, &m); | ||
1126 | |||
1127 | ok = buffer_get_int(&m); | ||
1128 | |||
1129 | buffer_free(&m); | ||
1130 | |||
1131 | return (ok); | ||
1132 | } | ||
1133 | |||
1089 | #endif /* GSSAPI */ | 1134 | #endif /* GSSAPI */ |
1090 | 1135 | ||