Adding group-auth patch; updating patches.
[rsync/rsync-patches.git] / db.diff
diff --git a/db.diff b/db.diff
index 4cf967e..7b5b19b 100644 (file)
--- a/db.diff
+++ b/db.diff
@@ -23,7 +23,7 @@ To use this patch, run these commands for a successful build:
     ./configure                               (optional if already run)
     make
 
-based-on: 181c9faf928faad08ef095f4667afe460ec3bef6
+based-on: 3b8f8192227b14e708bf535072485e50f4362270
 diff --git a/Makefile.in b/Makefile.in
 --- a/Makefile.in
 +++ b/Makefile.in
@@ -123,7 +123,7 @@ diff --git a/clientserver.c b/clientserver.c
  extern char *bind_address;
  extern char *config_file;
  extern char *logfile_format;
-@@ -642,6 +645,9 @@ static int rsync_module(int f_in, int f_out, int i, const char *addr, const char
+@@ -668,6 +671,9 @@ static int rsync_module(int f_in, int f_out, int i, const char *addr, const char
  
        log_init(1);
  
@@ -132,8 +132,8 @@ diff --git a/clientserver.c b/clientserver.c
 +
  #ifdef HAVE_PUTENV
        if (*lp_prexfer_exec(i) || *lp_postxfer_exec(i)) {
-               char *modname, *modpath, *hostaddr, *hostname, *username;
-@@ -850,6 +856,10 @@ static int rsync_module(int f_in, int f_out, int i, const char *addr, const char
+               int status;
+@@ -859,6 +865,10 @@ static int rsync_module(int f_in, int f_out, int i, const char *addr, const char
  
        am_server = 1; /* Don't let someone try to be tricky. */
        quiet = 0;
@@ -147,7 +147,7 @@ diff --git a/clientserver.c b/clientserver.c
 diff --git a/configure.in b/configure.in
 --- a/configure.in
 +++ b/configure.in
-@@ -312,7 +312,7 @@ AC_CHECK_HEADERS(sys/fcntl.h sys/select.h fcntl.h sys/time.h sys/unistd.h \
+@@ -322,7 +322,7 @@ AC_CHECK_HEADERS(sys/fcntl.h sys/select.h fcntl.h sys/time.h sys/unistd.h \
      sys/un.h sys/attr.h mcheck.h arpa/inet.h arpa/nameser.h locale.h \
      netdb.h malloc.h float.h limits.h iconv.h libcharset.h langinfo.h \
      sys/acl.h acl/libacl.h attr/xattr.h sys/xattr.h sys/extattr.h \
@@ -156,7 +156,7 @@ diff --git a/configure.in b/configure.in
  AC_HEADER_MAJOR
  
  AC_CACHE_CHECK([if makedev takes 3 args],rsync_cv_MAKEDEV_TAKES_3_ARGS,[
-@@ -977,6 +977,29 @@ if test x"$enable_acl_support" = x"no" -o x"$enable_xattr_support" = x"no" -o x"
+@@ -1004,6 +1004,29 @@ if test x"$enable_acl_support" = x"no" -o x"$enable_xattr_support" = x"no" -o x"
      fi
  fi
  
@@ -190,7 +190,7 @@ diff --git a/db.c b/db.c
 new file mode 100644
 --- /dev/null
 +++ b/db.c
-@@ -0,0 +1,566 @@
+@@ -0,0 +1,567 @@
 +/*
 + * Routines to access extended file info via DB.
 + *
@@ -212,6 +212,7 @@ new file mode 100644
 +
 +#include "rsync.h"
 +#include "ifuncs.h"
++#include "itypes.h"
 +
 +#if defined HAVE_MYSQL_MYSQL_H && defined HAVE_LIBMYSQLCLIENT
 +#define USE_MYSQL
@@ -768,7 +769,7 @@ diff --git a/flist.c b/flist.c
  extern int eol_nulls;
  extern int relative_paths;
  extern int implied_dirs;
-@@ -1276,11 +1277,8 @@ struct file_struct *make_file(const char *fname, struct file_list *flist,
+@@ -1308,11 +1309,8 @@ struct file_struct *make_file(const char *fname, struct file_list *flist,
                extra_len += EXTRA_LEN;
  #endif
  
@@ -782,7 +783,7 @@ diff --git a/flist.c b/flist.c
  
  #if EXTRA_ROUNDING > 0
        if (extra_len & (EXTRA_ROUNDING * EXTRA_LEN))
-@@ -1357,8 +1355,12 @@ struct file_struct *make_file(const char *fname, struct file_list *flist,
+@@ -1395,8 +1393,12 @@ struct file_struct *make_file(const char *fname, struct file_list *flist,
                return NULL;
        }
  
@@ -797,7 +798,7 @@ diff --git a/flist.c b/flist.c
  
        if (unsort_ndx)
                F_NDX(file) = stats.num_dirs;
-@@ -2020,6 +2022,9 @@ struct file_list *send_file_list(int f, int argc, char *argv[])
+@@ -2061,6 +2063,9 @@ struct file_list *send_file_list(int f, int argc, char *argv[])
                     | (eol_nulls || reading_remotely ? RL_EOL_NULLS : 0);
        int implied_dot_dir = 0;
  
@@ -818,7 +819,7 @@ diff --git a/generator.c b/generator.c
  extern int append_mode;
  extern int make_backups;
  extern int csum_length;
-@@ -531,7 +532,8 @@ int unchanged_file(char *fn, struct file_struct *file, STRUCT_STAT *st)
+@@ -532,7 +533,8 @@ int unchanged_file(char *fn, struct file_struct *file, STRUCT_STAT *st)
           of the file time to determine whether to sync */
        if (always_checksum > 0 && S_ISREG(st->st_mode)) {
                char sum[MAX_DIGEST_LEN];
@@ -828,7 +829,7 @@ diff --git a/generator.c b/generator.c
                return memcmp(sum, F_SUM(file), checksum_len) == 0;
        }
  
-@@ -2017,6 +2019,9 @@ void generate_files(int f_out, const char *local_name)
+@@ -2074,6 +2076,9 @@ void generate_files(int f_out, const char *local_name)
                        : "enabled");
        }
  
@@ -841,7 +842,7 @@ diff --git a/generator.c b/generator.c
 diff --git a/loadparm.c b/loadparm.c
 --- a/loadparm.c
 +++ b/loadparm.c
-@@ -107,6 +107,7 @@ typedef struct {
+@@ -108,6 +108,7 @@ typedef struct {
        char *auth_users;
        char *charset;
        char *comment;
@@ -849,7 +850,7 @@ diff --git a/loadparm.c b/loadparm.c
        char *dont_compress;
        char *exclude;
        char *exclude_from;
-@@ -181,6 +182,7 @@ static const all_vars Defaults = {
+@@ -182,6 +183,7 @@ static const all_vars Defaults = {
   /* auth_users; */            NULL,
   /* charset; */               NULL,
   /* comment; */               NULL,
@@ -857,7 +858,7 @@ diff --git a/loadparm.c b/loadparm.c
   /* dont_compress; */         DEFAULT_DONT_COMPRESS,
   /* exclude; */                       NULL,
   /* exclude_from; */          NULL,
-@@ -316,6 +318,7 @@ static struct parm_struct parm_table[] =
+@@ -317,6 +319,7 @@ static struct parm_struct parm_table[] =
   {"auth users",        P_STRING, P_LOCAL, &Vars.l.auth_users,          NULL,0},
   {"charset",           P_STRING, P_LOCAL, &Vars.l.charset,             NULL,0},
   {"comment",           P_STRING, P_LOCAL, &Vars.l.comment,             NULL,0},
@@ -865,7 +866,7 @@ diff --git a/loadparm.c b/loadparm.c
   {"dont compress",     P_STRING, P_LOCAL, &Vars.l.dont_compress,       NULL,0},
   {"exclude from",      P_STRING, P_LOCAL, &Vars.l.exclude_from,        NULL,0},
   {"exclude",           P_STRING, P_LOCAL, &Vars.l.exclude,             NULL,0},
-@@ -396,6 +399,7 @@ FN_GLOBAL_INTEGER(lp_rsync_port, &Vars.g.rsync_port)
+@@ -447,6 +450,7 @@ FN_GLOBAL_INTEGER(lp_rsync_port, &Vars.g.rsync_port)
  FN_LOCAL_STRING(lp_auth_users, auth_users)
  FN_LOCAL_STRING(lp_charset, charset)
  FN_LOCAL_STRING(lp_comment, comment)
@@ -876,7 +877,7 @@ diff --git a/loadparm.c b/loadparm.c
 diff --git a/main.c b/main.c
 --- a/main.c
 +++ b/main.c
-@@ -49,6 +49,7 @@ extern int copy_unsafe_links;
+@@ -50,6 +50,7 @@ extern int copy_unsafe_links;
  extern int keep_dirlinks;
  extern int preserve_hard_links;
  extern int protocol_version;
@@ -884,7 +885,7 @@ diff --git a/main.c b/main.c
  extern int file_total;
  extern int recurse;
  extern int xfer_dirs;
-@@ -74,6 +75,7 @@ extern char *filesfrom_host;
+@@ -79,6 +80,7 @@ extern char *filesfrom_host;
  extern char *partial_dir;
  extern char *dest_option;
  extern char *rsync_path;
@@ -892,7 +893,7 @@ diff --git a/main.c b/main.c
  extern char *shell_cmd;
  extern char *batch_name;
  extern char *password_file;
-@@ -1577,6 +1579,9 @@ int main(int argc,char *argv[])
+@@ -1584,6 +1586,9 @@ int main(int argc,char *argv[])
                exit_cleanup(RERR_SYNTAX);
        }
  
@@ -913,7 +914,7 @@ diff --git a/options.c b/options.c
  int eol_nulls = 0;
  int protect_args = 0;
  int human_readable = 1;
-@@ -566,6 +567,7 @@ static void print_rsync_version(enum logcode f)
+@@ -567,6 +568,7 @@ static void print_rsync_version(enum logcode f)
        char const *links = "no ";
        char const *iconv = "no ";
        char const *ipv6 = "no ";
@@ -921,8 +922,8 @@ diff --git a/options.c b/options.c
        STRUCT_STAT *dumstat;
  
  #if SUBPROTOCOL_VERSION != 0
-@@ -599,6 +601,11 @@ static void print_rsync_version(enum logcode f)
- #if defined HAVE_LUTIMES && defined HAVE_UTIMES
+@@ -600,6 +602,11 @@ static void print_rsync_version(enum logcode f)
+ #ifdef CAN_SET_SYMLINK_TIMES
        symtimes = "";
  #endif
 +#if defined HAVE_MYSQL_MYSQL_H && defined HAVE_LIBMYSQLCLIENT
@@ -933,7 +934,7 @@ diff --git a/options.c b/options.c
  
        rprintf(f, "%s  version %s  protocol version %d%s\n",
                RSYNC_NAME, RSYNC_VERSION, PROTOCOL_VERSION, subprotocol);
-@@ -612,8 +619,8 @@ static void print_rsync_version(enum logcode f)
+@@ -613,8 +620,8 @@ static void print_rsync_version(enum logcode f)
                (int)(sizeof (int64) * 8));
        rprintf(f, "    %ssocketpairs, %shardlinks, %ssymlinks, %sIPv6, batchfiles, %sinplace,\n",
                got_socketpair, hardlinks, links, ipv6, have_inplace);
@@ -944,7 +945,7 @@ diff --git a/options.c b/options.c
  
  #ifdef MAINTAINER_MODE
        rprintf(f, "Panic Action: \"%s\"\n", get_panic_action());
-@@ -661,6 +668,7 @@ void usage(enum logcode F)
+@@ -662,6 +669,7 @@ void usage(enum logcode F)
    rprintf(F," -q, --quiet                 suppress non-error messages\n");
    rprintf(F,"     --no-motd               suppress daemon-mode MOTD (see manpage caveat)\n");
    rprintf(F," -c, --checksum              skip based on checksum, not mod-time & size\n");
@@ -952,7 +953,7 @@ diff --git a/options.c b/options.c
    rprintf(F," -a, --archive               archive mode; equals -rlptgoD (no -H,-A,-X)\n");
    rprintf(F,"     --no-OPTION             turn off an implied OPTION (e.g. --no-D)\n");
    rprintf(F," -r, --recursive             recurse into directories\n");
-@@ -933,6 +941,7 @@ static struct poptOption long_options[] = {
+@@ -934,6 +942,7 @@ static struct poptOption long_options[] = {
    {"checksum",        'c', POPT_ARG_VAL,    &always_checksum, 1, 0, 0 },
    {"no-checksum",      0,  POPT_ARG_VAL,    &always_checksum, 0, 0, 0 },
    {"no-c",             0,  POPT_ARG_VAL,    &always_checksum, 0, 0, 0 },
@@ -1054,7 +1055,7 @@ diff --git a/rsync.yo b/rsync.yo
 diff --git a/rsyncd.conf.yo b/rsyncd.conf.yo
 --- a/rsyncd.conf.yo
 +++ b/rsyncd.conf.yo
-@@ -281,6 +281,18 @@ is daemon.  This setting has no effect if the "log file" setting is a
+@@ -301,6 +301,18 @@ is daemon.  This setting has no effect if the "log file" setting is a
  non-empty string (either set in the per-modules settings, or inherited
  from the global settings).