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
Improved the arg-checking of a daemon command.
[rsync/rsync.git]
/
options.c
diff --git
a/options.c
b/options.c
index
a404a8d
..
82fb24c
100644
(file)
--- a/
options.c
+++ b/
options.c
@@
-25,6
+25,7
@@
extern int module_id;
extern int sanitize_paths;
extern int module_id;
extern int sanitize_paths;
+extern int daemon_over_rsh;
extern struct filter_list_struct filter_list;
extern struct filter_list_struct server_filter_list;
extern struct filter_list_struct filter_list;
extern struct filter_list_struct server_filter_list;
@@
-95,7
+96,6
@@
int recurse = 0;
int allow_inc_recurse = 1;
int xfer_dirs = -1;
int am_daemon = 0;
int allow_inc_recurse = 1;
int xfer_dirs = -1;
int am_daemon = 0;
-int daemon_over_rsh = 0;
int do_stats = 0;
int do_progress = 0;
int keep_partial = 0;
int do_stats = 0;
int do_progress = 0;
int keep_partial = 0;
@@
-329,7
+329,7
@@
void usage(enum logcode F)
rprintf(F," -A, --acls preserve ACLs (implies --perms)\n");
#endif
#ifdef SUPPORT_XATTRS
rprintf(F," -A, --acls preserve ACLs (implies --perms)\n");
#endif
#ifdef SUPPORT_XATTRS
- rprintf(F," -X, --xattrs preserve extended attributes
(implies --perms)
\n");
+ rprintf(F," -X, --xattrs preserve extended attributes\n");
#endif
rprintf(F," -o, --owner preserve owner (super-user only)\n");
rprintf(F," -g, --group preserve group\n");
#endif
rprintf(F," -o, --owner preserve owner (super-user only)\n");
rprintf(F," -g, --group preserve group\n");
@@
-1190,7
+1190,6
@@
int parse_arguments(int *argc, const char ***argv, int frommain)
case 'X':
#ifdef SUPPORT_XATTRS
preserve_xattrs++;
case 'X':
#ifdef SUPPORT_XATTRS
preserve_xattrs++;
- preserve_perms = 1;
break;
#else
snprintf(err_buf,sizeof(err_buf),
break;
#else
snprintf(err_buf,sizeof(err_buf),
@@
-1617,7
+1616,7
@@
void server_options(char **args,int *argc)
/* 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";
- if (daemon_over_rsh) {
+ if (daemon_over_rsh
> 0
) {
args[ac++] = "--daemon";
*argc = ac;
/* if we're passing --daemon, we're done */
args[ac++] = "--daemon";
*argc = ac;
/* if we're passing --daemon, we're done */