Matt McCutchen's Web Site
/
rsync
/
rsync.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Moved the externs to the top and made a few trivial format tweaks.
[rsync/rsync.git]
/
main.c
diff --git
a/main.c
b/main.c
index
915d1df
..
3819274
100644
(file)
--- a/
main.c
+++ b/
main.c
@@
-43,6
+43,7
@@
extern int local_server;
extern int log_got_error;
extern int module_id;
extern int orig_umask;
extern int log_got_error;
extern int module_id;
extern int orig_umask;
+extern int keep_dirlinks;
extern int preserve_hard_links;
extern int protocol_version;
extern int recurse;
extern int preserve_hard_links;
extern int protocol_version;
extern int recurse;
@@
-84,7
+85,7
@@
void wait_process(pid_t pid, int *status)
io_flush(FULL_FLUSH);
}
io_flush(FULL_FLUSH);
}
- if (
(waited_pid == -1) && (errno == ECHILD)
) {
+ if (
waited_pid == -1 && errno == ECHILD
) {
/* status of requested child no longer available.
* check to see if it was processed by the sigchld_handler.
*/
/* status of requested child no longer available.
* check to see if it was processed by the sigchld_handler.
*/
@@
-120,7
+121,8
@@
static void report(int f)
if (am_daemon) {
log_exit(0, __FILE__, __LINE__);
if (am_daemon) {
log_exit(0, __FILE__, __LINE__);
- if (f == -1 || !am_sender) return;
+ if (f == -1 || !am_sender)
+ return;
}
if (am_server) {
}
if (am_server) {
@@
-369,6
+371,12
@@
static void do_server_sender(int f_in, int f_out, int argc,char *argv[])
(long)getpid());
}
(long)getpid());
}
+ if (am_daemon && lp_write_only(module_id) && am_sender) {
+ rprintf(FERROR, "ERROR: module is write only\n");
+ exit_cleanup(RERR_SYNTAX);
+ return;
+ }
+
if (!relative_paths && !push_dir(dir)) {
rsyserr(FERROR, errno, "push_dir#3 %s failed",
full_fname(dir));
if (!relative_paths && !push_dir(dir)) {
rsyserr(FERROR, errno, "push_dir#3 %s failed",
full_fname(dir));
@@
-566,6
+574,7
@@
void start_server(int f_in, int f_out, int argc, char *argv[])
io_start_multiplex_out(f_out);
if (am_sender) {
io_start_multiplex_out(f_out);
if (am_sender) {
+ keep_dirlinks = 0; /* Must be disabled on the sender. */
if (!read_batch) {
recv_exclude_list(f_in);
if (cvs_exclude)
if (!read_batch) {
recv_exclude_list(f_in);
if (cvs_exclude)
@@
-602,6
+611,7
@@
int client_run(int f_in, int f_out, pid_t pid, int argc, char *argv[])
io_start_multiplex_in(f_in);
if (am_sender) {
io_start_multiplex_in(f_in);
if (am_sender) {
+ keep_dirlinks = 0; /* Must be disabled on the sender. */
io_start_buffering_out(f_out);
if (cvs_exclude)
add_cvs_excludes();
io_start_buffering_out(f_out);
if (cvs_exclude)
add_cvs_excludes();