summaryrefslogtreecommitdiffstats
path: root/proxy/src/gp_rpc_init_sec_context.c
diff options
context:
space:
mode:
authorSimo Sorce <simo@redhat.com>2013-10-14 16:20:11 -0400
committerGünther Deschner <gdeschner@redhat.com>2013-10-18 15:46:24 +0200
commita324853818fd75d7ec11c68de9d499f37228b26a (patch)
tree2dfae31f9f6c130cac4ace0efa15d7c9820fc7f8 /proxy/src/gp_rpc_init_sec_context.c
parent117ed0a24c47d91d7c0ba836b218f620195afd61 (diff)
downloadgss-proxy-a324853818fd75d7ec11c68de9d499f37228b26a.tar.gz
gss-proxy-a324853818fd75d7ec11c68de9d499f37228b26a.tar.xz
gss-proxy-a324853818fd75d7ec11c68de9d499f37228b26a.zip
Allow arbitrary users to connect to a service
The rpc.gssd daemon is changing to fork and change uid to the unprivileged user it wants to authenticate, this means gssproxy needs to allow connection from any euid. When this is done though, the trusted flag needs to be dropped, if the connecting euid does not match the default trusted uid to prevent improper impersonation. Resolves: https://fedorahosted.org/gss-proxy/ticket/103 Reviewed-by: Günther Deschner <gdeschner@redhat.com
Diffstat (limited to 'proxy/src/gp_rpc_init_sec_context.c')
-rw-r--r--proxy/src/gp_rpc_init_sec_context.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/proxy/src/gp_rpc_init_sec_context.c b/proxy/src/gp_rpc_init_sec_context.c
index fa87b15..944389c 100644
--- a/proxy/src/gp_rpc_init_sec_context.c
+++ b/proxy/src/gp_rpc_init_sec_context.c
@@ -25,8 +25,7 @@
#include "gp_rpc_process.h"
-int gp_init_sec_context(struct gssproxy_ctx *gpctx,
- struct gp_service *gpsvc,
+int gp_init_sec_context(struct gp_call_ctx *gpcall,
union gp_rpc_arg *arg,
union gp_rpc_res *res)
{
@@ -68,15 +67,18 @@ int gp_init_sec_context(struct gssproxy_ctx *gpctx,
}
if (isca->cred_handle) {
- ret_maj = gp_import_gssx_cred(&ret_min, gpsvc,
+ ret_maj = gp_import_gssx_cred(&ret_min, gpcall,
isca->cred_handle, &ich);
if (ret_maj) {
goto done;
}
+ } else {
+ /* FIXME: get ccache from gpsvc ? */
+ ret_maj = GSS_S_CRED_UNAVAIL;
+ ret_min = 0;
+ goto done;
}
- /* FIXME: gett ccache from gpsvc */
-
ret_maj = gp_conv_gssx_to_name(&ret_min, isca->target_name, &target_name);
if (ret_maj) {
goto done;