diff options
author | Richard Purdie <richard.purdie@linuxfoundation.org> | 2017-03-02 12:24:31 +0000 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2017-03-02 12:30:01 +0000 |
commit | 8ba70a1c28a4e0ee73db5308b38abc923b0be44d (patch) | |
tree | 0ed9bff8e4bd70766c81dbb559d32781bdd93ce8 /recipes-devtools/rsync | |
download | meta-gplv2-8ba70a1c28a4e0ee73db5308b38abc923b0be44d.tar.gz |
Create meta-gplv2 from files from OE-Core
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'recipes-devtools/rsync')
-rw-r--r-- | recipes-devtools/rsync/rsync-2.6.9/rsync-2.6.9-fname-obo.patch | 71 | ||||
-rw-r--r-- | recipes-devtools/rsync/rsync-2.6.9/rsyncd.conf | 15 | ||||
-rw-r--r-- | recipes-devtools/rsync/rsync.inc | 20 | ||||
-rw-r--r-- | recipes-devtools/rsync/rsync_2.6.9.bb | 15 |
4 files changed, 121 insertions, 0 deletions
diff --git a/recipes-devtools/rsync/rsync-2.6.9/rsync-2.6.9-fname-obo.patch b/recipes-devtools/rsync/rsync-2.6.9/rsync-2.6.9-fname-obo.patch new file mode 100644 index 0000000..bea325e --- /dev/null +++ b/recipes-devtools/rsync/rsync-2.6.9/rsync-2.6.9-fname-obo.patch | |||
@@ -0,0 +1,71 @@ | |||
1 | Upstream-Status: Backport [ The patch is rsync-2.6.9 specific ] | ||
2 | CVE: CVE-2007-4091 | ||
3 | |||
4 | The patch is from https://issues.rpath.com/browse/RPL-1647 and is used to | ||
5 | address http://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2007-4091 | ||
6 | |||
7 | Date: Tue May 10 10:07:36 2011 +0800 | ||
8 | Dexuan Cui <dexuan.cui@intel.com> | ||
9 | |||
10 | diff --git a/sender.c b/sender.c | ||
11 | index 6fcaa65..053a8f1 100644 | ||
12 | --- a/sender.c | ||
13 | +++ b/sender.c | ||
14 | @@ -123,6 +123,7 @@ void successful_send(int ndx) | ||
15 | char fname[MAXPATHLEN]; | ||
16 | struct file_struct *file; | ||
17 | unsigned int offset; | ||
18 | + size_t l = 0; | ||
19 | |||
20 | if (ndx < 0 || ndx >= the_file_list->count) | ||
21 | return; | ||
22 | @@ -133,6 +134,20 @@ void successful_send(int ndx) | ||
23 | file->dir.root, "/", NULL); | ||
24 | } else | ||
25 | offset = 0; | ||
26 | + | ||
27 | + l = offset + 1; | ||
28 | + if (file) { | ||
29 | + if (file->dirname) | ||
30 | + l += strlen(file->dirname); | ||
31 | + if (file->basename) | ||
32 | + l += strlen(file->basename); | ||
33 | + } | ||
34 | + | ||
35 | + if (l >= sizeof(fname)) { | ||
36 | + rprintf(FERROR, "Overlong pathname\n"); | ||
37 | + exit_cleanup(RERR_FILESELECT); | ||
38 | + } | ||
39 | + | ||
40 | f_name(file, fname + offset); | ||
41 | if (remove_source_files) { | ||
42 | if (do_unlink(fname) == 0) { | ||
43 | @@ -224,6 +239,7 @@ void send_files(struct file_list *flist, int f_out, int f_in) | ||
44 | enum logcode log_code = log_before_transfer ? FLOG : FINFO; | ||
45 | int f_xfer = write_batch < 0 ? batch_fd : f_out; | ||
46 | int i, j; | ||
47 | + size_t l = 0; | ||
48 | |||
49 | if (verbose > 2) | ||
50 | rprintf(FINFO, "send_files starting\n"); | ||
51 | @@ -259,6 +275,20 @@ void send_files(struct file_list *flist, int f_out, int f_in) | ||
52 | fname[offset++] = '/'; | ||
53 | } else | ||
54 | offset = 0; | ||
55 | + | ||
56 | + l = offset + 1; | ||
57 | + if (file) { | ||
58 | + if (file->dirname) | ||
59 | + l += strlen(file->dirname); | ||
60 | + if (file->basename) | ||
61 | + l += strlen(file->basename); | ||
62 | + } | ||
63 | + | ||
64 | + if (l >= sizeof(fname)) { | ||
65 | + rprintf(FERROR, "Overlong pathname\n"); | ||
66 | + exit_cleanup(RERR_FILESELECT); | ||
67 | + } | ||
68 | + | ||
69 | fname2 = f_name(file, fname + offset); | ||
70 | |||
71 | if (verbose > 2) | ||
diff --git a/recipes-devtools/rsync/rsync-2.6.9/rsyncd.conf b/recipes-devtools/rsync/rsync-2.6.9/rsyncd.conf new file mode 100644 index 0000000..845f5b3 --- /dev/null +++ b/recipes-devtools/rsync/rsync-2.6.9/rsyncd.conf | |||
@@ -0,0 +1,15 @@ | |||
1 | # /etc/rsyncd.conf | ||
2 | |||
3 | # Minimal configuration file for rsync daemon | ||
4 | # See rsync(1) and rsyncd.conf(5) man pages for help | ||
5 | |||
6 | # This file is required by rsync --daemon | ||
7 | pid file = /var/run/rsyncd.pid | ||
8 | use chroot = yes | ||
9 | read only = yes | ||
10 | |||
11 | # Simple example for enabling your own local rsync server | ||
12 | #[everything] | ||
13 | # path = / | ||
14 | # comment = Everything except /etc exposed | ||
15 | # exclude = /etc | ||
diff --git a/recipes-devtools/rsync/rsync.inc b/recipes-devtools/rsync/rsync.inc new file mode 100644 index 0000000..26c023a --- /dev/null +++ b/recipes-devtools/rsync/rsync.inc | |||
@@ -0,0 +1,20 @@ | |||
1 | SUMMARY = "File synchronization tool" | ||
2 | HOMEPAGE = "http://rsync.samba.org/" | ||
3 | BUGTRACKER = "http://rsync.samba.org/bugzilla.html" | ||
4 | SECTION = "console/network" | ||
5 | |||
6 | DEPENDS = "popt" | ||
7 | |||
8 | SRC_URI = "https://download.samba.org/pub/${BPN}/src/${BP}.tar.gz \ | ||
9 | file://rsyncd.conf" | ||
10 | |||
11 | inherit autotools | ||
12 | |||
13 | do_install_append() { | ||
14 | install -d ${D}${sysconfdir} | ||
15 | install -m 0644 ${WORKDIR}/rsyncd.conf ${D}${sysconfdir} | ||
16 | } | ||
17 | |||
18 | EXTRA_OEMAKE='STRIP=""' | ||
19 | |||
20 | PACKAGECONFIG[ipv6] = "--enable-ipv6,--disable-ipv6," | ||
diff --git a/recipes-devtools/rsync/rsync_2.6.9.bb b/recipes-devtools/rsync/rsync_2.6.9.bb new file mode 100644 index 0000000..17f1d31 --- /dev/null +++ b/recipes-devtools/rsync/rsync_2.6.9.bb | |||
@@ -0,0 +1,15 @@ | |||
1 | require rsync.inc | ||
2 | |||
3 | SRC_URI += "file://rsync-2.6.9-fname-obo.patch \ | ||
4 | file://rsyncd.conf \ | ||
5 | " | ||
6 | |||
7 | SRC_URI[md5sum] = "996d8d8831dbca17910094e56dcb5942" | ||
8 | SRC_URI[sha256sum] = "ca437301becd890e73300bc69a39189ff1564baa761948ff149b3dd7bde633f9" | ||
9 | |||
10 | LICENSE = "GPLv2+" | ||
11 | LIC_FILES_CHKSUM = "file://COPYING;md5=6d5a9d4c4d3af25cd68fd83e8a8cb09c" | ||
12 | |||
13 | PR = "r4" | ||
14 | |||
15 | PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'ipv6', d)}" | ||