---- orig/loadparm.c 2005-02-19 17:38:51
-+++ loadparm.c 2005-03-31 08:28:41
-@@ -144,6 +144,10 @@ typedef struct
+--- orig/loadparm.c 2005-07-28 17:25:13
++++ loadparm.c 2005-07-28 17:27:15
+@@ -145,6 +145,10 @@ typedef struct
int timeout;
int max_connections;
- BOOL ignore_nonreadable;
+ int max_verbosity;
+ int create_mask;
+ int force_create_mode;
+ int directory_mask;
+ int force_directory_mode;
+ BOOL ignore_nonreadable;
} service;
-
-@@ -186,7 +190,11 @@ static service sDefault =
- "*.gz *.tgz *.zip *.z *.rpm *.deb *.iso *.bz2 *.tbz", /* dont compress */
+@@ -182,6 +186,10 @@ static service sDefault =
0, /* timeout */
0, /* max connections */
-- False /* ignore nonreadable */
-+ False, /* ignore nonreadable */
-+ CHMOD_BITS, /* create mask */
+ 1, /* max verbosity */
++ CHMOD_BITS,/* create mask */
+ 0, /* force create mode */
-+ CHMOD_BITS, /* directory mask */
-+ 0 /* force directory mode */
++ CHMOD_BITS,/* directory mask */
++ 0, /* force directory mode */
+ False /* ignore nonreadable */
};
-
-@@ -306,6 +314,10 @@ static struct parm_struct parm_table[] =
- {"log format", P_STRING, P_LOCAL, &sDefault.log_format, NULL, 0},
- {"refuse options", P_STRING, P_LOCAL, &sDefault.refuse_options,NULL, 0},
- {"dont compress", P_STRING, P_LOCAL, &sDefault.dont_compress,NULL, 0},
+@@ -276,6 +284,10 @@ static struct parm_struct parm_table[] =
+ {"timeout", P_INTEGER, P_LOCAL, &sDefault.timeout, NULL, 0},
+ {"max connections", P_INTEGER, P_LOCAL, &sDefault.max_connections,NULL, 0},
+ {"max verbosity", P_INTEGER, P_LOCAL, &sDefault.max_verbosity,NULL, 0},
+ {"create mask", P_OCTAL, P_LOCAL, &sDefault.create_mask, NULL, 0},
+ {"force create mode",P_OCTAL, P_LOCAL, &sDefault.force_create_mode, NULL, 0},
+ {"directory mask", P_OCTAL, P_LOCAL, &sDefault.directory_mask, NULL, 0},
+ {"force directory mode",P_OCTAL,P_LOCAL, &sDefault.force_directory_mode, NULL, 0},
- {NULL, P_BOOL, P_NONE, NULL, NULL, 0}
- };
-
-@@ -391,6 +403,10 @@ FN_LOCAL_STRING(lp_refuse_options, refus
- FN_LOCAL_STRING(lp_dont_compress, dont_compress)
+ {"name", P_STRING, P_LOCAL, &sDefault.name, NULL, 0},
+ {"comment", P_STRING, P_LOCAL, &sDefault.comment, NULL, 0},
+ {"lock file", P_STRING, P_LOCAL, &sDefault.lock_file, NULL, 0},
+@@ -392,6 +404,10 @@ FN_LOCAL_STRING(lp_postxfer_exec, postxf
FN_LOCAL_INTEGER(lp_timeout, timeout)
FN_LOCAL_INTEGER(lp_max_connections, max_connections)
+ FN_LOCAL_INTEGER(lp_max_verbosity, max_verbosity)
+FN_LOCAL_INTEGER(lp_create_mask, create_mask)
+FN_LOCAL_INTEGER(lp_force_create_mode, force_create_mode)
+FN_LOCAL_INTEGER(lp_directory_mask, directory_mask)
/* local prototypes */
static int strwicmp(char *psz1, char *psz2);
---- orig/rsync.c 2005-03-16 02:19:30
-+++ rsync.c 2005-03-31 08:28:41
-@@ -56,6 +56,8 @@ int set_perms(char *fname,struct file_st
+--- orig/rsync.c 2005-07-27 23:31:12
++++ rsync.c 2005-07-28 00:54:53
+@@ -32,6 +32,8 @@ extern int am_server;
+ extern int am_sender;
+ extern int am_generator;
+ extern int am_starting_up;
++extern int am_daemon;
++extern int module_id;
+ extern int preserve_uid;
+ extern int preserve_gid;
+ extern int inplace;
+@@ -56,6 +58,7 @@ int set_perms(char *fname,struct file_st
int updated = 0;
STRUCT_STAT st2;
int change_uid, change_gid;
-+ extern int am_daemon;
-+ extern int module_id;
++ mode_t mode = file->mode; /* file->mode shouldn't be modified */
if (!st) {
if (dry_run)
-@@ -126,9 +128,19 @@ int set_perms(char *fname,struct file_st
+@@ -125,9 +128,19 @@ int set_perms(char *fname,struct file_st
+ updated = 1;
+ }
- #ifdef HAVE_CHMOD
- if (!S_ISLNK(st->st_mode)) {
-- if ((st->st_mode & CHMOD_BITS) != (file->mode & CHMOD_BITS)) {
-+ mode_t mode = file->mode; /* file->mode shouldn't be modified */
-+ if (am_daemon) {
-+ if (S_ISDIR(st->st_mode)) {
-+ mode = (mode & lp_directory_mask(module_id))
-+ | lp_force_directory_mode(module_id);
-+ } else {
-+ mode = (mode & lp_create_mask(module_id))
-+ | lp_force_create_mode(module_id);
-+ }
++ if (am_daemon) {
++ if (S_ISDIR(st->st_mode)) {
++ mode = (mode & lp_directory_mask(module_id))
++ | lp_force_directory_mode(module_id);
++ } else {
++ mode = (mode & lp_create_mask(module_id))
++ | lp_force_create_mode(module_id);
+ }
-+ if ((st->st_mode & CHMOD_BITS) != (mode & CHMOD_BITS)) {
- updated = 1;
-- if (do_chmod(fname,(file->mode & CHMOD_BITS)) != 0) {
-+ if (do_chmod(fname, (mode & CHMOD_BITS)) != 0) {
- rsyserr(FERROR, errno, "failed to set permissions on %s",
- full_fname(fname));
- return 0;
---- orig/rsyncd.conf.yo 2005-04-23 17:50:12
++ }
++
+ #ifdef HAVE_CHMOD
+- if ((st->st_mode & CHMOD_BITS) != (file->mode & CHMOD_BITS)) {
+- int ret = do_chmod(fname, file->mode);
++ if ((st->st_mode & CHMOD_BITS) != (mode & CHMOD_BITS)) {
++ int ret = do_chmod(fname, mode);
+ if (ret < 0) {
+ rsyserr(FERROR, errno,
+ "failed to set permissions on %s",
+--- orig/rsyncd.conf.yo 2005-07-28 17:25:13
+++ rsyncd.conf.yo 2005-03-31 08:28:41
-@@ -221,6 +221,70 @@ file transfers to and from that module s
+@@ -218,6 +218,70 @@ file transfers to and from that module s
was run as root. This complements the "uid" option. The default is gid -2,
which is normally the group "nobody".
+created directories.
+
dit(bf(filter)) The "filter" option allows you to specify a space-separated
- list of filter rules that the server will not allow to be read or written.
+ list of filter rules that the daemon will not allow to be read or written.
This is only superficially equivalent to the client specifying these