From b500c36d2e808e123f11a243724f8fdeecd53f86 Mon Sep 17 00:00:00 2001 From: Andrew Clayton Date: Mon, 6 Nov 2023 18:48:51 +0000 Subject: 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 Requested-by: chopanovv Link: Link: Closes: https://github.com/nginx/unit/issues/840 Tested-by: Liam Crilly Reviewed-by: Zhidao Hong Signed-off-by: Andrew Clayton --- src/nxt_runtime.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'src/nxt_runtime.h') 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; -- cgit