mirror of
https://github.com/samba-team/samba.git
synced 2025-02-26 21:57:41 +03:00
ctdb-daemon: Drop attempt to connect to Unix domain socket
This was a weak attempt at exclusivity. PID file creation now does that properly. BUG: https://bugzilla.samba.org/show_bug.cgi?id=12287 Signed-off-by: Martin Schwenke <martin@meltin.net> Reviewed-by: Amitay Isaacs <amitay@gmail.com> (cherry picked from commit 8eff9e96037627b1e4adf3ccc8da94ef8f0bad2a)
This commit is contained in:
parent
8866233e5d
commit
14313b0d57
@ -1007,15 +1007,6 @@ static int ux_socket_bind(struct ctdb_context *ctdb)
|
||||
addr.sun_family = AF_UNIX;
|
||||
strncpy(addr.sun_path, ctdb->daemon.name, sizeof(addr.sun_path)-1);
|
||||
|
||||
/* First check if an old ctdbd might be running */
|
||||
if (connect(ctdb->daemon.sd,
|
||||
(struct sockaddr *)&addr, sizeof(addr)) == 0) {
|
||||
DEBUG(DEBUG_CRIT,
|
||||
("Something is already listening on ctdb socket '%s'\n",
|
||||
ctdb->daemon.name));
|
||||
goto failed;
|
||||
}
|
||||
|
||||
/* Remove any old socket */
|
||||
unlink(ctdb->daemon.name);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user