The patches for 3.0.9.
[rsync.git/patches.git] / nameconverter.diff
index 1d655497b9c3b56978cbcfc4d4d0d29822c1847c..dc4df7b6a0ce35a89e3e0928f90c68c25f0e3766 100644 (file)
@@ -20,10 +20,11 @@ To use this patch, run these commands for a successful build:
     ./configure                         (optional if already run)
     make
 
+based-on: 40afd365cc8ca968fd16e161d24df5b8a8a520cc
 diff --git a/clientserver.c b/clientserver.c
 --- a/clientserver.c
 +++ b/clientserver.c
-@@ -67,6 +67,7 @@ char *auth_user;
+@@ -65,6 +65,7 @@ char *auth_user;
  int read_only = 0;
  int module_id = -1;
  int munge_symlinks = 0;
@@ -31,7 +32,7 @@ diff --git a/clientserver.c b/clientserver.c
  struct chmod_mode_struct *daemon_chmod_modes;
  
  /* module_dirlen is the length of the module_dir string when in daemon
-@@ -78,6 +79,7 @@ unsigned int module_dirlen = 0;
+@@ -76,6 +77,7 @@ unsigned int module_dirlen = 0;
  char *full_module_path;
  
  static int rl_nulls = 0;
@@ -39,7 +40,7 @@ diff --git a/clientserver.c b/clientserver.c
  
  #ifdef HAVE_SIGACTION
  static struct sigaction sigact;
-@@ -565,7 +567,7 @@ static int rsync_module(int f_in, int f_out, int i, char *addr, char *host)
+@@ -571,7 +573,7 @@ static int rsync_module(int f_in, int f_out, int i, char *addr, char *host)
        log_init(1);
  
  #ifdef HAVE_PUTENV
@@ -48,7 +49,7 @@ diff --git a/clientserver.c b/clientserver.c
                char *modname, *modpath, *hostaddr, *hostname, *username;
                int status;
  
-@@ -654,6 +656,44 @@ static int rsync_module(int f_in, int f_out, int i, char *addr, char *host)
+@@ -660,6 +662,44 @@ static int rsync_module(int f_in, int f_out, int i, char *addr, char *host)
                        set_blocking(fds[1]);
                        pre_exec_fd = fds[1];
                }
@@ -93,7 +94,7 @@ diff --git a/clientserver.c b/clientserver.c
                umask(0);
        }
  #endif
-@@ -877,6 +917,44 @@ static int rsync_module(int f_in, int f_out, int i, char *addr, char *host)
+@@ -887,6 +927,44 @@ static int rsync_module(int f_in, int f_out, int i, char *addr, char *host)
        return 0;
  }
  
@@ -141,7 +142,7 @@ diff --git a/clientserver.c b/clientserver.c
 diff --git a/loadparm.c b/loadparm.c
 --- a/loadparm.c
 +++ b/loadparm.c
-@@ -140,6 +140,7 @@ typedef struct
+@@ -138,6 +138,7 @@ typedef struct
        char *log_file;
        char *log_format;
        char *name;
@@ -149,7 +150,7 @@ diff --git a/loadparm.c b/loadparm.c
        char *outgoing_chmod;
        char *path;
        char *postxfer_exec;
-@@ -191,6 +192,7 @@ static service sDefault =
+@@ -189,6 +190,7 @@ static service sDefault =
   /* log_file; */              NULL,
   /* log_format; */            "%o %h [%a] %m (%u) %f %l",
   /* name; */                  NULL,
@@ -157,7 +158,7 @@ diff --git a/loadparm.c b/loadparm.c
   /* outgoing_chmod; */                NULL,
   /* path; */                  NULL,
   /* postxfer_exec; */         NULL,
-@@ -328,6 +330,7 @@ static struct parm_struct parm_table[] =
+@@ -326,6 +328,7 @@ static struct parm_struct parm_table[] =
   {"max verbosity",     P_INTEGER,P_LOCAL, &sDefault.max_verbosity,     NULL,0},
   {"munge symlinks",    P_BOOL,   P_LOCAL, &sDefault.munge_symlinks,    NULL,0},
   {"name",              P_STRING, P_LOCAL, &sDefault.name,              NULL,0},
@@ -165,7 +166,7 @@ diff --git a/loadparm.c b/loadparm.c
   {"numeric ids",       P_BOOL,   P_LOCAL, &sDefault.numeric_ids,       NULL,0},
   {"outgoing chmod",    P_STRING, P_LOCAL, &sDefault.outgoing_chmod,    NULL,0},
   {"path",              P_PATH,   P_LOCAL, &sDefault.path,              NULL,0},
