summaryrefslogtreecommitdiffhomepage
path: root/src/nxt_runtime.h
diff options
context:
space:
mode:
authorAndrew Clayton <a.clayton@nginx.com>2023-11-06 18:48:51 +0000
committerAndrew Clayton <a.clayton@nginx.com>2024-02-19 12:59:58 +0000
commitb500c36d2e808e123f11a243724f8fdeecd53f86 (patch)
tree2c7fb0003ee2182c53bc060c7c5a78450e1bebf6 /src/nxt_runtime.h
parent34b3a812b110e8fba0669fc843aebffddf89ab17 (diff)
downloadunit-b500c36d2e808e123f11a243724f8fdeecd53f86.tar.gz
unit-b500c36d2e808e123f11a243724f8fdeecd53f86.tar.bz2
Allow to set the permissions of the Unix domain control socket
Several users in GitHub have asked for the ability to set the permissions of the unitd UNIX Domain control socket. This can of course be done externally, but can be done much cleaner by Unit itself. This commit adds three new options --control-mode Set the mode of the socket, e.g 644 --control-user Set the user/owner of the socket, e.g unit --control-group Set the group of the socket, e.g unit Of course these only have an affect when using a UNIX Domain Socket for the control socket. Requested-by: michaelkosir <https://github.com/michaelkosir> Requested-by: chopanovv <https://github.com/chopanovv> Link: <https://github.com/nginx/unit/issues/254> Link: <https://github.com/nginx/unit/issues/980> Closes: https://github.com/nginx/unit/issues/840 Tested-by: Liam Crilly <liam.crilly@nginx.com> Reviewed-by: Zhidao Hong <z.hong@f5.com> Signed-off-by: Andrew Clayton <a.clayton@nginx.com>
Diffstat (limited to 'src/nxt_runtime.h')
-rw-r--r--src/nxt_runtime.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/nxt_runtime.h b/src/nxt_runtime.h
index 66ec0106..7bd490d7 100644
--- a/src/nxt_runtime.h
+++ b/src/nxt_runtime.h
@@ -70,8 +70,12 @@ struct nxt_runtime_s {
const char *ver_tmp;
const char *conf;
const char *conf_tmp;
- const char *control;
const char *tmp;
+ const char *control;
+
+ mode_t control_mode;
+ const char *control_user;
+ const char *control_group;
nxt_str_t certs;
nxt_str_t scripts;