summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSamuel Thibault <samuel.thibault@ens-lyon.org>2020-11-11 10:16:59 +0100
committerSamuel Thibault <samuel.thibault@ens-lyon.org>2020-11-11 10:16:59 +0100
commite794fd4243a6d3690a00488be641b2cb55b1946c (patch)
treef0ed022302d00b751ee0e164a0b130c2985a6174
parent594cfb7586089dfefab60574495baf6ed4048c1d (diff)
pflocal: Set default uid/gid to those of the translator
* pflocal/sock.c (sock_create): Set uid to getpid () and gid to getgid ().
-rw-r--r--pflocal/sock.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/pflocal/sock.c b/pflocal/sock.c
index e39e2932..dfe5cf44 100644
--- a/pflocal/sock.c
+++ b/pflocal/sock.c
@@ -123,8 +123,8 @@ sock_create (struct pipe_class *pipe_class, mode_t mode, struct sock **sock)
new->connect_queue = NULL;
new->pipe_class = pipe_class;
new->addr = NULL;
- new->uid = 0;
- new->gid = 0;
+ new->uid = getuid ();
+ new->gid = getgid ();
memset (&new->change_time, 0, sizeof (new->change_time));
pthread_mutex_init (&new->lock, NULL);