notice that no ACLs are available to copy. Of course, trying to write out
ACLs to a non-ACL-supporting disk should complain.
---- orig/Makefile.in 2004-10-14 17:11:40
+--- orig/Makefile.in 2004-11-03 11:56:03
+++ Makefile.in 2004-10-20 06:32:26
@@ -25,16 +25,16 @@ VERSION=@VERSION@
.SUFFIXES:
if (f != -1) {
/* Now send the uid/gid list. This was introduced in
* protocol version 15 */
---- orig/generator.c 2004-10-06 00:12:16
+--- orig/generator.c 2004-11-27 17:53:24
+++ generator.c 2004-07-03 20:11:58
-@@ -338,6 +338,10 @@ static void recv_generator(char *fname,
+@@ -342,6 +342,10 @@ static void recv_generator(char *fname,
if (set_perms(fname, file, statret ? NULL : &st, 0)
&& verbose && f_out != -1)
rprintf(FINFO, "%s/\n", safe_fname(fname));
+ SET_ACL(fname, file);
+#endif
return;
- }
-
---- orig/lib/sysacls.c 2004-10-20 08:06:39
-+++ lib/sysacls.c 2004-10-20 08:06:39
-@@ -0,0 +1,3218 @@
+ } else if (max_size && file->length > max_size) {
+ if (verbose > 1)
+--- orig/lib/sysacls.c 2004-10-20 15:35:58
++++ lib/sysacls.c 2004-10-20 15:35:58
+@@ -0,0 +1,3217 @@
+/*
-+ Unix SMB/Netbios implementation.
-+ Version 2.2.
++ Unix SMB/CIFS implementation.
+ Samba system utilities for ACL support.
+ Copyright (C) Jeremy Allison 2000.
+
+ free(mem);
+}
+
++char *uidtoname(uid_t uid)
++{
++ static char idbuf[12];
++ struct passwd *pw;
++
++ if ((pw = getpwuid(uid)) == NULL) {
++ slprintf(idbuf, sizeof(idbuf)-1, "%ld", (long)uid);
++ return idbuf;
++ }
++ return pw->pw_name;
++}
++
+/*
+ This file wraps all differing system ACL interfaces into a consistent
+ one based on the POSIX interface. It also returns the correct errors
+ break;
+
+ case SMB_ACL_USER:
-+ if ((pw = getpwuid(ap->a_id)) == NULL) {
-+ snprintf(idbuf, sizeof(idbuf)-1, "%ld",
-+ (long)ap->a_id);
-+ id = idbuf;
-+ } else {
-+ id = pw->pw_name;
-+ }
++ id = uidtoname(ap->a_id);
+ case SMB_ACL_USER_OBJ:
+ tag = "user";
+ break;
+ * can use the relative path.
+ */
+
-+ return sys_acl_get_file(dos_to_unix_static(fsp->fsp_name), SMB_ACL_TYPE_ACCESS);
++ return sys_acl_get_file(fsp->fsp_name, SMB_ACL_TYPE_ACCESS);
+}
+
+int sys_acl_clear_perms(SMB_ACL_PERMSET_T permset_d)
+ break;
+
+ case SMB_ACL_USER:
-+ if ((pw = getpwuid(ap->a_id)) == NULL) {
-+ snprintf(idbuf, sizeof(idbuf)-1, "%ld",
-+ (long)ap->a_id);
-+ id = idbuf;
-+ } else {
-+ id = pw->pw_name;
-+ }
++ id = uidtoname(ap->a_id);
+ case SMB_ACL_USER_OBJ:
+ tag = "user";
+ break;
+ * can use the relative path.
+ */
+
-+ return sys_acl_set_file(dos_to_unix_static(fsp->fsp_name), SMB_ACL_TYPE_ACCESS, acl_d);
++ return sys_acl_set_file(fsp->fsp_name, SMB_ACL_TYPE_ACCESS, acl_d);
+}
+
+int sys_acl_delete_def_file(const char *path)
+SMB_ACL_T sys_acl_get_file( const char *path_p, SMB_ACL_TYPE_T type)
+{
+ errno = ENOSYS;
-+ return 0;
++ return (SMB_ACL_T)NULL;
+}
+
+SMB_ACL_T sys_acl_get_fd(int fd)
+{
+ errno = ENOSYS;
-+ return 0;
++ return (SMB_ACL_T)NULL;
+}
+
+int sys_acl_clear_perms(SMB_ACL_PERMSET_T permset)
+}
+
+#endif /* No ACLs. */
---- orig/lib/sysacls.h 2004-10-20 08:06:45
-+++ lib/sysacls.h 2004-10-20 08:06:45
-@@ -0,0 +1,24 @@
+--- orig/lib/sysacls.h 2004-10-20 15:31:22
++++ lib/sysacls.h 2004-10-20 15:31:22
+@@ -0,0 +1,25 @@
+#define Realloc(mem, cnt) realloc_array((mem), char, (cnt))
++#define slprintf snprintf
+
+int sys_acl_get_entry(SMB_ACL_T the_acl, int entry_id, SMB_ACL_ENTRY_T *entry_p);
+int sys_acl_get_tag_type(SMB_ACL_ENTRY_T entry_d, SMB_ACL_TAG_T *tag_type_p);
next;
}
---- orig/options.c 2004-10-14 17:11:40
+--- orig/options.c 2004-11-27 18:27:35
+++ options.c 2004-08-19 17:38:57
@@ -43,6 +43,7 @@ int keep_dirlinks = 0;
int copy_links = 0;
int preserve_perms = 0;
int preserve_devices = 0;
int preserve_uid = 0;
-@@ -152,6 +153,7 @@ static void print_rsync_version(enum log
+@@ -159,6 +160,7 @@ static void print_rsync_version(enum log
char const *got_socketpair = "no ";
char const *have_inplace = "no ";
char const *hardlinks = "no ";
char const *links = "no ";
char const *ipv6 = "no ";
STRUCT_STAT *dumstat;
-@@ -168,6 +170,10 @@ static void print_rsync_version(enum log
+@@ -175,6 +177,10 @@ static void print_rsync_version(enum log
hardlinks = "";
#endif
#if SUPPORT_LINKS
links = "";
#endif
-@@ -182,9 +188,9 @@ static void print_rsync_version(enum log
+@@ -189,9 +195,9 @@ static void print_rsync_version(enum log
"Copyright (C) 1996-2004 by Andrew Tridgell and others\n");
rprintf(f, "<http://rsync.samba.org/>\n");
rprintf(f, "Capabilities: %d-bit files, %ssocketpairs, "
/* Note that this field may not have type ino_t. It depends
* on the complicated interaction between largefile feature
-@@ -249,6 +255,7 @@ void usage(enum logcode F)
+@@ -256,6 +262,7 @@ void usage(enum logcode F)
rprintf(F," --safe-links ignore \"unsafe\" symlinks\n");
rprintf(F," -H, --hard-links preserve hard links\n");
rprintf(F," -p, --perms preserve permissions\n");
rprintf(F," -o, --owner preserve owner (root only)\n");
rprintf(F," -g, --group preserve group\n");
rprintf(F," -D, --devices preserve devices (root only)\n");
-@@ -351,6 +358,7 @@ static struct poptOption long_options[]
+@@ -361,6 +368,7 @@ static struct poptOption long_options[]
{"no-whole-file", 0, POPT_ARG_VAL, &whole_file, 0, 0, 0 },
{"copy-unsafe-links", 0, POPT_ARG_NONE, ©_unsafe_links, 0, 0, 0 },
{"perms", 'p', POPT_ARG_NONE, &preserve_perms, 0, 0, 0 },
{"owner", 'o', POPT_ARG_NONE, &preserve_uid, 0, 0, 0 },
{"group", 'g', POPT_ARG_NONE, &preserve_gid, 0, 0, 0 },
{"devices", 'D', POPT_ARG_NONE, &preserve_devices, 0, 0, 0 },
-@@ -683,6 +691,24 @@ int parse_arguments(int *argc, const cha
- return 0;
- #endif
+@@ -749,6 +757,24 @@ int parse_arguments(int *argc, const cha
+ basis_dir[basis_dir_cnt++] = (char *)arg;
+ break;
+ case 'A':
+#if SUPPORT_ACLS
default:
/* A large opt value means that set_refuse_options()
* turned this option off (opt-BASE is its index). */
-@@ -999,6 +1025,8 @@ void server_options(char **args,int *arg
+@@ -1072,6 +1098,8 @@ void server_options(char **args,int *arg
if (preserve_hard_links)
argstr[x++] = 'H';
if (verbose > 1 && flags & PERMS_REPORT) {
if (updated)
rprintf(FINFO,"%s\n",fname);
---- orig/rsync.h 2004-10-09 03:21:56
+--- orig/rsync.h 2004-11-27 17:53:24
+++ rsync.h 2004-07-03 20:11:58
-@@ -545,6 +545,40 @@ static inline int flist_up(struct file_l
+@@ -552,6 +552,40 @@ static inline int flist_up(struct file_l
#include "lib/permstring.h"
#include "lib/addrinfo.h"
#include "proto.h"
/* We have replacement versions of these if they're missing. */
---- orig/rsync.yo 2004-10-06 00:12:16
+--- orig/rsync.yo 2004-11-27 17:53:24
+++ rsync.yo 2004-07-03 20:11:58
@@ -326,6 +326,7 @@ verb(
--safe-links ignore "unsafe" symlinks
-o, --owner preserve owner (root only)
-g, --group preserve group
-D, --devices preserve devices (root only)
-@@ -585,6 +586,11 @@ source file's permissions and the umask
+@@ -594,6 +595,11 @@ source file's permissions and the umask
other files (including updated files) retain their existing permissions
(which is the same behavior as other file-copy utilities, such as cp).