summaryrefslogtreecommitdiff
path: root/clientserver.c
diff options
context:
space:
mode:
authorWayne Davison <wayned@samba.org>2005-01-28 17:10:16 +0000
committerWayne Davison <wayned@samba.org>2005-01-28 17:10:16 +0000
commit186387301f0a56f4fbd6bf495cdd5421947ada16 (patch)
tree6585752a24aa858756b3ee7a2f8966275d313666 /clientserver.c
parent1bd9db74ba614656d016e360cc780df11fc706fc (diff)
downloadrsync-186387301f0a56f4fbd6bf495cdd5421947ada16.tar.gz
- Moved read_only variable here from options.c
- Set read_only to 1 if the module is read-only. - Make sure that the verbose level is 0 before we parse the client's options.
Diffstat (limited to 'clientserver.c')
-rw-r--r--clientserver.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/clientserver.c b/clientserver.c
index 447e1fb5..fdd63868 100644
--- a/clientserver.c
+++ b/clientserver.c
@@ -32,7 +32,6 @@ extern int am_server;
extern int am_daemon;
extern int am_root;
extern int module_id;
-extern int read_only;
extern int verbose;
extern int rsync_port;
extern int kludge_around_eof;
@@ -53,6 +52,7 @@ extern char *config_file;
extern char *files_from;
char *auth_user;
+int read_only = 0;
/* Length of lp_path() string when in daemon mode & not chrooted, else 0. */
unsigned int module_dirlen = 0;
@@ -281,6 +281,9 @@ static int rsync_module(int f_in, int f_out, int i)
module_id = i;
+ if (lp_read_only(module_id))
+ read_only = 1;
+
am_root = (MY_UID() == 0);
if (am_root) {
@@ -448,6 +451,7 @@ static int rsync_module(int f_in, int f_out, int i)
start_glob = 1;
}
+ verbose = 0; /* future verbosity is controlled by client options */
argp = argv;
ret = parse_arguments(&argc, (const char ***) &argp, 0);