Accepting request 337003 from home:vitezslav_cizek:branches:network
- better disable slp by default, it doesn't seem to be used much and it often caused problems (eg boo#898513, bsc#922710) * set "use slp" in rsyncd.conf to enable * modified rsync-add_back_use_slp_directive.patch OBS-URL: https://build.opensuse.org/request/show/337003 OBS-URL: https://build.opensuse.org/package/show/network/rsync?expand=0&rev=48
This commit is contained in:
parent
e31576eaae
commit
aee63f30ce
@ -1,7 +1,7 @@
|
|||||||
Index: rsync-3.1.1/clientserver.c
|
Index: rsync-3.1.1/clientserver.c
|
||||||
===================================================================
|
===================================================================
|
||||||
--- rsync-3.1.1.orig/clientserver.c 2015-10-05 14:49:04.789801244 +0200
|
--- rsync-3.1.1.orig/clientserver.c 2015-10-07 14:58:43.767379915 +0200
|
||||||
+++ rsync-3.1.1/clientserver.c 2015-10-05 14:49:04.799801378 +0200
|
+++ rsync-3.1.1/clientserver.c 2015-10-07 14:59:24.515920754 +0200
|
||||||
@@ -1200,7 +1200,7 @@ int daemon_main(void)
|
@@ -1200,7 +1200,7 @@ int daemon_main(void)
|
||||||
* local address??? */
|
* local address??? */
|
||||||
|
|
||||||
@ -13,8 +13,8 @@ Index: rsync-3.1.1/clientserver.c
|
|||||||
}
|
}
|
||||||
Index: rsync-3.1.1/loadparm.c
|
Index: rsync-3.1.1/loadparm.c
|
||||||
===================================================================
|
===================================================================
|
||||||
--- rsync-3.1.1.orig/loadparm.c 2015-10-05 14:49:04.790801257 +0200
|
--- rsync-3.1.1.orig/loadparm.c 2015-10-07 14:58:43.767379915 +0200
|
||||||
+++ rsync-3.1.1/loadparm.c 2015-10-05 15:40:06.561346152 +0200
|
+++ rsync-3.1.1/loadparm.c 2015-10-07 14:59:24.515920754 +0200
|
||||||
@@ -101,6 +101,7 @@ typedef struct {
|
@@ -101,6 +101,7 @@ typedef struct {
|
||||||
int rsync_port;
|
int rsync_port;
|
||||||
#ifdef HAVE_LIBSLP
|
#ifdef HAVE_LIBSLP
|
||||||
@ -29,7 +29,7 @@ Index: rsync-3.1.1/loadparm.c
|
|||||||
/* rsync_port; */ 0,
|
/* rsync_port; */ 0,
|
||||||
+#ifdef HAVE_LIBSLP
|
+#ifdef HAVE_LIBSLP
|
||||||
+ /* slp_refresh; */ 0,
|
+ /* slp_refresh; */ 0,
|
||||||
+ /* use_slp; */ True,
|
+ /* use_slp; */ False,
|
||||||
+#endif
|
+#endif
|
||||||
},
|
},
|
||||||
|
|
||||||
@ -52,14 +52,14 @@ Index: rsync-3.1.1/loadparm.c
|
|||||||
FN_LOCAL_STRING(lp_auth_users, auth_users)
|
FN_LOCAL_STRING(lp_auth_users, auth_users)
|
||||||
Index: rsync-3.1.1/rsyncd.conf.yo
|
Index: rsync-3.1.1/rsyncd.conf.yo
|
||||||
===================================================================
|
===================================================================
|
||||||
--- rsync-3.1.1.orig/rsyncd.conf.yo 2015-10-05 14:49:04.791801270 +0200
|
--- rsync-3.1.1.orig/rsyncd.conf.yo 2015-10-07 14:58:43.767379915 +0200
|
||||||
+++ rsync-3.1.1/rsyncd.conf.yo 2015-10-05 14:49:04.799801378 +0200
|
+++ rsync-3.1.1/rsyncd.conf.yo 2015-10-07 14:59:24.516920767 +0200
|
||||||
@@ -124,6 +124,10 @@ via the bf(--sockopts) command-line opti
|
@@ -124,6 +124,10 @@ via the bf(--sockopts) command-line opti
|
||||||
dit(bf(listen backlog)) You can override the default backlog value when the
|
dit(bf(listen backlog)) You can override the default backlog value when the
|
||||||
daemon listens for connections. It defaults to 5.
|
daemon listens for connections. It defaults to 5.
|
||||||
|
|
||||||
+dit(bf(use slp)) This parameter is used to determine if the module names are
|
+dit(bf(use slp)) This parameter is used to determine if the module names are
|
||||||
+advertised via slp. The default is for this to be enabled, which will
|
+advertised via slp. The default is for this to be disabled, which won't
|
||||||
+advertise your public modules.
|
+advertise your public modules.
|
||||||
+
|
+
|
||||||
dit(bf(slp refresh)) This parameter is used to determine how long service
|
dit(bf(slp refresh)) This parameter is used to determine how long service
|
||||||
@ -67,8 +67,8 @@ Index: rsync-3.1.1/rsyncd.conf.yo
|
|||||||
you have Service Location Protocol support compiled in. If this is
|
you have Service Location Protocol support compiled in. If this is
|
||||||
Index: rsync-3.1.1/socket.c
|
Index: rsync-3.1.1/socket.c
|
||||||
===================================================================
|
===================================================================
|
||||||
--- rsync-3.1.1.orig/socket.c 2015-10-05 14:49:04.791801270 +0200
|
--- rsync-3.1.1.orig/socket.c 2015-10-07 14:58:43.767379915 +0200
|
||||||
+++ rsync-3.1.1/socket.c 2015-10-05 14:49:04.799801378 +0200
|
+++ rsync-3.1.1/socket.c 2015-10-07 14:59:24.516920767 +0200
|
||||||
@@ -546,7 +546,7 @@ void start_accept_loop(int port, int (*f
|
@@ -546,7 +546,7 @@ void start_accept_loop(int port, int (*f
|
||||||
int *sp, maxfd, i;
|
int *sp, maxfd, i;
|
||||||
#ifdef HAVE_LIBSLP
|
#ifdef HAVE_LIBSLP
|
||||||
@ -80,21 +80,40 @@ Index: rsync-3.1.1/socket.c
|
|||||||
slp_timeout = SLP_MIN_TIMEOUT;
|
slp_timeout = SLP_MIN_TIMEOUT;
|
||||||
Index: rsync-3.1.1/main.c
|
Index: rsync-3.1.1/main.c
|
||||||
===================================================================
|
===================================================================
|
||||||
--- rsync-3.1.1.orig/main.c 2015-10-05 14:49:04.790801257 +0200
|
--- rsync-3.1.1.orig/main.c 2015-10-07 14:58:43.767379915 +0200
|
||||||
+++ rsync-3.1.1/main.c 2015-10-05 14:49:04.800801392 +0200
|
+++ rsync-3.1.1/main.c 2015-10-07 14:59:24.516920767 +0200
|
||||||
@@ -1250,8 +1250,13 @@ static int start_client(int argc, char *
|
@@ -1250,11 +1250,14 @@ static int start_client(int argc, char *
|
||||||
if (shell_machine && !shell_machine[0]) {
|
if (shell_machine && !shell_machine[0]) {
|
||||||
#ifdef HAVE_LIBSLP
|
#ifdef HAVE_LIBSLP
|
||||||
/* User entered just rsync:// URI */
|
/* User entered just rsync:// URI */
|
||||||
- print_service_list();
|
- print_service_list();
|
||||||
- exit_cleanup(0);
|
- exit_cleanup(0);
|
||||||
|
-#else /* No SLP, die here */
|
||||||
+ if (lp_use_slp()) {
|
+ if (lp_use_slp()) {
|
||||||
+ print_service_list();
|
+ print_service_list();
|
||||||
+ exit_cleanup(0);
|
+ exit_cleanup(0);
|
||||||
+ } else {
|
+ } else {
|
||||||
+ rprintf(FINFO, "SLP is disabled, cannot browse\n");
|
+ rprintf(FINFO, "SLP is disabled, cannot browse\n");
|
||||||
+ exit_cleanup(RERR_SYNTAX);
|
|
||||||
+ }
|
+ }
|
||||||
#else /* No SLP, die here */
|
+#else /* No SLP */
|
||||||
rprintf(FINFO, "No SLP support, cannot browse\n");
|
rprintf(FINFO, "No SLP support, cannot browse\n");
|
||||||
exit_cleanup(RERR_SYNTAX);
|
- exit_cleanup(RERR_SYNTAX);
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
|
Index: rsync-3.1.1/rsyncd.conf.5
|
||||||
|
===================================================================
|
||||||
|
--- rsync-3.1.1.orig/rsyncd.conf.5 2015-10-07 14:36:06.288364061 +0200
|
||||||
|
+++ rsync-3.1.1/rsyncd.conf.5 2015-10-07 15:00:28.309767222 +0200
|
||||||
|
@@ -142,6 +142,11 @@ via the \fB\-\-sockopts\fP command\-line
|
||||||
|
You can override the default backlog value when the
|
||||||
|
daemon listens for connections. It defaults to 5.
|
||||||
|
.IP
|
||||||
|
+.IP "\fBuse slp\fP"
|
||||||
|
+This parameter is used to determine if the module names are
|
||||||
|
+advertised via slp. The default is for this to be disabled, which won't
|
||||||
|
+advertise your public modules.
|
||||||
|
+.IP
|
||||||
|
.IP "\fBslp refresh\fP"
|
||||||
|
This parameter is used to determine how long service
|
||||||
|
advertisements are valid (measured in seconds), and is only applicable if
|
||||||
|
@ -1,3 +1,11 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Wed Oct 7 12:26:26 UTC 2015 - vcizek@suse.com
|
||||||
|
|
||||||
|
- better disable slp by default, it doesn't seem to be used much
|
||||||
|
and it often caused problems (eg boo#898513, bsc#922710)
|
||||||
|
* set "use slp" in rsyncd.conf to enable
|
||||||
|
* modified rsync-add_back_use_slp_directive.patch
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Tue Oct 6 11:16:55 UTC 2015 - vcizek@suse.com
|
Tue Oct 6 11:16:55 UTC 2015 - vcizek@suse.com
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user