summaryrefslogtreecommitdiffstats
path: root/proxy/src/gp_creds.c
diff options
context:
space:
mode:
authorSimo Sorce <simo@redhat.com>2013-04-12 17:09:06 -0400
committerSimo Sorce <simo@redhat.com>2013-04-23 12:02:50 -0700
commitedf939632c9a1dbab4e769f0c23fe393d7fc8a6a (patch)
treeb6fabfe341663ee072ef6cbe5be7f62e956991fd /proxy/src/gp_creds.c
parent7f8078e906b138dcd34f84e0260cba87b63ca62f (diff)
downloadgss-proxy-edf939632c9a1dbab4e769f0c23fe393d7fc8a6a.tar.gz
gss-proxy-edf939632c9a1dbab4e769f0c23fe393d7fc8a6a.tar.xz
gss-proxy-edf939632c9a1dbab4e769f0c23fe393d7fc8a6a.zip
Add support for per-service sockets
This way different processes running as the same user can be configured as different servervices Signed-off-by: Simo Sorce <simo@redhat.com> Reviewed-by: Günther Deschner <gdeschner@redhat.com>
Diffstat (limited to 'proxy/src/gp_creds.c')
-rw-r--r--proxy/src/gp_creds.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/proxy/src/gp_creds.c b/proxy/src/gp_creds.c
index 4a731b0..e6c12a5 100644
--- a/proxy/src/gp_creds.c
+++ b/proxy/src/gp_creds.c
@@ -95,12 +95,18 @@ struct gp_service *gp_creds_match_conn(struct gssproxy_ctx *gpctx,
struct gp_conn *conn)
{
struct gp_creds *gcs;
+ const char *socket;
int i;
gcs = gp_conn_get_creds(conn);
+ socket = gp_conn_get_socket(conn);
for (i = 0; i < gpctx->config->num_svcs; i++) {
if (gpctx->config->svcs[i]->euid == gcs->ucred.uid) {
+ if (gpctx->config->svcs[i]->socket &&
+ gp_same(socket, gpctx->config->svcs[i]->socket)) {
+ continue;
+ }
return gpctx->config->svcs[i];
}
}