Add nfs-utils from #1842

git-svn-id: svn://svn.openwrt.org/openwrt/packages@7611 3c298f89-4303-0410-b956-a3cf2f4a3e73
This commit is contained in:
florian 2007-06-13 17:21:03 +00:00
parent 84e6a72c15
commit 3716f3f030
3 changed files with 106 additions and 0 deletions

60
net/nfs-utils/Makefile Normal file
View File

@ -0,0 +1,60 @@
#
# Copyright (C) 2006 OpenWrt.org
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
#
# $Id: Makefile 6582 2007-03-16 20:21:39Z nbd $
include $(TOPDIR)/rules.mk
PKG_NAME:=nfs-utils
PKG_VERSION:=1.1.0
PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=http://downloads.sourceforge.net/nfs/
PKG_MD5SUM:=df88c6fe88a26f9797e74cb2d3291a2a
PKG_BUILD_DEPENDS:=libgssapi librpcsecgss libnfsidmap libwrap
include $(INCLUDE_DIR)/package.mk
define Package/nfs-utils/Default
SECTION:=net
CATEGORY:=Network
URL:=http://sourceforge.net/projects/nfs/
endef
define Package/nfs-utils
$(call Package/nfs-utils/Default)
DEPENDS:=+libwrap +libevent +libblkid
TITLE:=updated mount utility (includes nfs4)
DESCRIPTION:=Updated mount.nfs command - allows mounting nfs4 volumes
endef
CONFIGURE_ARGS += --disable-gss
TARGET_CFLAGS += -I$(PKG_BUILD_DIR)/lib
define Build/Compile
$(call Build/Compile/Default, \
OPT="$(TARGET_CFLAGS)" \
INSTALLSUID="install -m 4755" \
DESTDIR="$(PKG_INSTALL_DIR)" \
all install \
)
endef
define Package/Template
@if [ \! -f "$(PKG_INSTALL_DIR)/$(1)" ]; then \
rm -f $(PKG_BUILD_DIR)/.built; \
$(MAKE) $(PKG_BUILD_DIR)/.built; \
fi
$(INSTALL_DIR) $(2)
$(CP) $(PKG_INSTALL_DIR)/$(1) $(2)/
endef
define Package/nfs-utils/install
$(call Package/Template,sbin/mount*,$(1)/sbin)
endef
$(eval $(call BuildPackage,nfs-utils))

View File

@ -0,0 +1,15 @@
--- nfs-utils-1.1.0/support/nfs/svc_socket.c~ 2007-05-10 20:40:57.000000000 -0700
+++ nfs-utils-1.1.0/support/nfs/svc_socket.c 2007-06-07 15:37:39.000000000 -0700
@@ -67,8 +67,10 @@
memset (&addr, 0, sizeof (addr));
addr.sin_family = AF_INET;
- ret = getrpcbynumber_r (number, &rpcbuf, rpcdata, sizeof rpcdata,
- &rpcp);
+// ret = getrpcbynumber_r (number, &rpcbuf, rpcdata, sizeof rpcdata,
+// &rpcp);
+ rpcp = getrpcbynumber (number);
+ ret = 0;
if (ret == 0 && rpcp != NULL)
{
/* First try name. */

View File

@ -0,0 +1,31 @@
--- nfs-utils-1.1.0/utils/mountd/cache.c~ 2007-05-10 20:40:57.000000000 -0700
+++ nfs-utils-1.1.0/utils/mountd/cache.c 2007-06-07 15:29:28.000000000 -0700
@@ -131,17 +131,17 @@
pw = getpwuid(uid);
if (!pw)
rv = -1;
- else {
- rv = getgrouplist(pw->pw_name, pw->pw_gid, groups, &ngroups);
- if (rv == -1 && ngroups >= 100) {
- groups = malloc(sizeof(gid_t)*ngroups);
- if (!groups)
- rv = -1;
- else
- rv = getgrouplist(pw->pw_name, pw->pw_gid,
- groups, &ngroups);
- }
- }
+// else {
+// rv = getgrouplist(pw->pw_name, pw->pw_gid, groups, &ngroups);
+// if (rv == -1 && ngroups >= 100) {
+// groups = malloc(sizeof(gid_t)*ngroups);
+// if (!groups)
+// rv = -1;
+// else
+// rv = getgrouplist(pw->pw_name, pw->pw_gid,
+// groups, &ngroups);
+// }
+// }
qword_printint(f, uid);
qword_printint(f, time(0)+30*60);
if (rv >= 0) {