X-Git-Url: https://www.tinc-vpn.org/git/browse?p=tinc;a=blobdiff_plain;f=src%2Ftincd.c;h=9c337f88cf9f438255a561dd07c4478f39e53692;hp=e4a2a44b4c6350d24017ad7a17106fd6dfe04501;hb=bb2495e569fb161b42efd633eb1c471b8222b1fb;hpb=f8f1007bf469d44480d95d0d78ddc156d00e059f diff --git a/src/tincd.c b/src/tincd.c index e4a2a44b..9c337f88 100644 --- a/src/tincd.c +++ b/src/tincd.c @@ -17,7 +17,7 @@ along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - $Id: tincd.c,v 1.10.4.25 2000/11/08 00:10:50 guus Exp $ + $Id: tincd.c,v 1.10.4.28 2000/11/15 01:06:13 zarq Exp $ */ #include "config.h" @@ -31,9 +31,6 @@ #include #include #include -#include -#include -#include #include #include @@ -41,6 +38,26 @@ # include #endif +#ifdef HAVE_OPENSSL_RAND_H +# include +#else +# include +#endif + +#ifdef HAVE_OPENSSL_RSA_H +# include +#else +# include +#endif + +#ifdef HAVE_OPENSSL_ERR_H +# include +#else +# include +#endif + + + #include #include #include @@ -88,6 +105,7 @@ int write_pidfile(void); static struct option const long_options[] = { + { "config", required_argument, NULL, 'c' }, { "kill", no_argument, NULL, 'k' }, { "net", required_argument, NULL, 'n' }, { "help", no_argument, &show_help, 1 }, @@ -228,7 +246,8 @@ int keygen(int bits) void memory_full(int size) { - syslog(LOG_ERR, _("Memory exhausted (last is %s:%d) (couldn't allocate %d bytes), exiting."), cp_file, cp_line, size); + syslog(LOG_ERR, _("Memory exhausted (couldn't allocate %d bytes), exiting."), size); + cp_trace(); exit(1); } @@ -369,6 +388,8 @@ void make_names(void) asprintf(&pidfilename, "/var/run/tinc.%s.pid", netname); if(!confbase) asprintf(&confbase, "%s/tinc/%s", CONFDIR, netname); + else + fprintf(stderr, _("Both netname and configuration directory given, using the latter...\n")); if(!identname) asprintf(&identname, "tinc.%s", netname); }