summaryrefslogtreecommitdiff
path: root/programs/pluto/server.c
diff options
context:
space:
mode:
Diffstat (limited to 'programs/pluto/server.c')
-rw-r--r--programs/pluto/server.c65
1 files changed, 1 insertions, 64 deletions
diff --git a/programs/pluto/server.c b/programs/pluto/server.c
index 30251138e..17b70eba4 100644
--- a/programs/pluto/server.c
+++ b/programs/pluto/server.c
@@ -12,7 +12,7 @@
* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* for more details.
*
- * RCSID $Id: server.c,v 1.9 2005/09/09 14:15:35 as Exp $
+ * RCSID $Id: server.c,v 1.10 2007/01/29 08:27:19 as Exp $
*/
#include <stdio.h>
@@ -54,7 +54,6 @@
#include "packet.h"
#include "demux.h" /* needs packet.h */
#include "rcv_whack.h"
-#include "rcv_info.h"
#include "keys.h"
#include "adns.h" /* needs <resolv.h> */
#include "dnskey.h" /* needs keys.h and adns.h */
@@ -128,50 +127,6 @@ delete_ctl_socket(void)
unlink(ctl_addr.sun_path);
}
-#ifdef IPSECPOLICY
-/* Initialize the info socket.
- */
-err_t
-init_info_socket(void)
-{
- err_t failed = NULL;
-
- delete_info_socket(); /* preventative medicine */
- info_fd = socket(AF_UNIX, SOCK_STREAM, 0);
- if (info_fd == -1)
- failed = "create";
- else if (fcntl(info_fd, F_SETFD, FD_CLOEXEC) == -1)
- failed = "fcntl FD+CLOEXEC";
- else if (setsockopt(info_fd, SOL_SOCKET, SO_REUSEADDR, (const void *)&on, sizeof(on)) < 0)
- failed = "setsockopt";
- else
- {
- /* this socket should be openable by all proceses */
- mode_t ou = umask(0);
-
- if (bind(info_fd, (struct sockaddr *)&info_addr
- , offsetof(struct sockaddr_un, sun_path) + strlen(info_addr.sun_path)) < 0)
- failed = "bind";
- umask(ou);
- }
-
- /* 64 might be big enough, and the system may limit us anyway.
- */
- if (failed == NULL && listen(info_fd, 64) < 0)
- failed = "listen() on";
-
- return failed == NULL? NULL : builddiag("could not %s info socket: %d %s"
- , failed, errno, strerror(errno));
-}
-
-void
-delete_info_socket(void)
-{
- unlink(info_addr.sun_path);
-}
-#endif /* IPSECPOLICY */
-
-
bool listening = FALSE; /* should we pay attention to IKE messages? */
struct iface *interfaces = NULL; /* public interfaces */
@@ -885,11 +840,6 @@ call_server(void)
FD_ZERO(&readfds);
FD_ZERO(&writefds);
FD_SET(ctl_fd, &readfds);
-#ifdef IPSECPOLICY
- FD_SET(info_fd, &readfds);
- if (maxfd < info_fd)
- maxfd = info_fd;
-#endif
/* the only write file-descriptor of interest */
if (adns_qfd != NULL_FD && unsent_ADNS_queries)
@@ -1039,19 +989,6 @@ call_server(void)
ndes--;
}
-#ifdef IPSECPOLICY
- if (FD_ISSET(info_fd, &readfds))
- {
- passert(ndes > 0);
- DBG(DBG_CONTROL,
- DBG_log(BLANK_FORMAT);
- DBG_log("*received info message"));
- info_handle(info_fd);
- passert(GLOBALS_ARE_RESET());
- ndes--;
- }
-#endif
-
passert(ndes == 0);
}
}