-
Notifications
You must be signed in to change notification settings - Fork 54
Open
Labels
bugSomething isn't workingSomething isn't working
Description
The reason is a bug in openrsync where openrsync does not send the --daemon arg when starting a remote rsync daemon process over a remote shell. The fix (against the (old) https://github.com/kristapsdz/openrsync repository) is:
diff --git i/extern.h w/extern.h
index e3636d4..89be4e8 100644
--- i/extern.h
+++ w/extern.h
@@ -99,6 +99,7 @@ struct fargs {
enum fmode mode; /* mode of operation */
int remote; /* uses rsync:// or :: for remote */
char *module; /* if rsync://, the module */
+ int daemon_over_rsh;
};
/*
diff --git i/fargs.c w/fargs.c
index 17ecd53..9065084 100644
--- i/fargs.c
+++ w/fargs.c
@@ -95,6 +95,9 @@ fargs_cmdline(struct sess *sess, const struct fargs *f, size_t *skip)
addargs(&args, "--server");
}
+ if (f->daemon_over_rsh)
+ addargs(&args, "--daemon");
+
/* Shared arguments. */
if (sess->opts->del)
diff --git i/main.c w/main.c
index 1be9361..e5542f9 100644
--- i/main.c
+++ w/main.c
@@ -204,6 +204,14 @@ fargs_parse(size_t argc, char *argv[], struct opts *opts)
}
}
+ for (j = 0; j < f->sourcesz; j++) {
+ if (!fargs_is_daemon(f->sources[j]))
+ continue;
+
+ f->daemon_over_rsh = 1;
+ break;
+ }
+
/*
* If we're not remote and a sender, strip our hostname.
* Then exit if we're a sender or a local connection.
I’ll see how to get this upstreamed into OpenBSD…
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working