diff options
author | Natanael Copa <ncopa@alpinelinux.org> | 2013-11-26 12:53:36 +0000 |
---|---|---|
committer | Natanael Copa <ncopa@alpinelinux.org> | 2013-11-26 12:53:52 +0000 |
commit | fac8c82f1b647301c27c2d5a1a554686ea82eb65 (patch) | |
tree | 2cc222a46d78671c6dc5324292372e67e1d09b02 /main/nfs-utils | |
parent | 6aa91507440f5f549f58e8110f746476f77fd821 (diff) | |
download | aports-fac8c82f1b647301c27c2d5a1a554686ea82eb65.tar.bz2 aports-fac8c82f1b647301c27c2d5a1a554686ea82eb65.tar.xz |
main/nfs-utils: upgrade to 1.2.9
Diffstat (limited to 'main/nfs-utils')
-rw-r--r-- | main/nfs-utils/0001-mountd-Fix-is_subdirectory-again.patch | 81 | ||||
-rw-r--r-- | main/nfs-utils/0001-statd-exit-if-a-statd-is-already-running.patch | 126 | ||||
-rw-r--r-- | main/nfs-utils/APKBUILD | 24 |
3 files changed, 8 insertions, 223 deletions
diff --git a/main/nfs-utils/0001-mountd-Fix-is_subdirectory-again.patch b/main/nfs-utils/0001-mountd-Fix-is_subdirectory-again.patch deleted file mode 100644 index e6f372b758..0000000000 --- a/main/nfs-utils/0001-mountd-Fix-is_subdirectory-again.patch +++ /dev/null @@ -1,81 +0,0 @@ -From 23d3980b6cfea4e9056d9b7b81e48b4fefc645e0 Mon Sep 17 00:00:00 2001 -From: NeilBrown <neilb@suse.de> -Date: Tue, 7 May 2013 11:46:18 -0400 -Subject: [PATCH] mountd: Fix is_subdirectory again - -The problem was that is_subdirectory() would also succeed if the two -directories were the same. This is needed for path_matches() which -needs to see if the child is same-or-descendant. - -So this patch rearranges path_matches() to do the "are they the same" -test itself and only bother with is_subdirectory() if it they are not -the same. - -So now is_subdirectory() can be strict, and so can be usable for -subexport(), which needs a strong 'in subdirectory - not the same' test. - -Acked-by: J. Bruce Fields <bfields@redhat.com> -Signed-off-by: NeilBrown <neilb@suse.de> -Signed-off-by: Steve Dickson <steved@redhat.com> ---- - utils/mountd/cache.c | 24 ++++++++++++++---------- - 1 file changed, 14 insertions(+), 10 deletions(-) - -diff --git a/utils/mountd/cache.c b/utils/mountd/cache.c -index 737927c..517aa62 100644 ---- a/utils/mountd/cache.c -+++ b/utils/mountd/cache.c -@@ -347,20 +347,26 @@ static char *next_mnt(void **v, char *p) - - static int is_subdirectory(char *child, char *parent) - { -+ /* Check is child is strictly a subdirectory of -+ * parent or a more distant descendant. -+ */ - size_t l = strlen(parent); - -- if (strcmp(parent, "/") == 0) -+ if (strcmp(parent, "/") == 0 && child[1] != 0) - return 1; - -- return strcmp(child, parent) == 0 -- || (strncmp(child, parent, l) == 0 && child[l] == '/'); -+ return (strncmp(child, parent, l) == 0 && child[l] == '/'); - } - - static int path_matches(nfs_export *exp, char *path) - { -- if (exp->m_export.e_flags & NFSEXP_CROSSMOUNT) -- return is_subdirectory(path, exp->m_export.e_path); -- return strcmp(path, exp->m_export.e_path) == 0; -+ /* Does the path match the export? I.e. is it an -+ * exact match, or does the export have CROSSMOUNT, and path -+ * is a descendant? -+ */ -+ return strcmp(path, exp->m_export.e_path) == 0 -+ || ((exp->m_export.e_flags & NFSEXP_CROSSMOUNT) -+ && is_subdirectory(path, exp->m_export.e_path)); - } - - static int -@@ -369,15 +375,13 @@ export_matches(nfs_export *exp, char *dom, char *path, struct addrinfo *ai) - return path_matches(exp, path) && client_matches(exp, dom, ai); - } - --/* True iff e1 is a child of e2 and e2 has crossmnt set: */ -+/* True iff e1 is a child of e2 (or descendant) and e2 has crossmnt set: */ - static bool subexport(struct exportent *e1, struct exportent *e2) - { - char *p1 = e1->e_path, *p2 = e2->e_path; -- size_t l2 = strlen(p2); - - return e2->e_flags & NFSEXP_CROSSMOUNT -- && strncmp(p1, p2, l2) == 0 -- && p1[l2] == '/'; -+ && is_subdirectory(p1, p2); - } - - struct parsed_fsid { --- -1.8.3.2 - diff --git a/main/nfs-utils/0001-statd-exit-if-a-statd-is-already-running.patch b/main/nfs-utils/0001-statd-exit-if-a-statd-is-already-running.patch deleted file mode 100644 index 4e8be2fd43..0000000000 --- a/main/nfs-utils/0001-statd-exit-if-a-statd-is-already-running.patch +++ /dev/null @@ -1,126 +0,0 @@ -From 342446a4a624d4ee8254af859bb7f1de6d268679 Mon Sep 17 00:00:00 2001 -From: Weston Andros Adamson <dros@netapp.com> -Date: Tue, 7 May 2013 11:25:29 -0400 -Subject: [PATCH] statd: exit if a statd is already running - -Moves nfs_probe_statd from mount to nfs support lib to share with statd. - -Acked-by: Chuck Lever <chuck.lever@oracle.com> -Signed-off-by: Weston Andros Adamson <dros@netapp.com> -Signed-off-by: Steve Dickson <steved@redhat.com> ---- - support/include/nfsrpc.h | 5 +++++ - support/nfs/getport.c | 22 ++++++++++++++++++++++ - utils/mount/network.c | 17 ----------------- - utils/statd/statd.c | 7 +++++++ - 4 files changed, 34 insertions(+), 17 deletions(-) - -diff --git a/support/include/nfsrpc.h b/support/include/nfsrpc.h -index a0b80e1..1bfae7a 100644 ---- a/support/include/nfsrpc.h -+++ b/support/include/nfsrpc.h -@@ -156,6 +156,11 @@ extern unsigned long nfs_pmap_getport(const struct sockaddr_in *, - const struct timeval *); - - /* -+ * Use nfs_pmap_getport to see if statd is running locally -+ */ -+extern int nfs_probe_statd(void); -+ -+/* - * Contact a remote RPC service to discover whether it is responding - * to requests. - */ -diff --git a/support/nfs/getport.c b/support/nfs/getport.c -index 3331ad4..081594c 100644 ---- a/support/nfs/getport.c -+++ b/support/nfs/getport.c -@@ -1102,3 +1102,25 @@ unsigned long nfs_pmap_getport(const struct sockaddr_in *sin, - - return port; - } -+ -+static const char *nfs_ns_pgmtbl[] = { -+ "status", -+ NULL, -+}; -+ -+/* -+ * nfs_probe_statd - use nfs_pmap_getport to see if statd is running locally -+ * -+ * Returns non-zero if statd is running locally. -+ */ -+int nfs_probe_statd(void) -+{ -+ struct sockaddr_in addr = { -+ .sin_family = AF_INET, -+ .sin_addr.s_addr = htonl(INADDR_LOOPBACK), -+ }; -+ rpcprog_t program = nfs_getrpcbyname(NSMPROG, nfs_ns_pgmtbl); -+ -+ return nfs_getport_ping((struct sockaddr *)(char *)&addr, sizeof(addr), -+ program, (rpcvers_t)1, IPPROTO_UDP); -+} -diff --git a/utils/mount/network.c b/utils/mount/network.c -index 4be48cd..e2cdcaf 100644 ---- a/utils/mount/network.c -+++ b/utils/mount/network.c -@@ -65,11 +65,6 @@ extern int nfs_mount_data_version; - extern char *progname; - extern int verbose; - --static const char *nfs_ns_pgmtbl[] = { -- "status", -- NULL, --}; -- - static const char *nfs_mnt_pgmtbl[] = { - "mount", - "mountd", -@@ -761,18 +756,6 @@ int probe_bothports(clnt_addr_t *mnt_server, clnt_addr_t *nfs_server) - &nfs_server->pmap); - } - --static int nfs_probe_statd(void) --{ -- struct sockaddr_in addr = { -- .sin_family = AF_INET, -- .sin_addr.s_addr = htonl(INADDR_LOOPBACK), -- }; -- rpcprog_t program = nfs_getrpcbyname(NSMPROG, nfs_ns_pgmtbl); -- -- return nfs_getport_ping(SAFE_SOCKADDR(&addr), sizeof(addr), -- program, (rpcvers_t)1, IPPROTO_UDP); --} -- - /** - * start_statd - attempt to start rpc.statd - * -diff --git a/utils/statd/statd.c b/utils/statd/statd.c -index 652546c..8c51bcc 100644 ---- a/utils/statd/statd.c -+++ b/utils/statd/statd.c -@@ -28,6 +28,7 @@ - - #include "statd.h" - #include "nfslib.h" -+#include "nfsrpc.h" - #include "nsm.h" - - /* Socket operations */ -@@ -237,6 +238,12 @@ int main (int argc, char **argv) - /* Set hostname */ - MY_NAME = NULL; - -+ /* Refuse to start if another statd is running */ -+ if (nfs_probe_statd()) { -+ fprintf(stderr, "Statd service already running!\n"); -+ exit(1); -+ } -+ - /* Process command line switches */ - while ((arg = getopt_long(argc, argv, "h?vVFNH:dn:p:o:P:L", longopts, NULL)) != EOF) { - switch (arg) { --- -1.8.3.2 - diff --git a/main/nfs-utils/APKBUILD b/main/nfs-utils/APKBUILD index 7ca13ff2fa..8f1d366b95 100644 --- a/main/nfs-utils/APKBUILD +++ b/main/nfs-utils/APKBUILD @@ -1,8 +1,8 @@ # Contributor: Carlo Landmeter <clandmeter@gmail.com> # Maintainer: Natanael Copa <ncopa@alpinelinux.org> pkgname=nfs-utils -pkgver=1.2.8 -pkgrel=1 +pkgver=1.2.9 +pkgrel=0 pkgdesc="kernel-mode NFS" url="http://nfs.sourceforge.net/" arch="all" @@ -26,8 +26,6 @@ source="http://downloads.sourceforge.net/nfs/$pkgname-$pkgver.tar.bz2 nfs.exports nfs-utils-mtab-sym.patch uclibc-getaddrinfo-canonname.patch - 0001-mountd-Fix-is_subdirectory-again.patch - 0001-statd-exit-if-a-statd-is-already-running.patch " prepare() { @@ -94,7 +92,7 @@ rpcgen() { install -m755 -D tools/rpcgen/rpcgen "$subpkgdir"/usr/bin/rpcgen } -md5sums="6e7d97de51e428a0b8698c16ca23db77 nfs-utils-1.2.8.tar.bz2 +md5sums="18869d16db3f49c053f8c68eba3fe2e0 nfs-utils-1.2.9.tar.bz2 9e402e75f23b886fce2f53bec2c1d415 nfs.initd d514fb87ce5de9909f43d99012352f09 nfsmount.initd 144b0e1f7d32265abe4c499a47af6154 rpc.gssd.initd @@ -105,10 +103,8 @@ d514fb87ce5de9909f43d99012352f09 nfsmount.initd 09135438d6df50b868bbe5a2260f973c nfs.confd 4f1bb7b2412ce5952ecb5ec22d8ed99d nfs.exports 2b2d228f9947581c924a691a84664fa1 nfs-utils-mtab-sym.patch -37a82a3a81410b483790ca30d564f4ba uclibc-getaddrinfo-canonname.patch -ddcfdb1106395d071ed917d968067b3d 0001-mountd-Fix-is_subdirectory-again.patch -f19d520262214146ad5cab0f219fd9ca 0001-statd-exit-if-a-statd-is-already-running.patch" -sha256sums="1cc8f02a633eddbf0a1d93421f331479c4cdab4c5ab33b8bf8c7c369f9156ac6 nfs-utils-1.2.8.tar.bz2 +37a82a3a81410b483790ca30d564f4ba uclibc-getaddrinfo-canonname.patch" +sha256sums="90b76d5692a520b74273e607a4fd69df4cc35f65e242e22e2bc61b58759722f3 nfs-utils-1.2.9.tar.bz2 81b546cb98be4678cd22f4da39927d2c79532717d927bfba055af447dbff26a5 nfs.initd f2f5b54fef59f24a1fc6a8b814dfe2cfdeeb02fd0d5041cff31650e626fe4b75 nfsmount.initd 00d9c29280a83e8458c33139d04a9b38c6fdba9d7cb9b420ca83bf6b10e6435d rpc.gssd.initd @@ -119,10 +115,8 @@ f1c460d8b0e91e54a551397d755135d05a3728d81de596535bf8bda074455677 rpc.svcgssd.in 9ca3b7dfbac5bedd818a3637805380f4e873ef8e809c21c26f410c86ac16e03e nfs.confd f2aaf1c92e07172adeb65f7f2bc0140c533ae453a3477e99be677ef2e05f2d4b nfs.exports 5a1c6875f43ecc93d5db7bcf84b4ceda16c09b6109c28696eb55d05247511706 nfs-utils-mtab-sym.patch -7c7451365001f1672abd6fd6dd53da03617a9baa4758ec515b3adf8b7bb7ad93 uclibc-getaddrinfo-canonname.patch -1c1204dc5fc62debb8cc66ca299a741a3d8e515f480ff7aecb4ad72819658de7 0001-mountd-Fix-is_subdirectory-again.patch -d3e402c73b204d4b5e161563005269318dad6e992792c902da76ff8368b872cb 0001-statd-exit-if-a-statd-is-already-running.patch" -sha512sums="abe13f37dccb40258ac2f654143e540b9ac8c41ca10fe88f104ebb558334d41c0e31220dbae0122836e43236cac763fbcfc1d5bd708aca3b282152ac3ac7213b nfs-utils-1.2.8.tar.bz2 +7c7451365001f1672abd6fd6dd53da03617a9baa4758ec515b3adf8b7bb7ad93 uclibc-getaddrinfo-canonname.patch" +sha512sums="c71f986a7e8f38492f8411540b32fef904f689b45b831e0e3c193628085d09742c6352dc42d6d374b8ded12e2b54f8fb3c8de66695a36cf038fc4afa5c29879e nfs-utils-1.2.9.tar.bz2 98eeae4b30fe13d6fdeb62d47e05fd5bc577946d84a3fe84703dcc90c58768f0d1886a0aa9262ead3aac5c4bd6d7b1cc2b703fb9603baffad4ac2ead635294f3 nfs.initd 8e720417d7443c6bd4e3bda9e7bf4a61b073009fc1750ec0c7378fb01d726ee827a759c6bc10629606b4f2dbd7884807a9e0b8377382e4968f06ef8e938537ae nfsmount.initd cd4f763c7cced0eecb03e2d4c8fb1d5fbbddd119a014dee4e9cb881d3750fb01a50daa4475700914785cb1313ceef638b7de4d8dddac90cbab63888cc81938f6 rpc.gssd.initd @@ -133,6 +127,4 @@ cf0272e42310b1ff8d40ff37dc839df2dd4fba4cb408f8fa67ce445e2975b37cafbb35e6d41af2bb 1711803f848f73fef9fa74bd572fa7643c586f06eeedf62ed91bd2aa06ad59c7b1f1c585b6f7b7a8ce67ff7fd6b601d88dc99ca1000dd1d3f5991f420da9761b nfs.confd 70f96bb3a465ee0fa857a6e511051ca3ced9f5a5d1e6b8b32eec843a2067f2475d8979c724a3661de0a2b078eef143f55d75ed184d823841d9de5038da91fb91 nfs.exports 5fd9039a61a0cdaeb57b5332ea545034101e6f15be200b7cf8fc7d0a3d22836a6fc778e0560656c1825808a4dc09046d9923d81b4d1324a6e526b226c657d064 nfs-utils-mtab-sym.patch -b9f0820773d3ab82cfa9ba603c83f98a71ad2e7205418c1223344b5b3e1bdfbb6aa183ab830df25ded660a4950d0e54098485fa08a4f6b6363a62c0f6c713489 uclibc-getaddrinfo-canonname.patch -59a29c72096357fc35e805f0a1e443c7a6ee9b07c96ed85481b1101a6090311937b39f45aefa60325f968a5c7d2bc5550c2a43f2f54bd8522b615b84bdf71c86 0001-mountd-Fix-is_subdirectory-again.patch -e04d451618d6f6197dc0692844cc115fec93575525cd0569d582f9278007e2dbec692ef46065c675de13d608e034161f39a60d46766873933d05d18b94633f6c 0001-statd-exit-if-a-statd-is-already-running.patch" +b9f0820773d3ab82cfa9ba603c83f98a71ad2e7205418c1223344b5b3e1bdfbb6aa183ab830df25ded660a4950d0e54098485fa08a4f6b6363a62c0f6c713489 uclibc-getaddrinfo-canonname.patch" |