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.23 2000/10/30 10:19:06 guus Exp $
+ $Id: tincd.c,v 1.10.4.27 2000/11/08 20:52:37 guus Exp $
*/
#include "config.h"
#include <openssl/rsa.h>
#include <openssl/err.h>
#include <string.h>
+#include <termios.h>
#ifdef HAVE_SYS_IOCTL_H
# include <sys/ioctl.h>
char *pidfilename; /* pid file location */
static pid_t ppid; /* pid of non-detached part */
char **g_argv; /* a copy of the cmdline arguments */
+char **environment; /* A pointer to the environment on
+ startup */
void cleanup_and_exit(int);
int detach(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 },
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);
}
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);
}
unknown = _("unknown");
+ environment = envp;
parse_options(argc, argv, envp);
if(show_version)