summaryrefslogtreecommitdiffstats
path: root/proxy/src/gp_workers.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_workers.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_workers.c')
-rw-r--r--proxy/src/gp_workers.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/proxy/src/gp_workers.c b/proxy/src/gp_workers.c
index 6d650c6..bca2cc8 100644
--- a/proxy/src/gp_workers.c
+++ b/proxy/src/gp_workers.c
@@ -430,19 +430,21 @@ static void *gp_worker_main(void *pvt)
static void gp_handle_query(struct gp_workers *w, struct gp_query *q)
{
- struct gp_service *gpsvc;
+ struct gp_call_ctx gpcall;
uint8_t *buffer;
size_t buflen;
int ret;
/* find service */
- gpsvc = gp_creds_match_conn(w->gpctx, q->conn);
- if (!gpsvc) {
+ gpcall.gpctx = w->gpctx;
+ gpcall.service = gp_creds_match_conn(w->gpctx, q->conn);
+ if (!gpcall.service) {
q->status = GP_QUERY_ERR;
return;
}
+ gpcall.connection = q->conn;
- ret = gp_rpc_process_call(w->gpctx, gpsvc,
+ ret = gp_rpc_process_call(&gpcall,
q->buffer, q->buflen,
&buffer, &buflen);
if (ret) {