diff options
| author | Simo Sorce <simo@redhat.com> | 2013-04-12 17:09:06 -0400 |
|---|---|---|
| committer | Simo Sorce <simo@redhat.com> | 2013-04-23 12:02:50 -0700 |
| commit | edf939632c9a1dbab4e769f0c23fe393d7fc8a6a (patch) | |
| tree | b6fabfe341663ee072ef6cbe5be7f62e956991fd /proxy/src/gp_creds.c | |
| parent | 7f8078e906b138dcd34f84e0260cba87b63ca62f (diff) | |
| download | gss-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.c | 6 |
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]; } } |
