Use "use warnings" rather than -w on the #! line.
[rsync/rsync-patches.git] / nameconverter.diff
index 56776c1..1d65549 100644 (file)
@@ -31,15 +31,15 @@ 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
-@@ -76,6 +77,7 @@ char *module_dir = NULL;
unsigned int module_dirlen = 0;
+@@ -78,6 +79,7 @@ unsigned int module_dirlen = 0;
char *full_module_path;
  
  static int rl_nulls = 0;
 +static int namecvt_fd_req = -1, namecvt_fd_ans = -1;
  
  #ifdef HAVE_SIGACTION
  static struct sigaction sigact;
-@@ -553,7 +555,7 @@ static int rsync_module(int f_in, int f_out, int i, char *addr, char *host)
+@@ -565,7 +567,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 +48,7 @@ diff --git a/clientserver.c b/clientserver.c
                char *modname, *modpath, *hostaddr, *hostname, *username;
                int status;
  
-@@ -649,6 +651,44 @@ static int rsync_module(int f_in, int f_out, int i, char *addr, char *host)
+@@ -654,6 +656,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 +93,7 @@ diff --git a/clientserver.c b/clientserver.c
                umask(0);
        }
  #endif
-@@ -878,6 +918,44 @@ static int rsync_module(int f_in, int f_out, int i, char *addr, char *host)
+@@ -877,6 +917,44 @@ static int rsync_module(int f_in, int f_out, int i, char *addr, char *host)
        return 0;
  }
  
@@ -176,7 +176,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
-@@ -160,10 +160,11 @@ if the module is not read-only).
+@@ -159,10 +159,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
@@ -222,8 +222,8 @@ diff --git a/support/nameconvert b/support/nameconvert
 new file mode 100755
 --- /dev/null
 +++ b/support/nameconvert
-@@ -0,0 +1,42 @@
-+#!/usr/bin/perl -w
+@@ -0,0 +1,43 @@
++#!/usr/bin/perl
 +# This implements a simple protocol to do {user,group}-{name,id}
 +# conversions.  All input and output consists of simple strings
 +# with a terminating null char (or newline for debugging).  If
@@ -242,6 +242,7 @@ new file mode 100755
 +# "name converter" setting.
 +
 +use strict;
++use warnings;
 +
 +my $eol = grep(/^--debug$/, @ARGV) ? "\n" : "\0";
 +$/ = $eol;