The Samba-Bugzilla – Bug 3945
add arbitrary error reporting (with --error, perhaps)
Last modified: 2008-06-24 01:13:14 UTC
On occasion, it's useful for a remote host to deny rsync'ing; this is trivially done with ssh keys that force a particular command to be given. However, there's no easy way to correctly signal back _why_ the error failed. So, I'm requesting something akin to
rsync --server --error "In failover mode; rsync prohibited"
where it would spew back an appropriate error code and also the given reason.
Since errcode.h doesn't have RERR_ADMINPROHIB, it might be a good thing to create it - regardless of the decision to implement the flag --error.
Created attachment 2185 [details]
I wrote a quick-and-dirty shell script that speaks enough of the rsync protocol to return an error message. "deny-rsync foo" does what you propose "rsync --server --error foo" to do.
Created attachment 2186 [details]
slightly improved "deny-rsync" script
I fixed a few bloopers in the script and generalized it a bit.
Created attachment 2505
Wayne, please consider adding the "deny-rsync" script to support/ ; then this bug could be closed.
The support dir now has an improved version of the deny-rsync script. Thanks for the script and the reminder!