-@@ -418,6 +421,7 @@ FN_LOCAL_STRING(lp_outgoing_chmod, outgoing_chmod)
+@@ -416,6 +419,7 @@ FN_LOCAL_STRING(lp_outgoing_chmod, outgoing_chmod)
  FN_LOCAL_STRING(lp_path, path)
  FN_LOCAL_STRING(lp_postxfer_exec, postxfer_exec)
  FN_LOCAL_STRING(lp_prexfer_exec, prexfer_exec)
@@ -176,7 +177,7 @@ diff --git a/loadparm.c b/loadparm.c
 diff --git a/rsyncd.conf.yo b/rsyncd.conf.yo
 --- a/rsyncd.conf.yo
 +++ b/rsyncd.conf.yo
-@@ -159,10 +159,11 @@ if the module is not read-only).
+@@ -165,10 +165,11 @@ if the module is not read-only).
  
  When this parameter is enabled, rsync will not attempt to map users and groups
  by name (by default), but instead copy IDs as though bf(--numeric-ids) had
@@ -190,7 +191,7 @@ diff --git a/rsyncd.conf.yo b/rsyncd.conf.yo
  process in the chroot hierarchy will need to have access to the resources
  used by these library functions (traditionally /etc/passwd and
  /etc/group, but perhaps additional dynamic libraries as well).
-@@ -227,6 +228,27 @@ path elements that rsync believes will allow a symlink to escape the module's
+@@ -233,6 +234,27 @@ path elements that rsync believes will allow a symlink to escape the module's
  hierarchy.  There are tricky ways to work around this, though, so you had
  better trust your users if you choose this combination of parameters.
  
@@ -269,7 +270,7 @@ new file mode 100755
 diff --git a/t_stub.c b/t_stub.c
 --- a/t_stub.c
 +++ b/t_stub.c
-@@ -30,6 +30,7 @@ int preserve_xattrs = 0;
+@@ -31,6 +31,7 @@ int preserve_xattrs = 0;
  mode_t orig_umask = 002;
  char *partial_dir;
  char *module_dir;
@@ -277,7 +278,7 @@ diff --git a/t_stub.c b/t_stub.c
  struct filter_list_struct daemon_filter_list;
  
   void rprintf(UNUSED(enum logcode code), const char *format, ...)
-@@ -75,6 +76,11 @@ struct filter_list_struct daemon_filter_list;
+@@ -76,6 +77,11 @@ struct filter_list_struct daemon_filter_list;
        return -1;
  }
  
@@ -300,7 +301,7 @@ diff --git a/uidlist.c b/uidlist.c
  
  #ifdef HAVE_GETGROUPS
  # ifndef GETGROUPS_T
-@@ -69,8 +70,12 @@ static struct idlist *add_to_list(struct idlist **root, id_t id, const char *nam
+@@ -67,8 +68,12 @@ static struct idlist *add_to_list(struct idlist **root, id_t id, const char *nam
  /* turn a uid into a user name */
  static const char *uid_to_name(uid_t uid)
  {
@@ -315,7 +316,7 @@ diff --git a/uidlist.c b/uidlist.c
                return strdup(pass->pw_name);
        return NULL;
  }
-@@ -78,8 +83,12 @@ static const char *uid_to_name(uid_t uid)
+@@ -76,8 +81,12 @@ static const char *uid_to_name(uid_t uid)
  /* turn a gid into a group name */
  static const char *gid_to_name(gid_t gid)
  {
@@ -333,7 +334,7 @@ diff --git a/uidlist.c b/uidlist.c
 diff --git a/util.c b/util.c
 --- a/util.c
 +++ b/util.c
-@@ -31,9 +31,10 @@ extern int relative_paths;
+@@ -31,9 +31,10 @@ extern int preserve_times;
  extern int human_readable;
  extern int preserve_xattrs;
  extern char *module_dir;
@@ -345,7 +346,7 @@ diff --git a/util.c b/util.c
  extern struct filter_list_struct daemon_filter_list;
  
  int sanitize_paths = 0;
-@@ -497,24 +498,44 @@ void kill_all(int sig)
+@@ -507,24 +508,44 @@ void kill_all(int sig)
  /** Turn a user name into a uid */
  int name_to_uid(const char *name, uid_t *uid_p)
  {