From 831fa2898207f451f379f5efe6b4adc7ae014478 Mon Sep 17 00:00:00 2001 From: Juan RP Date: Mon, 23 Jun 2014 09:32:11 +0200 Subject: [PATCH] rsync: update to 3.1.1. --- srcpkgs/rsync/patches/CVE-2014-2855.patch | 84 ----------------------- srcpkgs/rsync/template | 7 +- 2 files changed, 3 insertions(+), 88 deletions(-) delete mode 100644 srcpkgs/rsync/patches/CVE-2014-2855.patch diff --git a/srcpkgs/rsync/patches/CVE-2014-2855.patch b/srcpkgs/rsync/patches/CVE-2014-2855.patch deleted file mode 100644 index b9969036e25..00000000000 --- a/srcpkgs/rsync/patches/CVE-2014-2855.patch +++ /dev/null @@ -1,84 +0,0 @@ -From 0dedfbce2c1b851684ba658861fe9d620636c56a Mon Sep 17 00:00:00 2001 -From: Wayne Davison -Date: Sun, 13 Apr 2014 13:44:58 -0700 -Subject: [PATCH] Avoid infinite wait reading secrets file. - ---- - authenticate.c | 24 +++++++++++++----------- - 1 files changed, 13 insertions(+), 11 deletions(-) - -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); --- -1.7.0.4 - - diff --git a/srcpkgs/rsync/template b/srcpkgs/rsync/template index 78d70bfbe2d..3ebc79e52ba 100644 --- a/srcpkgs/rsync/template +++ b/srcpkgs/rsync/template @@ -1,7 +1,7 @@ # Template file for 'rsync' pkgname=rsync -version=3.1.0 -revision=3 +version=3.1.1 +revision=1 build_style=gnu-configure hostmakedepends="perl" makedepends="zlib-devel acl-devel popt-devel" @@ -10,5 +10,4 @@ maintainer="Juan RP " license="GPL-3" homepage="http://samba.anu.edu.au/rsync/" distfiles="http://www.samba.org/ftp/rsync/src/rsync-$version.tar.gz" -checksum=81ca23f77fc9b957eb9845a6024f41af0ff0c619b7f38576887c63fa38e2394e -patch_args="-p1" +checksum=7de4364fcf5fe42f3bdb514417f1c40d10bbca896abe7e7f2c581c6ea08a2621