Lines 1-24
Link Here
|
1 |
--- src/main-ctl-unix.c.orig 2015-05-26 16:33:38 UTC |
1 |
--- src/main-ctl-unix.c.orig 2015-08-28 19:13:38 UTC |
2 |
+++ src/main-ctl-unix.c |
2 |
+++ src/main-ctl-unix.c |
3 |
@@ -110,10 +110,15 @@ int ctl_handler_init(main_server_st * s) |
3 |
@@ -110,12 +110,15 @@ int ctl_handler_init(main_server_st * s) |
4 |
struct sockaddr_un sa; |
4 |
struct sockaddr_un sa; |
5 |
int sd, e; |
5 |
int sd, e; |
6 |
|
6 |
|
7 |
- if (s->config->use_occtl == 0 || s->perm_config->occtl_socket_file == NULL) |
7 |
- if (s->config->use_occtl == 0 || s->perm_config->occtl_socket_file == NULL) { |
8 |
+ mslog(s, NULL, LOG_INFO, "using control unix socket: %s", s->perm_config->occtl_socket_file); |
8 |
- mslog(s, NULL, LOG_INFO, "not using control unix socket"); |
|
|
9 |
- return 0; |
10 |
+ mslog(s, NULL, LOG_INFO, "using control unix socket: %s", s->perm_config->occtl_socket_file); |
9 |
+ |
11 |
+ |
10 |
+ if (s->config->use_occtl == 0 || |
12 |
+ if (s->config->use_occtl == 0 || |
11 |
+ s->perm_config->occtl_socket_file == NULL) { |
13 |
+ s->perm_config->occtl_socket_file == NULL) { |
12 |
+ mslog(s, NULL, LOG_INFO, "not using control unix socket"); |
14 |
+ mslog(s, NULL, LOG_INFO, "not using control unix socket"); |
13 |
return 0; |
15 |
+ return 0; |
14 |
+ } |
16 |
} |
15 |
|
17 |
|
16 |
- mslog(s, NULL, LOG_DEBUG, "initializing control unix socket: %s", s->perm_config->occtl_socket_file); |
18 |
- mslog(s, NULL, LOG_DEBUG, "initializing control unix socket: %s", s->perm_config->occtl_socket_file); |
17 |
+ mslog(s, NULL, LOG_INFO, "initializing control unix socket: %s", s->perm_config->occtl_socket_file); |
19 |
+ mslog(s, NULL, LOG_INFO, "initializing control unix socket: %s", s->perm_config->occtl_socket_file); |
18 |
memset(&sa, 0, sizeof(sa)); |
20 |
memset(&sa, 0, sizeof(sa)); |
19 |
sa.sun_family = AF_UNIX; |
21 |
sa.sun_family = AF_UNIX; |
20 |
strlcpy(sa.sun_path, s->perm_config->occtl_socket_file, sizeof(sa.sun_path)); |
22 |
strlcpy(sa.sun_path, s->perm_config->occtl_socket_file, sizeof(sa.sun_path)); |
21 |
@@ -122,7 +127,7 @@ int ctl_handler_init(main_server_st * s) |
23 |
@@ -124,7 +127,7 @@ int ctl_handler_init(main_server_st * s) |
22 |
sd = socket(AF_UNIX, SOCK_STREAM, 0); |
24 |
sd = socket(AF_UNIX, SOCK_STREAM, 0); |
23 |
if (sd == -1) { |
25 |
if (sd == -1) { |
24 |
e = errno; |
26 |
e = errno; |
Lines 27-33
Link Here
|
27 |
s->perm_config->occtl_socket_file, strerror(e)); |
29 |
s->perm_config->occtl_socket_file, strerror(e)); |
28 |
return -1; |
30 |
return -1; |
29 |
} |
31 |
} |
30 |
@@ -131,7 +136,7 @@ int ctl_handler_init(main_server_st * s) |
32 |
@@ -133,7 +136,7 @@ int ctl_handler_init(main_server_st * s) |
31 |
ret = bind(sd, (struct sockaddr *)&sa, SUN_LEN(&sa)); |
33 |
ret = bind(sd, (struct sockaddr *)&sa, SUN_LEN(&sa)); |
32 |
if (ret == -1) { |
34 |
if (ret == -1) { |
33 |
e = errno; |
35 |
e = errno; |
Lines 36-42
Link Here
|
36 |
s->perm_config->occtl_socket_file, strerror(e)); |
38 |
s->perm_config->occtl_socket_file, strerror(e)); |
37 |
return -1; |
39 |
return -1; |
38 |
} |
40 |
} |
39 |
@@ -139,14 +144,14 @@ int ctl_handler_init(main_server_st * s) |
41 |
@@ -141,14 +144,14 @@ int ctl_handler_init(main_server_st * s) |
40 |
ret = chown(s->perm_config->occtl_socket_file, s->perm_config->uid, s->perm_config->gid); |
42 |
ret = chown(s->perm_config->occtl_socket_file, s->perm_config->uid, s->perm_config->gid); |
41 |
if (ret == -1) { |
43 |
if (ret == -1) { |
42 |
e = errno; |
44 |
e = errno; |