search for: init_control

Displaying 2 results from an estimated 2 matches for "init_control".

2007 Oct 18
0
[PATCH] Use credentials and permissions on control socket where available
..._CURRENT; + greeting.pid = getpid(); if(bufferevent_write(ev, &greeting, sizeof greeting) == -1) { logger(LOG_ERR, _("Cannot send greeting for new control connection: %s"), @@ -213,6 +214,7 @@ static int control_compare(const struct event *a, const struct event *b) { bool init_control() { int result; struct sockaddr_un addr; + mode_t old_umask; if(strlen(controlsocketname) >= sizeof addr.sun_path) { logger(LOG_ERR, _("Control socket filename too long!")); @@ -230,7 +232,11 @@ bool init_control() { return false; } - //unlink(controlsocketname); + /*...
2007 Oct 18
0
[PATCH] Use a control socket directory to restrict access
...URRENT; + greeting.pid = getpid(); if(bufferevent_write(ev, &greeting, sizeof greeting) == -1) { logger(LOG_ERR, _("Cannot send greeting for new control connection: %s"), @@ -213,52 +214,88 @@ static int control_compare(const struct event *a, const struct event *b) { bool init_control() { int result; struct sockaddr_un addr; + char *lastslash; + const char *controlsocketbasename = controlsocketname; - if(strlen(controlsocketname) >= sizeof addr.sun_path) { + control_socket = socket(PF_UNIX, SOCK_STREAM, 0); + + if(control_socket < 0) { + logger(LOG_ERR, _("Crea...