From: Andreas Steffen Date: Mon, 29 Jan 2007 07:42:30 +0000 (-0000) Subject: removed IPSECPOLICY compile option X-Git-Tag: 4.0.7~72 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f527c5a2880ba107a8032277cdaca2295c2a9dd3;p=thirdparty%2Fstrongswan.git removed IPSECPOLICY compile option --- diff --git a/src/pluto/plutomain.c b/src/pluto/plutomain.c index 85632dfbb7..09f8c61d8d 100644 --- a/src/pluto/plutomain.c +++ b/src/pluto/plutomain.c @@ -507,19 +507,6 @@ main(int argc, char **argv) } } -#ifdef IPSECPOLICY - /* create info socket. */ - { - err_t ugh = init_info_socket(); - - if (ugh != NULL) - { - fprintf(stderr, "pluto: %s", ugh); - exit_pluto(1); - } - } -#endif - /* If not suppressed, do daemon fork */ if (fork_desired) @@ -571,12 +558,10 @@ main(int argc, char **argv) int i; for (i = getdtablesize() - 1; i >= 0; i--) /* Bad hack */ - if ((!log_to_stderr || i != 2) -#ifdef IPSECPOLICY - && i != info_fd -#endif - && i != ctl_fd) + { + if ((!log_to_stderr || i != 2) && i != ctl_fd) close(i); + } /* make sure that stdin, stdout, stderr are reserved */ if (open("/dev/null", O_RDONLY) != 0) diff --git a/src/pluto/server.c b/src/pluto/server.c index 9cd3e07c0c..1cc2215153 100644 --- a/src/pluto/server.c +++ b/src/pluto/server.c @@ -124,50 +124,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 */ @@ -879,11 +835,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) @@ -1033,19 +984,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); } }