projects
/
tinc
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Don't tarpit localhost connections
[tinc]
/
src
/
fsck.c
diff --git
a/src/fsck.c
b/src/fsck.c
index
fdd584e
..
b44b775
100644
(file)
--- a/
src/fsck.c
+++ b/
src/fsck.c
@@
-64,6
+64,7
@@
again:
goto again;
}
goto again;
}
+static void print_tinc_cmd(const char *format, ...) ATTR_FORMAT(printf, 1, 2);
static void print_tinc_cmd(const char *format, ...) {
if(confbasegiven) {
fprintf(stderr, "%s -c %s ", exe_name, confbase);
static void print_tinc_cmd(const char *format, ...) {
if(confbasegiven) {
fprintf(stderr, "%s -c %s ", exe_name, confbase);
@@
-141,6
+142,11
@@
static void check_conffile(const char *nodename, bool server) {
++total_vars;
}
++total_vars;
}
+ if(!total_vars) {
+ splay_empty_tree(&config);
+ return;
+ }
+
const size_t countlen = total_vars * sizeof(int);
int *count = alloca(countlen);
memset(count, 0, countlen);
const size_t countlen = total_vars * sizeof(int);
int *count = alloca(countlen);
memset(count, 0, countlen);
@@
-185,7
+191,7
@@
static void check_conffile(const char *nodename, bool server) {
splay_empty_tree(&config);
}
splay_empty_tree(&config);
}
-#ifdef HAVE_
MINGW
+#ifdef HAVE_
WINDOWS
typedef int uid_t;
static uid_t getuid(void) {
typedef int uid_t;
static uid_t getuid(void) {
@@
-219,7
+225,7
@@
static void check_key_file_mode(const char *fname) {
}
}
}
}
}
}
-#endif // HAVE_
MINGW
+#endif // HAVE_
WINDOWS
static char *read_node_name(void) {
if(access(tinc_conf, R_OK) == 0) {
static char *read_node_name(void) {
if(access(tinc_conf, R_OK) == 0) {
@@
-536,14
+542,11
@@
static bool check_public_keys(splay_tree_t *config, const char *name, rsa_t *rsa
fprintf(stderr, "WARNING: cannot read %s\n", host_file);
}
fprintf(stderr, "WARNING: cannot read %s\n", host_file);
}
- ecdsa_t *ec_pub = NULL;
- read_ecdsa_public_key(&ec_pub, &config, name);
+ ecdsa_t *ec_pub = read_ecdsa_public_key(&config, name);
bool success = true;
#ifndef DISABLE_LEGACY
bool success = true;
#ifndef DISABLE_LEGACY
- rsa_t *rsa_pub = NULL;
- read_rsa_public_key(&rsa_pub, config, name);
-
+ rsa_t *rsa_pub = read_rsa_public_key(config, name);
success = check_rsa_pubkey(rsa_priv, rsa_pub, host_file);
rsa_free(rsa_pub);
#endif
success = check_rsa_pubkey(rsa_priv, rsa_pub, host_file);
rsa_free(rsa_pub);
#endif