X-Git-Url: https://tinc-vpn.org/git/browse?a=blobdiff_plain;f=src%2Ftincctl.c;h=f18dc50ee2f7c919e1af4f0356c4c64a344460e6;hb=7ac52637659b7f17ab5139010f0436aefcf9625c;hp=2a2c488e8fd712296a5546b4124408b2d20f1511;hpb=9fe5ab7ccb60537810b60b76a415507ef2cadfdd;p=tinc diff --git a/src/tincctl.c b/src/tincctl.c index 2a2c488e..f18dc50e 100644 --- a/src/tincctl.c +++ b/src/tincctl.c @@ -1305,7 +1305,7 @@ char *get_my_name(bool verbose) { continue; if(*value) { fclose(f); - return strdup(value); + return replace_name(value); } } @@ -1675,18 +1675,6 @@ static int cmd_config(int argc, char *argv[]) { return 0; } -bool check_id(const char *name) { - if(!name || !*name) - return false; - - for(int i = 0; i < strlen(name); i++) { - if(!isalnum(name[i]) && name[i] != '_') - return false; - } - - return true; -} - static bool try_bind(int port) { struct addrinfo *ai = NULL; struct addrinfo hint = {