[arch-commits] Commit in nbd/trunk (0001-server_trim_whitespace.patch PKGBUILD)

Christian Hesse eworm at archlinux.org
Sun Jan 17 13:31:08 UTC 2021


    Date: Sunday, January 17, 2021 @ 13:31:07
  Author: eworm
Revision: 821282

upgpkg: nbd 3.21-1: new upstream release

Modified:
  nbd/trunk/PKGBUILD
Deleted:
  nbd/trunk/0001-server_trim_whitespace.patch

-----------------------------------+
 0001-server_trim_whitespace.patch |   42 ------------------------------------
 PKGBUILD                          |   14 ++----------
 2 files changed, 3 insertions(+), 53 deletions(-)

Deleted: 0001-server_trim_whitespace.patch
===================================================================
--- 0001-server_trim_whitespace.patch	2021-01-17 13:24:22 UTC (rev 821281)
+++ 0001-server_trim_whitespace.patch	2021-01-17 13:31:07 UTC (rev 821282)
@@ -1,42 +0,0 @@
-From 6cabf9af2310282ace4208ae6f3f4d874dbf3e88 Mon Sep 17 00:00:00 2001
-From: Jonathan Liu <net147 at gmail.com>
-Date: Sun, 15 Mar 2020 18:10:51 +1100
-Subject: [PATCH] server: trim whitespace from lines in authorization file
-
-The netmask line can fail to parse when passed to getaddrinfo if it
-contains whitespace such as newline when using glibc 2.29 and later.
-This results in clients being denied access even though their IP
-address is listed in the authorization file.
-
-Signed-off-by: Jonathan Liu <net147 at gmail.com>
-Signed-off-by: Wouter Verhelst <w at uter.be>
----
- nbdsrv.c | 8 +++++++-
- 1 file changed, 7 insertions(+), 1 deletion(-)
-
-diff --git a/nbdsrv.c b/nbdsrv.c
-index b4fa8000..168d425b 100644
---- a/nbdsrv.c
-+++ b/nbdsrv.c
-@@ -127,6 +127,7 @@ int authorized_client(CLIENT *opts) {
-   
- 	while (fgets(line,LINELEN,f)!=NULL) {
- 		char* pos;
-+		char* endpos;
- 		/* Drop comments */
- 		if((pos = strchr(line, '#'))) {
- 			*pos = '\0';
-@@ -140,7 +141,12 @@ int authorized_client(CLIENT *opts) {
- 		if(!(*pos)) {
- 			continue;
- 		}
--		if(address_matches(line, (struct sockaddr*)&opts->clientaddr, NULL)) {
-+		/* Trim trailing whitespace */
-+		endpos = pos;
-+		while ((*endpos) && !isspace(*endpos))
-+			endpos++;
-+		*endpos = '\0';
-+		if(address_matches(pos, (struct sockaddr*)&opts->clientaddr, NULL)) {
- 			fclose(f);
- 			return 1;
- 		}

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2021-01-17 13:24:22 UTC (rev 821281)
+++ PKGBUILD	2021-01-17 13:31:07 UTC (rev 821282)
@@ -4,8 +4,8 @@
 # Contributor: Gerhard Brauer <gerbra at archlinux.de>
 
 pkgname=nbd
-pkgver=3.20
-pkgrel=2
+pkgver=3.21
+pkgrel=1
 pkgdesc='tools for network block devices, allowing you to use remote block devices over TCP/IP'
 arch=('x86_64')
 url='https://nbd.sourceforge.io/'
@@ -13,22 +13,14 @@
 depends=('glib2' 'gnutls')
 backup=('etc/nbd-server/config')
 source=("https://downloads.sourceforge.net/$pkgname/$pkgname-$pkgver.tar.xz"
-        '0001-server_trim_whitespace.patch'
         'config'
         'nbd.service'
         'sysusers_nbd.conf')
-sha256sums=('e0e1b3538ab7ae5accf56180afd1a9887d415b98d21223b8ad42592b4af7d6cd'
-            '2ce3e596fba1464a50557354a898e8f6a7d6a140f303867e577026e90686d7d5'
+sha256sums=('e7688af39d91733bbcd2db08062c44fe503d004e51528740139c44aff6a6bef9'
             'ee2e9fbbeb8a8b9b71d16b6f32eb41788f6def9d00cc4a47897ed3cb97cdde7c'
             '1b1add55d82d7623eabf7ff3dfec15c1fbe3c340fa74160df3d60e91eb1c71ba'
             '3fd98fe87d0b31b82126dc669f00355865f58fae81af3fccbc0d06504baef6cd')
 
-prepare() {
-  cd "${srcdir}/${pkgname}-${pkgver}"
-
-  patch -Np1 < ../0001-server_trim_whitespace.patch
-}
-
 build() {
   cd "${srcdir}/${pkgname}-${pkgver}"
 



More information about the arch-commits mailing list