TODO: the configure changes should abort if the user requests --enable-slp
and we can't honor that request.
-based-on: 7c8f180900432e646c0a4bd02e2c4033068dbb7c
+based-on: 63f91976112b8b2118cc17eb5fc8142175566f4f
diff --git a/Makefile.in b/Makefile.in
--- a/Makefile.in
+++ b/Makefile.in
-@@ -13,6 +13,8 @@ CFLAGS=@CFLAGS@
+@@ -14,6 +14,8 @@ CFLAGS=@CFLAGS@
CPPFLAGS=@CPPFLAGS@
EXEEXT=@EXEEXT@
LDFLAGS=@LDFLAGS@
INSTALLCMD=@INSTALL@
INSTALLMAN=@INSTALL@
-@@ -38,7 +40,7 @@ OBJS1=flist.o rsync.o generator.o receiver.o cleanup.o sender.o exclude.o \
+@@ -40,7 +42,7 @@ OBJS1=flist.o rsync.o generator.o receiver.o cleanup.o sender.o exclude.o \
OBJS2=options.o io.o compat.o hlink.o token.o uidlist.o socket.o hashtable.o \
fileio.o batch.o clientname.o chmod.o acls.o xattrs.o
OBJS3=progress.o pipe.o
+DAEMON_OBJ = params.o loadparm.o clientserver.o access.o connection.o authenticate.o $(SLPOBJ)
popt_OBJS=popt/findme.o popt/popt.o popt/poptconfig.o \
popt/popthelp.o popt/poptparse.o
- OBJS=$(OBJS1) $(OBJS2) $(OBJS3) $(DAEMON_OBJ) $(LIBOBJ) $(ZLIBOBJ) @BUILD_POPT@
-@@ -74,7 +76,7 @@ install-strip:
+ OBJS=$(OBJS1) $(OBJS2) $(OBJS3) $(DAEMON_OBJ) $(LIBOBJ) @BUILD_ZLIB@ @BUILD_POPT@
+@@ -90,7 +92,7 @@ install-strip:
$(MAKE) INSTALL_STRIP='-s' install
rsync$(EXEEXT): $(OBJS)
diff --git a/clientserver.c b/clientserver.c
--- a/clientserver.c
+++ b/clientserver.c
-@@ -1202,6 +1202,13 @@ int daemon_main(void)
+@@ -1199,6 +1199,13 @@ int daemon_main(void)
* address too. In fact, why not just do getnameinfo on the
* local address??? */
diff --git a/configure.ac b/configure.ac
--- a/configure.ac
+++ b/configure.ac
-@@ -727,6 +727,29 @@ if test $rsync_cv_can_hardlink_special = yes; then
+@@ -732,6 +732,29 @@ if test $rsync_cv_can_hardlink_special = yes; then
AC_DEFINE(CAN_HARDLINK_SPECIAL, 1, [Define to 1 if link() can hard-link special files.])
fi
diff --git a/main.c b/main.c
--- a/main.c
+++ b/main.c
-@@ -1243,6 +1243,18 @@ static int start_client(int argc, char *argv[])
+@@ -1246,6 +1246,18 @@ static int start_client(int argc, char *argv[])
if (!read_batch) { /* for read_batch, NO source is specified */
char *path = check_for_hostspec(argv[0], &shell_machine, &rsync_port);
diff --git a/options.c b/options.c
--- a/options.c
+++ b/options.c
-@@ -570,6 +570,7 @@ static void print_rsync_version(enum logcode f)
+@@ -572,6 +572,7 @@ static void print_rsync_version(enum logcode f)
char const *links = "no ";
char const *iconv = "no ";
char const *ipv6 = "no ";
STRUCT_STAT *dumstat;
#if SUBPROTOCOL_VERSION != 0
-@@ -606,6 +607,9 @@ static void print_rsync_version(enum logcode f)
+@@ -608,6 +609,9 @@ static void print_rsync_version(enum logcode f)
#ifdef CAN_SET_SYMLINK_TIMES
symtimes = "";
#endif
rprintf(f, "%s version %s protocol version %d%s\n",
RSYNC_NAME, RSYNC_VERSION, PROTOCOL_VERSION, subprotocol);
-@@ -619,8 +623,8 @@ static void print_rsync_version(enum logcode f)
+@@ -621,8 +625,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);
new file mode 100644
--- /dev/null
+++ b/rsyncd.conf
-@@ -0,0 +1,3 @@
-+
+@@ -0,0 +1 @@
+slp refresh = 300
-+
diff --git a/rsyncd.conf.yo b/rsyncd.conf.yo
--- a/rsyncd.conf.yo
+++ b/rsyncd.conf.yo
-@@ -123,6 +123,15 @@ via the bf(--sockopts) command-line option.
+@@ -124,6 +124,15 @@ via the bf(--sockopts) command-line option.
dit(bf(listen backlog)) You can override the default backlog value when the
daemon listens for connections. It defaults to 5.
enddit()
manpagesection(MODULE PARAMETERS)
-@@ -842,6 +851,7 @@ use chroot = yes
+@@ -846,6 +855,7 @@ use chroot = yes
max connections = 4
syslog facility = local5
pid file = /var/run/rsyncd.pid
+ exit_cleanup(RERR_SYNTAX);
+ }
+
-+ n = lp_numservices();
++ n = lp_num_modules();
+
+ if (0 == lp_slp_refresh())
+ timeout = SLP_LIFETIME_MAXIMUM; /* don't expire, ever */