summaryrefslogtreecommitdiff
path: root/net-misc/rsync/files
diff options
context:
space:
mode:
authorRobin H. Johnson <robbat2@gentoo.org>2015-08-08 13:49:04 -0700
committerRobin H. Johnson <robbat2@gentoo.org>2015-08-08 17:38:18 -0700
commit56bd759df1d0c750a065b8c845e93d5dfa6b549d (patch)
tree3f91093cdb475e565ae857f1c5a7fd339e2d781e /net-misc/rsync/files
downloadgentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.gz
gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.xz
proj/gentoo: Initial commit
This commit represents a new era for Gentoo: Storing the gentoo-x86 tree in Git, as converted from CVS. This commit is the start of the NEW history. Any historical data is intended to be grafted onto this point. Creation process: 1. Take final CVS checkout snapshot 2. Remove ALL ChangeLog* files 3. Transform all Manifests to thin 4. Remove empty Manifests 5. Convert all stale $Header$/$Id$ CVS keywords to non-expanded Git $Id$ 5.1. Do not touch files with -kb/-ko keyword flags. Signed-off-by: Robin H. Johnson <robbat2@gentoo.org> X-Thanks: Alec Warner <antarus@gentoo.org> - did the GSoC 2006 migration tests X-Thanks: Robin H. Johnson <robbat2@gentoo.org> - infra guy, herding this project X-Thanks: Nguyen Thai Ngoc Duy <pclouds@gentoo.org> - Former Gentoo developer, wrote Git features for the migration X-Thanks: Brian Harring <ferringb@gentoo.org> - wrote much python to improve cvs2svn X-Thanks: Rich Freeman <rich0@gentoo.org> - validation scripts X-Thanks: Patrick Lauer <patrick@gentoo.org> - Gentoo dev, running new 2014 work in migration X-Thanks: Michał Górny <mgorny@gentoo.org> - scripts, QA, nagging X-Thanks: All of other Gentoo developers - many ideas and lots of paint on the bikeshed
Diffstat (limited to 'net-misc/rsync/files')
-rw-r--r--net-misc/rsync/files/rsync-3.1.1_pre1-avoid_infinite_wait_reading_secrets_file.patch79
-rw-r--r--net-misc/rsync/files/rsyncd.conf-3.0.9-r115
-rw-r--r--net-misc/rsync/files/rsyncd.conf.d5
-rw-r--r--net-misc/rsync/files/rsyncd.init.d-r112
-rw-r--r--net-misc/rsync/files/rsyncd.logrotate9
-rw-r--r--net-misc/rsync/files/rsyncd.service12
-rw-r--r--net-misc/rsync/files/rsyncd.xinetd-3.0.9-r110
7 files changed, 142 insertions, 0 deletions
diff --git a/net-misc/rsync/files/rsync-3.1.1_pre1-avoid_infinite_wait_reading_secrets_file.patch b/net-misc/rsync/files/rsync-3.1.1_pre1-avoid_infinite_wait_reading_secrets_file.patch
new file mode 100644
index 00000000000..a3469a14a68
--- /dev/null
+++ b/net-misc/rsync/files/rsync-3.1.1_pre1-avoid_infinite_wait_reading_secrets_file.patch
@@ -0,0 +1,79 @@
+From: Wayne Davison <wayned@samba.org>
+Date: Sun, 13 Apr 2014 20:44:58 +0000 (-0700)
+Subject: Avoid infinite wait reading secrets file.
+X-Git-Url: https://git.samba.org/?p=rsync.git;a=commitdiff_plain;h=0dedfbce2c1b851684ba658861fe9d620636c56a
+
+Avoid infinite wait reading secrets file.
+---
+
+diff --git a/authenticate.c b/authenticate.c
+index 3381b8c..c92746c 100644
+--- a/authenticate.c
++++ b/authenticate.c
+@@ -102,15 +102,16 @@ static const char *check_secret(int module, const char *user, const char *group,
+ char pass2[MAX_DIGEST_LEN*2];
+ const char *fname = lp_secrets_file(module);
+ STRUCT_STAT st;
+- int fd, ok = 1;
++ int ok = 1;
+ int user_len = strlen(user);
+ int group_len = group ? strlen(group) : 0;
+ char *err;
++ FILE *fh;
+
+- if (!fname || !*fname || (fd = open(fname, O_RDONLY)) < 0)
++ if (!fname || !*fname || (fh = fopen(fname, "r")) == NULL)
+ return "no secrets file";
+
+- if (do_fstat(fd, &st) == -1) {
++ if (do_fstat(fileno(fh), &st) == -1) {
+ rsyserr(FLOG, errno, "fstat(%s)", fname);
+ ok = 0;
+ } else if (lp_strict_modes(module)) {
+@@ -123,29 +124,30 @@ static const char *check_secret(int module, const char *user, const char *group,
+ }
+ }
+ if (!ok) {
+- close(fd);
++ fclose(fh);
+ return "ignoring secrets file";
+ }
+
+ if (*user == '#') {
+ /* Reject attempt to match a comment. */
+- close(fd);
++ fclose(fh);
+ return "invalid username";
+ }
+
+ /* Try to find a line that starts with the user (or @group) name and a ':'. */
+ err = "secret not found";
+- while ((user || group) && read_line_old(fd, line, sizeof line, 1)) {
+- const char **ptr, *s;
++ while ((user || group) && fgets(line, sizeof line, fh) != NULL) {
++ const char **ptr, *s = strtok(line, "\n\r");
+ int len;
+- if (*line == '@') {
++ if (!s)
++ continue;
++ if (*s == '@') {
+ ptr = &group;
+ len = group_len;
+- s = line+1;
++ s++;
+ } else {
+ ptr = &user;
+ len = user_len;
+- s = line;
+ }
+ if (!*ptr || strncmp(s, *ptr, len) != 0 || s[len] != ':')
+ continue;
+@@ -158,7 +160,7 @@ static const char *check_secret(int module, const char *user, const char *group,
+ *ptr = NULL; /* Don't look for name again. */
+ }
+
+- close(fd);
++ fclose(fh);
+
+ memset(line, 0, sizeof line);
+ memset(pass2, 0, sizeof pass2);
diff --git a/net-misc/rsync/files/rsyncd.conf-3.0.9-r1 b/net-misc/rsync/files/rsyncd.conf-3.0.9-r1
new file mode 100644
index 00000000000..20dcf3afdc1
--- /dev/null
+++ b/net-misc/rsync/files/rsyncd.conf-3.0.9-r1
@@ -0,0 +1,15 @@
+# /etc/rsyncd.conf
+
+# Minimal configuration file for rsync daemon
+# See rsync(1) and rsyncd.conf(5) man pages for help
+
+# This line is required by the /etc/init.d/rsyncd script
+pid file = @GENTOO_PORTAGE_EPREFIX@/run/rsyncd.pid
+use chroot = yes
+read only = yes
+
+# Simple example for enabling your own local rsync server
+#[gentoo-portage]
+# path = @GENTOO_PORTAGE_EPREFIX@/usr/portage
+# comment = Gentoo Portage tree
+# exclude = /distfiles /packages
diff --git a/net-misc/rsync/files/rsyncd.conf.d b/net-misc/rsync/files/rsyncd.conf.d
new file mode 100644
index 00000000000..c3d897ed2f2
--- /dev/null
+++ b/net-misc/rsync/files/rsyncd.conf.d
@@ -0,0 +1,5 @@
+# /etc/conf.d/rsyncd: config file for /etc/init.d/rsyncd
+
+# see man pages for rsync or run `rsync --help`
+# for valid cmdline options
+#RSYNC_OPTS=""
diff --git a/net-misc/rsync/files/rsyncd.init.d-r1 b/net-misc/rsync/files/rsyncd.init.d-r1
new file mode 100644
index 00000000000..a2acfb6a587
--- /dev/null
+++ b/net-misc/rsync/files/rsyncd.init.d-r1
@@ -0,0 +1,12 @@
+#!/sbin/runscript
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+command="/usr/bin/rsync"
+command_args="--daemon ${RSYNC_OPTS}"
+pidfile="/var/run/${SVCNAME}.pid"
+
+depend() {
+ use net
+}
diff --git a/net-misc/rsync/files/rsyncd.logrotate b/net-misc/rsync/files/rsyncd.logrotate
new file mode 100644
index 00000000000..34bcf72d210
--- /dev/null
+++ b/net-misc/rsync/files/rsyncd.logrotate
@@ -0,0 +1,9 @@
+/var/log/rsync.log {
+ compress
+ maxage 365
+ rotate 7
+ size=+1024k
+ notifempty
+ missingok
+ copytruncate
+}
diff --git a/net-misc/rsync/files/rsyncd.service b/net-misc/rsync/files/rsyncd.service
new file mode 100644
index 00000000000..a2c1de0add1
--- /dev/null
+++ b/net-misc/rsync/files/rsyncd.service
@@ -0,0 +1,12 @@
+[Unit]
+Description=rsync daemon
+After=networking.target
+
+[Service]
+Type=simple
+ExecStart=/usr/bin/rsync --daemon --no-detach
+StandardOutput=syslog
+StandardError=syslog
+
+[Install]
+WantedBy=multi-user.target
diff --git a/net-misc/rsync/files/rsyncd.xinetd-3.0.9-r1 b/net-misc/rsync/files/rsyncd.xinetd-3.0.9-r1
new file mode 100644
index 00000000000..90d07f0710b
--- /dev/null
+++ b/net-misc/rsync/files/rsyncd.xinetd-3.0.9-r1
@@ -0,0 +1,10 @@
+service rsync
+{
+ socket_type = stream
+ protocol = tcp
+ wait = no
+ user = root
+ server = @GENTOO_PORTAGE_EPREFIX@/usr/bin/rsync
+ server_args = --daemon
+ disable = yes
+}