--- /modules/mod_ctrls.c_orig	2019-11-28 05:19:44 +0000
+++ /modules/mod_ctrls.c	2019-11-28 05:24:25 +0000
@@ -81,8 +81,6 @@
 
 static unsigned char ctrls_engine = TRUE;
 
-#define CTRLS_LISTEN_FL_REMOVE_SOCKET	0x0001
-
 /* Necessary prototypes */
 static int ctrls_setblock(int sockfd);
 static int ctrls_setnonblock(int sockfd);
@@ -437,8 +435,8 @@
 }
 
 /* Create a listening local socket */
-static int ctrls_listen(const char *sock_file, int flags) {
-  int sockfd = -1, len = 0;
+static int ctrls_listen(const char *sock_file) {  
+int sockfd = -1, len = 0;
   struct sockaddr_un sock;
 #if !defined(SO_PEERCRED) && !defined(HAVE_GETPEEREID) && \
     !defined(HAVE_GETPEERUCRED) && defined(LOCAL_CREDS)
@@ -497,12 +495,10 @@
     return -1;
   }
 
-  if (flags & CTRLS_LISTEN_FL_REMOVE_SOCKET) {
-    /* Make sure the path to which we want to bind this socket doesn't already
-     * exist.
-     */
-    (void) unlink(sock_file);
-  }
+  /* Make sure the path to which we want to bind this socket doesn't already
+   * exist.
+   */
+  (void) unlink(sock_file);
 
   /* Fill in the socket structure fields */
   memset(&sock, 0, sizeof(sock));
@@ -1206,8 +1202,8 @@
 
   /* Start listening on the ctrl socket */
   PRIVS_ROOT
-  ctrls_sockfd = ctrls_listen(ctrls_sock_file, CTRLS_LISTEN_FL_REMOVE_SOCKET);
-  PRIVS_RELINQUISH
+	ctrls_sockfd = ctrls_listen(ctrls_sock_file);  
+PRIVS_RELINQUISH
 
   /* Start a timer for the checking/processing of the ctrl socket.  */
   pr_timer_remove(CTRLS_TIMER_ID, &ctrls_module);
@@ -1298,9 +1294,6 @@
   memset(&ctrls_sock_acl, '\0', sizeof(ctrls_acl_t));
   ctrls_sock_acl.acl_usrs.allow = ctrls_sock_acl.acl_grps.allow = FALSE;
 
-  /* Start listening on the ctrl socket */
-  ctrls_sockfd = ctrls_listen(ctrls_sock_file, 0);
-
   pr_event_register(&ctrls_module, "core.restart", ctrls_restart_ev, NULL);
   pr_event_register(&ctrls_module, "core.shutdown", ctrls_shutdown_ev, NULL);
   pr_event_register(&ctrls_module, "core.postparse", ctrls_postparse_ev, NULL);
