summaryrefslogtreecommitdiff
path: root/clientserver.c
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2000-01-29 05:02:23 +0000
committerAndrew Tridgell <tridge@samba.org>2000-01-29 05:02:23 +0000
commit09b7f5dbb189f6d1a3543d8f4f2f22b20d5fd3da (patch)
tree95be3c8967f413e95f32365fbf5f69d0c00df766 /clientserver.c
parent6d7b6081ac4c224f571fb7e90d437e3c118fae6c (diff)
downloadrsync-09b7f5dbb189f6d1a3543d8f4f2f22b20d5fd3da.tar.gz
move the read only daemon test to after the protocol setup
Diffstat (limited to 'clientserver.c')
-rw-r--r--clientserver.c21
1 files changed, 7 insertions, 14 deletions
diff --git a/clientserver.c b/clientserver.c
index 2cd2c40a..df847ffc 100644
--- a/clientserver.c
+++ b/clientserver.c
@@ -101,8 +101,10 @@ int start_socket_client(char *host, char *path, int argc, char *argv[])
}
io_printf(fd,"\n");
- if (remote_version == 22 || (remote_version > 17 && !am_sender))
- io_start_multiplex_in(fd);
+ if (remote_version < 23) {
+ if (remote_version == 22 || (remote_version > 17 && !am_sender))
+ io_start_multiplex_in(fd);
+ }
return client_run(fd, fd, -1, argc, argv);
}
@@ -163,9 +165,6 @@ static int rsync_module(int fd, int i)
module_id = i;
- if (lp_read_only(i))
- read_only = 1;
-
am_root = (getuid() == 0);
if (am_root) {
@@ -316,15 +315,9 @@ static int rsync_module(int fd, int i)
argp = argv + optind;
optind = 0;
- if (remote_version == 22 || (remote_version > 17 && am_sender))
- io_start_multiplex_out(fd);
-
- if (read_only) {
- extern int am_sender;
- if (!am_sender) {
- rprintf(FERROR,"ERROR: module is read only\n");
- return -1;
- }
+ if (remote_version < 23) {
+ if (remote_version == 22 || (remote_version > 17 && am_sender))
+ io_start_multiplex_out(fd);
}
if (!ret) {