Displaying 1 result from an estimated 1 matches for "lastslash".
Did you mean:
last_hash
2007 Oct 18
0
[PATCH] Use a control socket directory to restrict access
...;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, _("Creating UNIX socket failed: %s"), strerror(errno));
+ goto b...