Bug 14163 - RSYNC_SSL_PORT env should be set for invocation of --rsh command
Summary: RSYNC_SSL_PORT env should be set for invocation of --rsh command
Status: RESOLVED FIXED
Alias: None
Product: rsync
Classification: Unclassified
Component: core (show other bugs)
Version: 3.1.3
Hardware: All All
: P5 normal (vote)
Target Milestone: ---
Assignee: Wayne Davison
QA Contact: Rsync QA Contact
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-10-18 15:25 UTC by Björn Jacke
Modified: 2020-04-08 02:26 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Björn Jacke 2019-10-18 15:25:53 UTC
when running the rsync with -e/--rsh stunnel-rsync and an alternative port on the command line (--port 12345), when this port should be communicated to the "rsh" program to be evaluated, which could be simply done by setting the RSYNC_SSL_PORT environment variable in case the --port option was used with rsync.
Comment 1 Wayne Davison 2020-04-06 02:41:08 UTC
I've committed code that sets an RSYNC_PORT value in the environment for any daemon-over-rsh connections. The value will be "0" if the default port is being assumed, or the specified port number. This lets a script choose their own default port while still being able to discern if the user manually requested port 873.
Comment 2 Björn Jacke 2020-04-06 10:50:55 UTC
thanks but the default port handling does not work correctly yet. Calling rsync like:

rsync --rsh=openssl-rsync -aiv HOST::module

without any port definition, rsync sets the env var RSYNC_PORT=873 for the script. This is not what is desired here. Without an explicit port definition rsync should not be set to 873. Setting it to 0 as you mentioned in your commend would be fine.
Comment 3 Wayne Davison 2020-04-08 02:26:17 UTC
Fixed.