diff options
author | root <root@rshg054.dnsready.net> | 2011-08-08 23:14:38 +0000 |
---|---|---|
committer | root <root@rshg054.dnsready.net> | 2011-08-08 23:14:38 +0000 |
commit | 2b6f5a28e2e55b46c1169228e1e56f3b18dd08b5 (patch) | |
tree | ebd7dccec211af75c9dfd55560b3e5f61420b784 /core/nfs-utils | |
parent | 665308e50fd95e984da057ab8ddb6505b596b841 (diff) |
Mon Aug 8 23:14:38 UTC 2011
Diffstat (limited to 'core/nfs-utils')
-rw-r--r-- | core/nfs-utils/PKGBUILD | 19 | ||||
-rw-r--r-- | core/nfs-utils/kernel-3.0-segfault.patch | 53 |
2 files changed, 64 insertions, 8 deletions
diff --git a/core/nfs-utils/PKGBUILD b/core/nfs-utils/PKGBUILD index 3adca96d4..69ee72ca5 100644 --- a/core/nfs-utils/PKGBUILD +++ b/core/nfs-utils/PKGBUILD @@ -1,4 +1,4 @@ -# $Id: PKGBUILD 131837 2011-07-16 00:22:48Z dreisner $ +# $Id: PKGBUILD 134117 2011-08-01 17:55:07Z tpowa $ # Maintainer: Tobias Powalowski <tpowa@archlinux.org> # Contributor: John Proctor <jproctor@prium.net> # Contributor: dibblethewrecker <dibblethewrecker.at.jiwe.org> @@ -6,8 +6,8 @@ # Contributor: Marco Lima <cipparello gmail com> pkgname=nfs-utils -pkgver=1.2.3 -pkgrel=3 +pkgver=1.2.4 +pkgrel=2 pkgdesc="Support programs for Network File Systems" arch=('i686' 'x86_64') url='http://nfs.sourceforge.net' @@ -24,9 +24,10 @@ source=(http://downloads.sourceforge.net/project/nfs/${pkgname}/${pkgver}/${pkgn idmapd.conf start-statd.patch nfs-utils-1.1.4-mtab-sym.patch - nfs-utils-1.1.4-no-exec.patch) + nfs-utils-1.1.4-no-exec.patch + kernel-3.0-segfault.patch) install=nfs-utils.install -md5sums=('1131dc5f27c4f3905a6e7ee0d594fd4d' +md5sums=('938dc0574f3eb9891a8ed4746f806277' 'fc508e10cdf5e8ddd80373b1b2bc99a1' 'f73f197a16b02c3e248488ec35c4cf43' '5ae080f6117cef3140f02bc162bdc755' @@ -35,13 +36,14 @@ md5sums=('1131dc5f27c4f3905a6e7ee0d594fd4d' 'eb4f4027fab6fc1201f1ca04f5954c76' 'e24f81a8c8657672e262c61235d34b4a' '7674106eaaa4c149bccd4f05fe3604e9' - '4f4827dfc93008dfadd0a530ad0872b2') + '4f4827dfc93008dfadd0a530ad0872b2' + 'ab92e67f3d0ee2935faab9cdabef8003') build() { cd $srcdir/${pkgname}-${pkgver} patch -Np1 -i ../nfs-utils-1.1.4-mtab-sym.patch - patch -Np1 -i ../nfs-utils-1.1.4-no-exec.patch - + #patch -Np1 -i ../nfs-utils-1.1.4-no-exec.patch + patch -Np1 -i ../kernel-3.0-segfault.patch # arch specific patch patch -Np0 -i $srcdir/start-statd.patch @@ -67,6 +69,7 @@ package() { install -D -m 644 ../nfs-common.conf "$pkgdir/"etc/conf.d/nfs-common.conf install -D -m 644 ../nfs-server.conf "$pkgdir/"etc/conf.d/nfs-server.conf # directories + mkdir "$pkgdir/"etc/exports.d mkdir "$pkgdir/"var/lib/nfs/rpc_pipefs mkdir "$pkgdir/"var/lib/nfs/v4recovery } diff --git a/core/nfs-utils/kernel-3.0-segfault.patch b/core/nfs-utils/kernel-3.0-segfault.patch new file mode 100644 index 000000000..3dba94a05 --- /dev/null +++ b/core/nfs-utils/kernel-3.0-segfault.patch @@ -0,0 +1,53 @@ +mount.nfs segfaults if kernel version number does not contain +at least 3 components delimited with a dot. + +Avoid this by matching up to three unsigned integers inialised +to zero, separated by dots. + +A version that does not start with an integer is probably a future +version where the versioning evolved to another scheme. +Return UINT_MAX which is guaranteed to be higher than existing +versions. This would also make it possible to easily identify +versions that do not start with an integer. + +Signed-off-by: Luk Claes <luk@...> +--- + utils/mount/version.h | 16 +++++++++------- + 1 files changed, 9 insertions(+), 7 deletions(-) + +diff --git a/utils/mount/version.h b/utils/mount/version.h +index af61a6f..531cf68 100644 +--- a/utils/mount/version.h ++++ b/utils/mount/version.h +@@ -23,8 +23,8 @@ + #ifndef _NFS_UTILS_MOUNT_VERSION_H + #define _NFS_UTILS_MOUNT_VERSION_H + +-#include <stdlib.h> +-#include <string.h> ++#include <stdio.h> ++#include <limits.h> + + #include <sys/utsname.h> + +@@ -37,14 +37,16 @@ static inline unsigned int MAKE_VERSION(unsigned int p, unsigned int q, + static inline unsigned int linux_version_code(void) + { + struct utsname my_utsname; +- unsigned int p, q, r; ++ unsigned int p, q = 0, r = 0; + ++ /* UINT_MAX as backward compatibility code should not be run */ + if (uname(&my_utsname)) +- return 0; ++ return UINT_MAX; + +- p = (unsigned int)atoi(strtok(my_utsname.release, ".")); +- q = (unsigned int)atoi(strtok(NULL, ".")); +- r = (unsigned int)atoi(strtok(NULL, ".")); ++ /* UINT_MAX as future versions might not start with an integer */ ++ if (sscanf(my_utsname.release, "%u.%u.%u", &p, &q, &r) < 1) ++ return UINT_MAX; ++ + return MAKE_VERSION(p, q, r); + } |