diff options
author | Omar Polo <op@omarpolo.com> | 2021-02-03 14:13:32 +0000 |
---|---|---|
committer | Omar Polo <op@omarpolo.com> | 2021-02-03 14:13:32 +0000 |
commit | 9edb82825145b2311c547003b9e7ca286ef7db3a (patch) | |
tree | f426e4d020d613ee1431c458bac2d81d97118dfa /gmid.c | |
parent | 4ee08bd14841bfa98575cce26e099cab50a1827d (diff) |
drop privileges after the fork
Diffstat (limited to 'gmid.c')
-rw-r--r-- | gmid.c | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -568,7 +568,6 @@ main(int argc, char **argv) /* setup tls before dropping privileges: we don't want user * to put private certs inside the chroot. */ setup_tls(); - drop_priv(); signal(SIGPIPE, SIG_IGN); signal(SIGCHLD, SIG_IGN); @@ -595,11 +594,13 @@ main(int argc, char **argv) case 0: /* child */ close(p[0]); exfd = p[1]; + drop_priv(); listener_main(); _exit(0); default: /* parent */ close(p[1]); + drop_priv(); return executor_main(p[0]); } } |