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
If the xattr data is bogus in get_rsync_acl(), free the buffer.
[rsync/rsync.git]
/
options.c
diff --git
a/options.c
b/options.c
index
f7ef675
..
b8418cd
100644
(file)
--- a/
options.c
+++ b/
options.c
@@
-1009,7
+1009,7
@@
int parse_arguments(int *argc_p, const char ***argv_p, int frommain)
out_of_memory("parse_arguments");
if (!*cp)
goto options_rejected;
out_of_memory("parse_arguments");
if (!*cp)
goto options_rejected;
- clean_fname(cp,
1
);
+ clean_fname(cp,
CFN_COLLAPSE_DOT_DOT_DIRS
);
rej = check_filter(&server_filter_list, cp, 0) < 0;
free(cp);
if (rej)
rej = check_filter(&server_filter_list, cp, 0) < 0;
free(cp);
if (rej)
@@
-1405,14
+1405,14
@@
int parse_arguments(int *argc_p, const char ***argv_p, int frommain)
if (tmpdir) {
if (!*tmpdir)
goto options_rejected;
if (tmpdir) {
if (!*tmpdir)
goto options_rejected;
- clean_fname(tmpdir,
1
);
+ clean_fname(tmpdir,
CFN_COLLAPSE_DOT_DOT_DIRS
);
if (check_filter(elp, tmpdir, 1) < 0)
goto options_rejected;
}
if (backup_dir) {
if (!*backup_dir)
goto options_rejected;
if (check_filter(elp, tmpdir, 1) < 0)
goto options_rejected;
}
if (backup_dir) {
if (!*backup_dir)
goto options_rejected;
- clean_fname(backup_dir,
1
);
+ clean_fname(backup_dir,
CFN_COLLAPSE_DOT_DOT_DIRS
);
if (check_filter(elp, backup_dir, 1) < 0)
goto options_rejected;
}
if (check_filter(elp, backup_dir, 1) < 0)
goto options_rejected;
}
@@
-1565,7
+1565,7
@@
int parse_arguments(int *argc_p, const char ***argv_p, int frommain)
}
if (partial_dir) {
if (*partial_dir)
}
if (partial_dir) {
if (*partial_dir)
- clean_fname(partial_dir,
1
);
+ clean_fname(partial_dir,
CFN_COLLAPSE_DOT_DOT_DIRS
);
if (!*partial_dir || strcmp(partial_dir, ".") == 0)
partial_dir = NULL;
if (!partial_dir && refused_partial) {
if (!*partial_dir || strcmp(partial_dir, ".") == 0)
partial_dir = NULL;
if (!partial_dir && refused_partial) {
@@
-1606,7
+1606,7
@@
int parse_arguments(int *argc_p, const char ***argv_p, int frommain)
if (server_filter_list.head) {
if (!*files_from)
goto options_rejected;
if (server_filter_list.head) {
if (!*files_from)
goto options_rejected;
- clean_fname(files_from,
1
);
+ clean_fname(files_from,
CFN_COLLAPSE_DOT_DOT_DIRS
);
if (check_filter(&server_filter_list, files_from, 0) < 0)
goto options_rejected;
}
if (check_filter(&server_filter_list, files_from, 0) < 0)
goto options_rejected;
}
@@
-1644,12
+1644,8
@@
void server_options(char **args, int *argc_p)
static char argstr[64];
int ac = *argc_p;
char *arg;
static char argstr[64];
int ac = *argc_p;
char *arg;
-
int i, x;
int i, x;
- if (blocking_io == -1)
- blocking_io = 0;
-
/* This should always remain first on the server's command-line. */
args[ac++] = "--server";
/* This should always remain first on the server's command-line. */
args[ac++] = "--server";
@@
-1752,14
+1748,20
@@
void server_options(char **args, int *argc_p)
if (do_compression)
argstr[x++] = 'z';
if (do_compression)
argstr[x++] = 'z';
+ /* We make use of the -e option to let the server know about any
+ * pre-release protocol version && our allow_inc_recurse status. */
+ set_allow_inc_recurse();
#if SUBPROTOCOL_VERSION != 0
#if SUBPROTOCOL_VERSION != 0
- /* If we're speaking a pre-release version of a protocol, we tell
- * the server about this by (ab)using the -e option. */
if (protocol_version == PROTOCOL_VERSION) {
x += snprintf(argstr+x, sizeof argstr - x,
if (protocol_version == PROTOCOL_VERSION) {
x += snprintf(argstr+x, sizeof argstr - x,
- "e%d.%d", PROTOCOL_VERSION, SUBPROTOCOL_VERSION);
- }
+ "e%d.%d%s", PROTOCOL_VERSION, SUBPROTOCOL_VERSION,
+ allow_inc_recurse ? "i" : "");
+ } else
#endif
#endif
+ if (allow_inc_recurse) {
+ argstr[x++] = 'e';
+ argstr[x++] = 'i';
+ }
argstr[x] = '\0';
argstr[x] = '\0';
@@
-1925,8
+1927,8
@@
void server_options(char **args, int *argc_p)
if (numeric_ids)
args[ac++] = "--numeric-ids";
if (numeric_ids)
args[ac++] = "--numeric-ids";
- if (
!allow_inc_recurse
)
- args[ac++] = "--
no-i-r
";
+ if (
use_qsort
)
+ args[ac++] = "--
use-qsort
";
if (am_sender) {
if (ignore_existing)
if (am_sender) {
if (ignore_existing)