projects
/
tinc
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Ensure send_udp_probe_packet len is valid for the buffer size.
[tinc]
/
src
/
invitation.c
diff --git
a/src/invitation.c
b/src/invitation.c
index
500f243
..
2976968
100644
(file)
--- a/
src/invitation.c
+++ b/
src/invitation.c
@@
-836,8
+836,12
@@
make_names:
fprintf(stderr, "Ignoring unknown variable '%s' in invitation.\n", l);
continue;
} else if(!(variables[i].type & VAR_SAFE)) {
fprintf(stderr, "Ignoring unknown variable '%s' in invitation.\n", l);
continue;
} else if(!(variables[i].type & VAR_SAFE)) {
- fprintf(stderr, "Ignoring unsafe variable '%s' in invitation.\n", l);
- continue;
+ if(force) {
+ fprintf(stderr, "Warning: unsafe variable '%s' in invitation.\n", l);
+ } else {
+ fprintf(stderr, "Ignoring unsafe variable '%s' in invitation.\n", l);
+ continue;
+ }
}
// Copy the safe variable to the right config file
}
// Copy the safe variable to the right config file
@@
-983,7
+987,12
@@
ask_netname:
char filename2[PATH_MAX];
snprintf(filename, sizeof(filename), "%s" SLASH "tinc-up.invitation", confbase);
char filename2[PATH_MAX];
snprintf(filename, sizeof(filename), "%s" SLASH "tinc-up.invitation", confbase);
+
+#ifdef HAVE_MINGW
+ snprintf(filename2, sizeof(filename2), "%s" SLASH "tinc-up.bat", confbase);
+#else
snprintf(filename2, sizeof(filename2), "%s" SLASH "tinc-up", confbase);
snprintf(filename2, sizeof(filename2), "%s" SLASH "tinc-up", confbase);
+#endif
if(valid_tinc_up) {
if(tty) {
if(valid_tinc_up) {
if(tty) {
@@
-1013,10
+1022,14
@@
ask_netname:
char *command;
#ifndef HAVE_MINGW
const char *editor = getenv("VISUAL");
char *command;
#ifndef HAVE_MINGW
const char *editor = getenv("VISUAL");
- if (!editor)
+
+ if(!editor) {
editor = getenv("EDITOR");
editor = getenv("EDITOR");
- if (!editor)
+ }
+
+ if(!editor) {
editor = "vi";
editor = "vi";
+ }
xasprintf(&command, "\"%s\" \"%s\"", editor, filename);
#else
xasprintf(&command, "\"%s\" \"%s\"", editor, filename);
#else