Matt McCutchen's Web Site
/
rsync
/
rsync-patches.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
e1a0600
)
Tweaked a directory copy command in default-acls.test.
author
Wayne Davison
<wayned@samba.org>
Thu, 2 Mar 2006 21:14:26 +0000
(21:14 +0000)
committer
Wayne Davison
<wayned@samba.org>
Thu, 2 Mar 2006 21:14:26 +0000
(21:14 +0000)
acls.diff
patch
|
blob
|
blame
|
history
diff --git
a/acls.diff
b/acls.diff
index
6d7549e
..
554b1b9
100644
(file)
--- a/
acls.diff
+++ b/
acls.diff
@@
-1237,7
+1237,7
@@
ACLs to a non-ACL-supporting disk should complain.
+#endif /* SUPPORT_ACLS */
--- old/backup.c
+++ new/backup.c
+#endif /* SUPPORT_ACLS */
--- old/backup.c
+++ new/backup.c
-@@ -13
4,6 +134
,7 @@ static int make_bak_dir(char *fullpath)
+@@ -13
2,6 +132
,7 @@ static int make_bak_dir(char *fullpath)
} else {
do_lchown(fullpath, st.st_uid, st.st_gid);
do_chmod(fullpath, st.st_mode);
} else {
do_lchown(fullpath, st.st_uid, st.st_gid);
do_chmod(fullpath, st.st_mode);
@@
-1245,7
+1245,7
@@
ACLs to a non-ACL-supporting disk should complain.
}
}
*p = '/';
}
}
*p = '/';
-@@ -18
7,6 +188
,8 @@ static int keep_backup(char *fname)
+@@ -18
5,6 +186
,8 @@ static int keep_backup(char *fname)
if (!(buf = get_backup_name(fname)))
return 0;
if (!(buf = get_backup_name(fname)))
return 0;
@@
-1254,7
+1254,7
@@
ACLs to a non-ACL-supporting disk should complain.
/* Check to see if this is a device file, or link */
if ((am_root && preserve_devices && IS_DEVICE(file->mode))
|| (preserve_specials && IS_SPECIAL(file->mode))) {
/* Check to see if this is a device file, or link */
if ((am_root && preserve_devices && IS_DEVICE(file->mode))
|| (preserve_specials && IS_SPECIAL(file->mode))) {
-@@ -26
2,6 +265
,7 @@ static int keep_backup(char *fname)
+@@ -26
0,6 +263
,7 @@ static int keep_backup(char *fname)
}
}
set_file_attrs(buf, file, NULL, 0);
}
}
set_file_attrs(buf, file, NULL, 0);
@@
-1356,7
+1356,7
@@
ACLs to a non-ACL-supporting disk should complain.
--- old/flist.c
+++ new/flist.c
--- old/flist.c
+++ new/flist.c
-@@ -96
7,6 +967
,8 @@ static struct file_struct *send_file_nam
+@@ -96
6,6 +966
,8 @@ static struct file_struct *send_file_nam
f == -2 ? SERVER_FILTERS : ALL_FILTERS);
if (!file)
return NULL;
f == -2 ? SERVER_FILTERS : ALL_FILTERS);
if (!file)
return NULL;
@@
-1365,7
+1365,7
@@
ACLs to a non-ACL-supporting disk should complain.
if (chmod_modes && !S_ISLNK(file->mode))
file->mode = tweak_mode(file->mode, chmod_modes);
if (chmod_modes && !S_ISLNK(file->mode))
file->mode = tweak_mode(file->mode, chmod_modes);
-@@ -97
8,6 +980
,10 @@ static struct file_struct *send_file_nam
+@@ -97
7,6 +979
,10 @@ static struct file_struct *send_file_nam
if (file->basename[0]) {
flist->files[flist->count++] = file;
send_file_entry(file, f);
if (file->basename[0]) {
flist->files[flist->count++] = file;
send_file_entry(file, f);
@@
-1376,7
+1376,7
@@
ACLs to a non-ACL-supporting disk should complain.
}
return file;
}
}
return file;
}
-@@ -136
6,6 +1372
,8 @@ struct file_list *recv_file_list(int f)
+@@ -136
5,6 +1371
,8 @@ struct file_list *recv_file_list(int f)
flags |= read_byte(f) << 8;
file = receive_file_entry(flist, flags, f);
flags |= read_byte(f) << 8;
file = receive_file_entry(flist, flags, f);
@@
-1385,7
+1385,7
@@
ACLs to a non-ACL-supporting disk should complain.
if (S_ISREG(file->mode) || S_ISLNK(file->mode))
stats.total_size += file->length;
if (S_ISREG(file->mode) || S_ISLNK(file->mode))
stats.total_size += file->length;
-@@ -138
8,6 +1396
,8 @@ struct file_list *recv_file_list(int f)
+@@ -138
7,6 +1395
,8 @@ struct file_list *recv_file_list(int f)
clean_flist(flist, relative_paths, 1);
clean_flist(flist, relative_paths, 1);
@@
-1396,7
+1396,7
@@
ACLs to a non-ACL-supporting disk should complain.
--- old/generator.c
+++ new/generator.c
--- old/generator.c
+++ new/generator.c
-@@ -8
6,6 +86
,7 @@ extern long block_size; /* "long" becaus
+@@ -8
5,6 +85
,7 @@ extern long block_size; /* "long" becaus
extern int max_delete;
extern int force_delete;
extern int one_file_system;
extern int max_delete;
extern int force_delete;
extern int one_file_system;
@@
-1404,7
+1404,7
@@
ACLs to a non-ACL-supporting disk should complain.
extern struct stats stats;
extern dev_t filesystem_dev;
extern char *backup_dir;
extern struct stats stats;
extern dev_t filesystem_dev;
extern char *backup_dir;
-@@ -75
4,6 +755
,7 @@ static int try_dests_non(struct file_str
+@@ -75
3,6 +754
,7 @@ static int try_dests_non(struct file_str
}
static int phase = 0;
}
static int phase = 0;
@@
-4742,7
+4742,7
@@
ACLs to a non-ACL-supporting disk should complain.
--- old/options.c
+++ new/options.c
--- old/options.c
+++ new/options.c
-@@ -4
4,6 +44,7 @@ int keep
_dirlinks = 0;
+@@ -4
5,6 +45,7 @@ int copy
_dirlinks = 0;
int copy_links = 0;
int preserve_links = 0;
int preserve_hard_links = 0;
int copy_links = 0;
int preserve_links = 0;
int preserve_hard_links = 0;
@@
-4750,7
+4750,7
@@
ACLs to a non-ACL-supporting disk should complain.
int preserve_perms = 0;
int preserve_executability = 0;
int preserve_devices = 0;
int preserve_perms = 0;
int preserve_executability = 0;
int preserve_devices = 0;
-@@ -19
3,6 +194
,7 @@ static void print_rsync_version(enum log
+@@ -19
4,6 +195
,7 @@ static void print_rsync_version(enum log
char const *got_socketpair = "no ";
char const *have_inplace = "no ";
char const *hardlinks = "no ";
char const *got_socketpair = "no ";
char const *have_inplace = "no ";
char const *hardlinks = "no ";
@@
-4758,7
+4758,7
@@
ACLs to a non-ACL-supporting disk should complain.
char const *links = "no ";
char const *ipv6 = "no ";
STRUCT_STAT *dumstat;
char const *links = "no ";
char const *ipv6 = "no ";
STRUCT_STAT *dumstat;
-@@ -2
09,6 +211
,10 @@ static void print_rsync_version(enum log
+@@ -2
10,6 +212
,10 @@ static void print_rsync_version(enum log
hardlinks = "";
#endif
hardlinks = "";
#endif
@@
-4769,7
+4769,7
@@
ACLs to a non-ACL-supporting disk should complain.
#ifdef SUPPORT_LINKS
links = "";
#endif
#ifdef SUPPORT_LINKS
links = "";
#endif
-@@ -22
2,9 +228
,9 @@ static void print_rsync_version(enum log
+@@ -22
3,9 +229
,9 @@ static void print_rsync_version(enum log
rprintf(f, "Copyright (C) 1996-2006 by Andrew Tridgell, Wayne Davison, and others.\n");
rprintf(f, "<http://rsync.samba.org/>\n");
rprintf(f, "Capabilities: %d-bit files, %ssocketpairs, "
rprintf(f, "Copyright (C) 1996-2006 by Andrew Tridgell, Wayne Davison, and others.\n");
rprintf(f, "<http://rsync.samba.org/>\n");
rprintf(f, "Capabilities: %d-bit files, %ssocketpairs, "
@@
-4781,8
+4781,8
@@
ACLs to a non-ACL-supporting disk should complain.
/* Note that this field may not have type ino_t. It depends
* on the complicated interaction between largefile feature
/* Note that this field may not have type ino_t. It depends
* on the complicated interaction between largefile feature
-@@ -29
3,6 +299
,9 @@ void usage(enum logcode F)
- rprintf(F," -
K, --keep-dirlinks treat symlinked dir on receiver as dir
\n");
+@@ -29
5,6 +301
,9 @@ void usage(enum logcode F)
+ rprintf(F," -
H, --hard-links preserve hard links
\n");
rprintf(F," -p, --perms preserve permissions\n");
rprintf(F," -E, --executability preserve the file's executability\n");
+#ifdef SUPPORT_ACLS
rprintf(F," -p, --perms preserve permissions\n");
rprintf(F," -E, --executability preserve the file's executability\n");
+#ifdef SUPPORT_ACLS
@@
-4791,7
+4791,7
@@
ACLs to a non-ACL-supporting disk should complain.
rprintf(F," --chmod=CHMOD change destination permissions\n");
rprintf(F," -o, --owner preserve owner (super-user only)\n");
rprintf(F," -g, --group preserve group\n");
rprintf(F," --chmod=CHMOD change destination permissions\n");
rprintf(F," -o, --owner preserve owner (super-user only)\n");
rprintf(F," -g, --group preserve group\n");
-@@ -4
08,6 +417
,9 @@ static struct poptOption long_options[]
+@@ -4
10,6 +419
,9 @@ static struct poptOption long_options[]
{"no-perms", 0, POPT_ARG_VAL, &preserve_perms, 0, 0, 0 },
{"no-p", 0, POPT_ARG_VAL, &preserve_perms, 0, 0, 0 },
{"executability", 'E', POPT_ARG_NONE, &preserve_executability, 0, 0, 0 },
{"no-perms", 0, POPT_ARG_VAL, &preserve_perms, 0, 0, 0 },
{"no-p", 0, POPT_ARG_VAL, &preserve_perms, 0, 0, 0 },
{"executability", 'E', POPT_ARG_NONE, &preserve_executability, 0, 0, 0 },
@@
-4801,7
+4801,7
@@
ACLs to a non-ACL-supporting disk should complain.
{"times", 't', POPT_ARG_VAL, &preserve_times, 1, 0, 0 },
{"no-times", 0, POPT_ARG_VAL, &preserve_times, 0, 0, 0 },
{"no-t", 0, POPT_ARG_VAL, &preserve_times, 0, 0, 0 },
{"times", 't', POPT_ARG_VAL, &preserve_times, 1, 0, 0 },
{"no-times", 0, POPT_ARG_VAL, &preserve_times, 0, 0, 0 },
{"no-t", 0, POPT_ARG_VAL, &preserve_times, 0, 0, 0 },
-@@ -106
2,6 +1074
,23 @@ int parse_arguments(int *argc, const cha
+@@ -106
8,6 +1080
,23 @@ int parse_arguments(int *argc, const cha
usage(FINFO);
exit_cleanup(0);
usage(FINFO);
exit_cleanup(0);
@@
-4825,7
+4825,7
@@
ACLs to a non-ACL-supporting disk should complain.
default:
/* A large opt value means that set_refuse_options()
* turned this option off. */
default:
/* A large opt value means that set_refuse_options()
* turned this option off. */
-@@ -15
02,6 +1531
,10 @@ void server_options(char **args,int *arg
+@@ -15
11,6 +1540
,10 @@ void server_options(char **args,int *arg
if (preserve_hard_links)
argstr[x++] = 'H';
if (preserve_hard_links)
argstr[x++] = 'H';
@@
-4838,7
+4838,7
@@
ACLs to a non-ACL-supporting disk should complain.
if (preserve_gid)
--- old/receiver.c
+++ new/receiver.c
if (preserve_gid)
--- old/receiver.c
+++ new/receiver.c
-@@ -
50,6 +50
,7 @@ extern int keep_partial;
+@@ -
46,6 +46
,7 @@ extern int keep_partial;
extern int checksum_seed;
extern int inplace;
extern int delay_updates;
extern int checksum_seed;
extern int inplace;
extern int delay_updates;
@@
-4846,7
+4846,7
@@
ACLs to a non-ACL-supporting disk should complain.
extern struct stats stats;
extern char *log_format;
extern char *tmpdir;
extern struct stats stats;
extern char *log_format;
extern char *tmpdir;
-@@ -34
8,6 +349
,10 @@ int recv_files(int f_in, struct file_lis
+@@ -34
4,6 +345
,10 @@ int recv_files(int f_in, struct file_lis
int itemizing = am_daemon ? daemon_log_format_has_i
: !am_server && log_format_has_i;
int max_phase = protocol_version >= 29 ? 2 : 1;
int itemizing = am_daemon ? daemon_log_format_has_i
: !am_server && log_format_has_i;
int max_phase = protocol_version >= 29 ? 2 : 1;
@@
-4857,7
+4857,7
@@
ACLs to a non-ACL-supporting disk should complain.
int i, recv_ok;
if (verbose > 2)
int i, recv_ok;
if (verbose > 2)
-@@ -54
5,7 +550
,16 @@ int recv_files(int f_in, struct file_lis
+@@ -54
1,7 +546
,16 @@ int recv_files(int f_in, struct file_lis
* mode based on the local permissions and some heuristics. */
if (!preserve_perms) {
int exists = fd1 != -1;
* mode based on the local permissions and some heuristics. */
if (!preserve_perms) {
int exists = fd1 != -1;
@@
-4913,7
+4913,7
@@
ACLs to a non-ACL-supporting disk should complain.
? FCLIENT : FINFO;
--- old/rsync.h
+++ new/rsync.h
? FCLIENT : FINFO;
--- old/rsync.h
+++ new/rsync.h
-@@ -65
7,6 +657
,44 @@ struct chmod_mode_struct;
+@@ -65
8,6 +658
,44 @@ struct chmod_mode_struct;
#define UNUSED(x) x __attribute__((__unused__))
#define UNUSED(x) x __attribute__((__unused__))
@@
-4960,15
+4960,15
@@
ACLs to a non-ACL-supporting disk should complain.
/* We have replacement versions of these if they're missing. */
--- old/rsync.yo
+++ new/rsync.yo
/* We have replacement versions of these if they're missing. */
--- old/rsync.yo
+++ new/rsync.yo
-@@ -3
19,6 +319
,7 @@ to the detailed description below for a
- -
K, --keep-dirlinks treat symlinked dir on receiver as dir
+@@ -3
21,6 +321
,7 @@ to the detailed description below for a
+ -
H, --hard-links preserve hard links
-p, --perms preserve permissions
-E, --executability preserve executability
+ -A, --acls preserve ACLs (implies -p) [non-standard]
--chmod=CHMOD change destination permissions
-o, --owner preserve owner (super-user only)
-g, --group preserve group
-p, --perms preserve permissions
-E, --executability preserve executability
+ -A, --acls preserve ACLs (implies -p) [non-standard]
--chmod=CHMOD change destination permissions
-o, --owner preserve owner (super-user only)
-g, --group preserve group
-@@ -7
05,7 +706
,9 @@ quote(itemize(
+@@ -7
42,7 +743
,9 @@ quote(itemize(
permissions, though the bf(--executability) option might change just
the execute permission for the file.
it() New files get their "normal" permission bits set to the source
permissions, though the bf(--executability) option might change just
the execute permission for the file.
it() New files get their "normal" permission bits set to the source
@@
-4979,7
+4979,7
@@
ACLs to a non-ACL-supporting disk should complain.
their special permission bits disabled except in the case where a new
directory inherits a setgid bit from its parent directory.
))
their special permission bits disabled except in the case where a new
directory inherits a setgid bit from its parent directory.
))
-@@ -7
36,9 +739
,11 @@ The preservation of the destination's se
+@@ -7
73,9 +776
,11 @@ The preservation of the destination's se
directories when bf(--perms) is off was added in rsync 2.6.7. Older rsync
versions erroneously preserved the three special permission bits for
newly-created files when bf(--perms) was off, while overriding the
directories when bf(--perms) is off was added in rsync 2.6.7. Older rsync
versions erroneously preserved the three special permission bits for
newly-created files when bf(--perms) was off, while overriding the
@@
-4994,7
+4994,7
@@
ACLs to a non-ACL-supporting disk should complain.
dit(bf(-E, --executability)) This option causes rsync to preserve the
executability (or non-executability) of regular files when bf(--perms) is
dit(bf(-E, --executability)) This option causes rsync to preserve the
executability (or non-executability) of regular files when bf(--perms) is
-@@ -7
56,6 +761
,10 @@ quote(itemize(
+@@ -7
93,6 +798
,10 @@ quote(itemize(
If bf(--perms) is enabled, this option is ignored.
If bf(--perms) is enabled, this option is ignored.
@@
-5318,7
+5318,7
@@
ACLs to a non-ACL-supporting disk should complain.
+ $RSYNC -rvv "$scratchdir/file" "$todir/to/anotherfile"
+ check_perms "$todir/to/anotherfile" $3 "Target $1"
+ # Make sure we obey default ACLs when not transferring a regular file
+ $RSYNC -rvv "$scratchdir/file" "$todir/to/anotherfile"
+ check_perms "$todir/to/anotherfile" $3 "Target $1"
+ # Make sure we obey default ACLs when not transferring a regular file
-+ $RSYNC -rvv "$scratchdir/dir
" "$todir/to/anotherdir
"
++ $RSYNC -rvv "$scratchdir/dir
/" "$todir/to/anotherdir/
"
+ check_perms "$todir/to/anotherdir" $4 "Target $1"
+}
+
+ check_perms "$todir/to/anotherdir" $4 "Target $1"
+}
+