summaryrefslogtreecommitdiffhomepage
path: root/src/nxt_main_process.c
diff options
context:
space:
mode:
authorAlejandro Colomar <alx@kernel.org>2024-04-24 23:31:54 +0200
committerAlejandro Colomar <alx@kernel.org>2024-06-18 22:59:45 +0200
commitd96d583328f614c658d42f5bb0d2a0f81621327e (patch)
tree66cacc47d4579dceec618035d3c505d7a3f88dbe /src/nxt_main_process.c
parent2e2e5d1e8e862c5d55cda0035eef90c5b6596112 (diff)
downloadunit-d96d583328f614c658d42f5bb0d2a0f81621327e.tar.gz
unit-d96d583328f614c658d42f5bb0d2a0f81621327e.tar.bz2
Use octal instead of mode macros
They are more readable. And we had a mix of both styles; there wasn't really a consistent style. Tested-by: Andrew Clayton <a.clayton@nginx.com> Reviewed-by: Andrew Clayton <a.clayton@nginx.com> Signed-off-by: Alejandro Colomar <alx@kernel.org>
Diffstat (limited to 'src/nxt_main_process.c')
-rw-r--r--src/nxt_main_process.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/nxt_main_process.c b/src/nxt_main_process.c
index 060ead41..c302cb02 100644
--- a/src/nxt_main_process.c
+++ b/src/nxt_main_process.c
@@ -1275,13 +1275,11 @@ nxt_main_listening_socket(nxt_sockaddr_t *sa, nxt_listening_socket_t *ls)
&& sa->u.sockaddr_un.sun_path[0] != '\0')
{
char *filename;
- mode_t access;
nxt_thread_t *thr;
filename = sa->u.sockaddr_un.sun_path;
- access = (S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP | S_IROTH | S_IWOTH);
- if (chmod(filename, access) != 0) {
+ if (chmod(filename, 0666) != 0) {
ls->end = nxt_sprintf(ls->start, ls->end,
"chmod(\\\"%s\\\") failed %E",
filename, nxt_errno);