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