client: Fix connection to a remote with password in it.

The password needs to be cleaned after we processed the uri.

Thanks to Patrick Buergi.
This commit is contained in:
Andreas Schneider 2013-02-19 08:35:20 +01:00
parent fc2b860022
commit 11b539088e

View file

@ -206,6 +206,16 @@ int main(int argc, char **argv) {
print_help(); print_help();
} }
if (arguments.debug_level) {
csync_set_log_level(arguments.debug_level);
}
if (csync_create(&csync, argv[optind], argv[optind+1]) < 0) {
fprintf(stderr, "csync_create: failed\n");
exit(1);
}
/* /*
* Protect password from ps listing * Protect password from ps listing
* Find and replace :password@ by :********@ * Find and replace :password@ by :********@
@ -223,15 +233,6 @@ int main(int argc, char **argv) {
} }
} }
if (arguments.debug_level) {
csync_set_log_level(arguments.debug_level);
}
if (csync_create(&csync, argv[optind], argv[optind+1]) < 0) {
fprintf(stderr, "csync_create: failed\n");
exit(1);
}
csync_set_auth_callback(csync, csync_getpass); csync_set_auth_callback(csync, csync_getpass);
if (arguments.disable_statedb) { if (arguments.disable_statedb) {