summaryrefslogtreecommitdiff
path: root/package/nfs-utils
diff options
context:
space:
mode:
authorwbx <wbx@hydrogenium.(none)>2009-05-17 14:41:34 +0200
committerwbx <wbx@hydrogenium.(none)>2009-05-17 14:41:34 +0200
commit219a6dab8995aad9ac4860cc1a84d6f3509a03a4 (patch)
treeb9c0f3c43aebba2fcfef777592d0add39f2072f4 /package/nfs-utils
Initial import
Diffstat (limited to 'package/nfs-utils')
-rw-r--r--package/nfs-utils/Config.in43
-rw-r--r--package/nfs-utils/Makefile77
-rw-r--r--package/nfs-utils/files/idmapd.conf14
-rw-r--r--package/nfs-utils/files/nfsd.exports10
-rw-r--r--package/nfs-utils/files/nfsd.init48
-rw-r--r--package/nfs-utils/files/rpc3
-rw-r--r--package/nfs-utils/ipkg/nfs-utils.control4
-rw-r--r--package/nfs-utils/ipkg/nfs-utils.postinst9
-rw-r--r--package/nfs-utils/patches/patch-aclocal_kerberos5_m4138
-rw-r--r--package/nfs-utils/patches/patch-support_nfs_nfs_mntent_c30
-rw-r--r--package/nfs-utils/patches/patch-tools_Makefile_am11
-rw-r--r--package/nfs-utils/patches/patch-tools_Makefile_in21
-rw-r--r--package/nfs-utils/patches/patch-utils_mount_error_c12
-rw-r--r--package/nfs-utils/patches/patch-utils_mountd_cache_c75
-rw-r--r--package/nfs-utils/patches/patch-utils_mountd_fsloc_c12
15 files changed, 507 insertions, 0 deletions
diff --git a/package/nfs-utils/Config.in b/package/nfs-utils/Config.in
new file mode 100644
index 000000000..0b400090a
--- /dev/null
+++ b/package/nfs-utils/Config.in
@@ -0,0 +1,43 @@
+config ADK_PACKAGE_NFS_UTILS
+ prompt "nfs-utils......................... NFS server utilities"
+ tristate
+ default n
+ select ADK_PACKAGE_PORTMAP
+ select ADK_KPACKAGE_KMOD_NFSD
+ select ADK_KPACKAGE_KMOD_NFS_FS
+ select ADK_PACKAGE_LIBTIRPC if ADK_IPV6
+ depends on !ADK_TARGET_ROOTFS_NFSROOT
+ help
+ NFS server utilities (namely, exportfs), and an NFS server.
+
+config ADK_COMPILE_NFS_UTILS_WITH_KERBEROS
+ prompt "Enable Kerberos and NFSv4"
+ bool
+ select ADK_PACKAGE_LIBEVENT
+ select ADK_PACKAGE_LIBNFSIDMAP
+ select ADK_PACKAGE_LIBRPCSECGSS
+ select ADK_PACKAGE_LIBCOM_ERR
+ select ADK_KERNEL_NFSD_V4
+ default n
+ depends on ADK_PACKAGE_NFS_UTILS
+
+choice
+prompt "Kerberos implementation"
+depends on ADK_COMPILE_NFS_UTILS_WITH_KERBEROS
+config ADK_COMPILE_NFS_UTILS_WITH_KRB5
+ prompt "MIT"
+ bool
+ select ADK_COMPILE_KRB5
+ select ADK_PACKAGE_KRB5_LIBS
+ select ADK_PACKAGE_LIBGSSGLUE
+ help
+ use MIT kerberos libraries
+
+config ADK_COMPILE_NFS_UTILS_WITH_HEIMDAL
+ prompt "Heimdal"
+ bool
+ select ADK_PACKAGE_HEIMDAL_LIBS
+ help
+ Use heimdal kerberos libraries (experimental)
+
+endchoice
diff --git a/package/nfs-utils/Makefile b/package/nfs-utils/Makefile
new file mode 100644
index 000000000..cfbd4393c
--- /dev/null
+++ b/package/nfs-utils/Makefile
@@ -0,0 +1,77 @@
+# $Id$
+#-
+# This file is part of the OpenADK project. OpenADK is copyrighted
+# material, please see the LICENCE file in the top-level directory.
+
+include ${TOPDIR}/rules.mk
+
+PKG_NAME:= nfs-utils
+PKG_VERSION:= 1.1.6
+PKG_RELEASE:= 1
+PKG_MD5SUM:= b0d1b8ec5c8c081a340cfc77bb8670cd
+MASTER_SITES:= ${MASTER_SITE_SOURCEFORGE:=nfs/}
+DISTFILES:= ${PKG_NAME}-${PKG_VERSION}.tar.bz2
+
+include ${TOPDIR}/mk/package.mk
+
+$(eval $(call PKG_template,NFS_UTILS,nfs-utils,${PKG_VERSION}-${PKG_RELEASE},${ARCH}))
+
+PKG_DEPENDS:= portmap,
+CONFIGURE_STYLE= autotool gnu
+
+ifeq ($(ADK_COMPILE_NFS_UTILS_WITH_KRB5),y)
+CONFIGURE_ARGS+= --enable-nfsv4 \
+ --with-krb5-config=${STAGING_DIR}/usr/bin/krb5-config \
+ --enable-gss
+PKG_DEPENDS+= krb5-libs, libevent, libnfsidmap, librpcsecgss, libcom_err, libgssglue
+CONFIGURE_ENV+= LIBS="-lrpcsecgss"
+endif
+
+ifeq ($(ADK_COMPILE_NFS_UTILS_WITH_HEIMDAL),y)
+CONFIGURE_ARGS+= --enable-nfsv4 \
+ --with-krb5-config=${STAGING_DIR}/usr/bin/krb5-config \
+ --enable-gss
+PKG_DEPENDS+= heimdal-libs, libevent, libnfsidmap, librpcsecgss, libcom_err
+CONFIGURE_ENV+= LIBS="-lrpcsecgss"
+endif
+
+ifneq ($(ADK_COMPILE_NFS_UTILS_WITH_KERBEROS),y)
+CONFIGURE_ARGS+= --disable-nfsv4 \
+ --disable-gss
+endif
+
+CONFIGURE_ENV+= knfsd_cv_bsd_signals=no
+CONFIGURE_ARGS+= --without-tcp-wrappers \
+ --disable-uuid
+BUILD_STYLE= auto
+INSTALL_STYLE= auto
+TCPPFLAGS+= -I${LINUX_DIR}/include
+
+ifeq (${ADK_IPV6},y)
+PKG_DEPENDS+= , libtirpc
+CONFIGURE_ARGS+= --enable-tirpc \
+ --with-tirpcinclude=${STAGING_DIR}/usr/include/tirpc
+endif
+
+post-install:
+ ${INSTALL_DIR} ${IDIR_NFS_UTILS}/usr/sbin
+ ${INSTALL_DIR} ${IDIR_NFS_UTILS}/etc
+ ${INSTALL_DATA} ./files/rpc ${IDIR_NFS_UTILS}/etc
+ ${INSTALL_BIN} ${WRKBUILD}/utils/exportfs/exportfs ${IDIR_NFS_UTILS}/usr/sbin/
+ ${INSTALL_DIR} ${IDIR_NFS_UTILS}/etc/init.d
+ ${INSTALL_DIR} ${IDIR_NFS_UTILS}/usr/sbin
+ ${INSTALL_BIN} ./files/nfsd.init \
+ ${IDIR_NFS_UTILS}/etc/init.d/nfs-server
+ ${INSTALL_DATA} ./files/nfsd.exports ${IDIR_NFS_UTILS}/etc/exports
+ ${INSTALL_BIN} ${WRKBUILD}/utils/statd/statd ${IDIR_NFS_UTILS}/usr/sbin/
+ ${INSTALL_BIN} ${WRKBUILD}/utils/nfsd/nfsd ${IDIR_NFS_UTILS}/usr/sbin/
+ ${INSTALL_BIN} ${WRKBUILD}/utils/mountd/mountd ${IDIR_NFS_UTILS}/usr/sbin/
+ifeq ($(ADK_COMPILE_NFS_UTILS_WITH_KERBEROS),y)
+ ${INSTALL_DATA} ./files/idmapd.conf ${IDIR_NFS_UTILS}/etc
+ ${INSTALL_BIN} ${WRKBUILD}/utils/gssd/gssd ${IDIR_NFS_UTILS}/usr/sbin/
+ ${INSTALL_BIN} ${WRKBUILD}/utils/gssd/svcgssd ${IDIR_NFS_UTILS}/usr/sbin/
+ ${INSTALL_BIN} ${WRKBUILD}/utils/idmapd/idmapd ${IDIR_NFS_UTILS}/usr/sbin/
+endif
+ echo 'Depends: ${PKG_DEPENDS}' >>${IDIR_NFS_UTILS}/CONTROL/control
+
+include ${TOPDIR}/mk/pkg-bottom.mk
diff --git a/package/nfs-utils/files/idmapd.conf b/package/nfs-utils/files/idmapd.conf
new file mode 100644
index 000000000..a91c9e359
--- /dev/null
+++ b/package/nfs-utils/files/idmapd.conf
@@ -0,0 +1,14 @@
+[General]
+
+Verbosity = 0
+Pipefs-Directory = /var/lib/nfs/rpc_pipefs
+Domain = localdomain
+
+[Translation]
+
+Method = static
+
+[Mapping]
+
+Nobody-User = nobody
+Nobody-Group = nogroup
diff --git a/package/nfs-utils/files/nfsd.exports b/package/nfs-utils/files/nfsd.exports
new file mode 100644
index 000000000..a357a4d1f
--- /dev/null
+++ b/package/nfs-utils/files/nfsd.exports
@@ -0,0 +1,10 @@
+# on embedded devices with MTD you can _only_ export usb disks or sticks
+# for nfsv3
+#/mnt/usb *(ro,no_root_squash,insecure,no_subtree_check)
+# for nfsv4, do mount --bind /srv/music /nfs4/music and
+# set nfs_server_version 4 in /etc/rc.conf
+#/nfs4 hostname(rw,sync,fsid=0,crossmnt,no_subtree_check)
+#/nfs4/music hostname(rw,sync,no_subtree_check)
+# with kerberos based authentication, add krb5i for integrity and krb5p for privacy
+#/nfs4/music gss/krb5(rw,sync,no_subtree_check)
+
diff --git a/package/nfs-utils/files/nfsd.init b/package/nfs-utils/files/nfsd.init
new file mode 100644
index 000000000..8ce40e633
--- /dev/null
+++ b/package/nfs-utils/files/nfsd.init
@@ -0,0 +1,48 @@
+#!/bin/sh
+#FWINIT 70
+. /etc/rc.conf
+
+case $1 in
+autostop) ;;
+autostart)
+ test x"${portmap:-NO}" = x"NO" && exit 0
+ test x"${nfs_server:-NO}" = x"NO" && exit 0
+ exec sh $0 start
+ ;;
+start)
+ /bin/mkdir -p /var/lib/nfs/v4recovery
+ /bin/touch /var/lib/nfs/rmtab
+ /bin/touch /var/lib/nfs/etab
+ /bin/touch /var/lib/nfs/xtab
+ /bin/touch /var/lib/nfs/sm
+ chown nfs:nfs /var/lib/nfs/sm
+ /usr/sbin/exportfs -r
+ /usr/sbin/mountd
+ /usr/sbin/nfsd
+ /usr/sbin/statd
+ if [ ${nfs_server_version} -eq 4 ];then
+ mkdir -p /var/lib/nfs/rpc_pipefs
+ mount -t rpc_pipefs rpc_pipefs /var/lib/nfs/rpc_pipefs
+ /usr/sbin/idmapd
+ /usr/sbin/svcgssd
+ fi
+ ;;
+stop)
+ killall nfsd
+ killall mountd
+ killall statd
+ if [ ${nfs_server_version} -eq 4 ];then
+ killall idmapd
+ killall svcgssd
+ fi
+ ;;
+restart)
+ sh $0 stop
+ sh $0 start
+ ;;
+*)
+ echo "Usage: $0 {start | stop | restart}"
+ exit 1
+ ;;
+esac
+exit $?
diff --git a/package/nfs-utils/files/rpc b/package/nfs-utils/files/rpc
new file mode 100644
index 000000000..99a8693d7
--- /dev/null
+++ b/package/nfs-utils/files/rpc
@@ -0,0 +1,3 @@
+portmapper 100000 portmap sunrpc rpcbind
+nfs 100003 nfsprog
+mountd 100005 mount showmount
diff --git a/package/nfs-utils/ipkg/nfs-utils.control b/package/nfs-utils/ipkg/nfs-utils.control
new file mode 100644
index 000000000..f8c3f1f31
--- /dev/null
+++ b/package/nfs-utils/ipkg/nfs-utils.control
@@ -0,0 +1,4 @@
+Package: nfs-utils
+Section: net
+Priority: optional
+Description: Utilities for NFS kernel server
diff --git a/package/nfs-utils/ipkg/nfs-utils.postinst b/package/nfs-utils/ipkg/nfs-utils.postinst
new file mode 100644
index 000000000..bfb7481d0
--- /dev/null
+++ b/package/nfs-utils/ipkg/nfs-utils.postinst
@@ -0,0 +1,9 @@
+#!/bin/sh
+. $IPKG_INSTROOT/etc/functions.sh
+add_rcconf "kernel nfs server" nfs_server NO
+add_rcconf "kernel nfs server version" nfs_server_version 3
+add_service nfs 2049/tdp
+add_service nfs 2049/udp
+gid=$(get_next_gid)
+add_group nfs $gid
+add_user nfs $(get_next_uid) $gid /var/lib/nfs
diff --git a/package/nfs-utils/patches/patch-aclocal_kerberos5_m4 b/package/nfs-utils/patches/patch-aclocal_kerberos5_m4
new file mode 100644
index 000000000..1a5ca00ba
--- /dev/null
+++ b/package/nfs-utils/patches/patch-aclocal_kerberos5_m4
@@ -0,0 +1,138 @@
+$Id: update-patches 24 2008-08-31 14:56:13Z wbx $
+--- nfs-utils-1.1.4.orig/aclocal/kerberos5.m4 2008-10-17 16:20:09.000000000 +0200
++++ nfs-utils-1.1.4/aclocal/kerberos5.m4 2009-01-30 16:24:45.000000000 +0100
+@@ -1,112 +1,48 @@
+-dnl Checks for Kerberos
+-dnl NOTE: while we intend to do generic gss-api, currently we
+-dnl have a requirement to get an initial Kerberos machine
+-dnl credential. Thus, the requirement for Kerberos.
+-dnl The Kerberos gssapi library will be dynamically loaded?
+ AC_DEFUN([AC_KERBEROS_V5],[
++ K5CONFIG="krb5-config"
+ AC_MSG_CHECKING(for Kerberos v5)
+- AC_ARG_WITH(krb5,
+- [AC_HELP_STRING([--with-krb5=DIR], [use Kerberos v5 installation in DIR])],
++ AC_ARG_WITH(krb5-config,
++ [AC_HELP_STRING([--with-krb5-config=PATH], [Full Path to krb5-config.])],
+ [ case "$withval" in
+ yes|no)
+- krb5_with=""
++ K5CONFIG="krb5-config"
+ ;;
+ *)
+- krb5_with="$withval"
++ K5CONFIG="$withval"
+ ;;
+ esac ]
+ )
+
+- for dir in $krb5_with /usr /usr/kerberos /usr/local /usr/local/krb5 \
+- /usr/krb5 /usr/heimdal /usr/local/heimdal /usr/athena ; do
+- dnl This ugly hack brought on by the split installation of
+- dnl MIT Kerberos on Fedora Core 1
+- K5CONFIG=""
+- if test -f $dir/bin/krb5-config; then
+- K5CONFIG=$dir/bin/krb5-config
+- elif test -f "/usr/kerberos/bin/krb5-config"; then
+- K5CONFIG="/usr/kerberos/bin/krb5-config"
+- elif test -f "/usr/lib/mit/bin/krb5-config"; then
+- K5CONFIG="/usr/lib/mit/bin/krb5-config"
+- fi
+ if test "$K5CONFIG" != ""; then
+ KRBCFLAGS=`$K5CONFIG --cflags`
+ KRBLIBS=`$K5CONFIG --libs gssapi`
+- K5VERS=`$K5CONFIG --version | head -n 1 | awk '{split($(4),v,"."); if (v@<:@"3"@:>@ == "") v@<:@"3"@:>@ = "0"; print v@<:@"1"@:>@v@<:@"2"@:>@v@<:@"3"@:>@ }'`
+- AC_DEFINE_UNQUOTED(KRB5_VERSION, $K5VERS, [Define this as the Kerberos version number])
+- if test -f $dir/include/gssapi/gssapi_krb5.h -a \
+- \( -f $dir/lib/libgssapi_krb5.a -o \
+- -f $dir/lib64/libgssapi_krb5.a -o \
+- -f $dir/lib64/libgssapi_krb5.so -o \
+- -f $dir/lib/libgssapi_krb5.so \) ; then
++ if $K5CONFIG --version | grep -q -e heimdal; then
++ K5VERS=`$K5CONFIG --version | head -n 1 | cut -f2 -d ' ' | tr -d '.'`
++ AC_DEFINE(HAVE_HEIMDAL, 1, [Define this if you have Heimdal Kerberos libraries])
++ gssapi_lib=gssapi
++ KRBIMPL="heimdal"
++ elif $K5CONFIG --version | grep -q -e Kerberos; then
++ K5VERS=`$K5CONFIG --version | head -n 1 | cut -f4 -d ' ' | tr -d '.'`
+ AC_DEFINE(HAVE_KRB5, 1, [Define this if you have MIT Kerberos libraries])
+- KRBDIR="$dir"
+- dnl If we are using MIT K5 1.3.1 and before, we *MUST* use the
+- dnl private function (gss_krb5_ccache_name) to get correct
+- dnl behavior of changing the ccache used by gssapi.
+- dnl Starting in 1.3.2, we *DO NOT* want to use
+- dnl gss_krb5_ccache_name, instead we want to set KRB5CCNAME
+- dnl to get gssapi to use a different ccache
+ if test $K5VERS -le 131; then
+ AC_DEFINE(USE_GSS_KRB5_CCACHE_NAME, 1, [Define this if the private function, gss_krb5_cache_name, must be used to tell the Kerberos library which credentials cache to use. Otherwise, this is done by setting the KRB5CCNAME environment variable])
+ fi
+ gssapi_lib=gssapi_krb5
+- break
+- dnl The following ugly hack brought on by the split installation
+- dnl of Heimdal Kerberos on SuSe
+- elif test \( -f $dir/include/heim_err.h -o\
+- -f $dir/include/heimdal/heim_err.h \) -a \
+- -f $dir/lib/libroken.a; then
+- AC_DEFINE(HAVE_HEIMDAL, 1, [Define this if you have Heimdal Kerberos libraries])
+- KRBDIR="$dir"
+- gssapi_lib=gssapi
+- break
+- fi
+- fi
+- done
+- dnl We didn't find a usable Kerberos environment
+- if test "x$KRBDIR" = "x"; then
+- if test "x$krb5_with" = "x"; then
+- AC_MSG_ERROR(Kerberos v5 with GSS support not found: consider --disable-gss or --with-krb5=)
++ KRBIMPL="mit-krb5"
+ else
+- AC_MSG_ERROR(Kerberos v5 with GSS support not found at $krb5_with)
+- fi
++ AC_MSG_ERROR(Unknown Kerberos 5 Implementation. Is neither heimdal or mit-krb5.)
++ KRBIMPL="unknown"
+ fi
+- AC_MSG_RESULT($KRBDIR)
+-
+- dnl Check if -rpath=$(KRBDIR)/lib is needed
+- echo "The current KRBDIR is $KRBDIR"
+- if test "$KRBDIR/lib" = "/lib" -o "$KRBDIR/lib" = "/usr/lib" \
+- -o "$KRBDIR/lib" = "//lib" -o "$KRBDIR/lib" = "/usr//lib" ; then
+- KRBLDFLAGS="";
+- elif /sbin/ldconfig -p | grep > /dev/null "=> $KRBDIR/lib/"; then
+- KRBLDFLAGS="";
+- else
+- KRBLDFLAGS="-Wl,-rpath=$KRBDIR/lib"
++ AC_DEFINE_UNQUOTED(KRB5_VERSION, $K5VERS, [Define this as the Kerberos version number])
+ fi
++ AC_MSG_RESULT($KRBIMPL)
+
+- dnl Now check for functions within gssapi library
+- AC_CHECK_LIB($gssapi_lib, gss_krb5_export_lucid_sec_context,
+- AC_DEFINE(HAVE_LUCID_CONTEXT_SUPPORT, 1, [Define this if the Kerberos GSS library supports gss_krb5_export_lucid_sec_context]), ,$KRBLIBS)
+- AC_CHECK_LIB($gssapi_lib, gss_krb5_set_allowable_enctypes,
+- AC_DEFINE(HAVE_SET_ALLOWABLE_ENCTYPES, 1, [Define this if the Kerberos GSS library supports gss_krb5_set_allowable_enctypes]), ,$KRBLIBS)
+- AC_CHECK_LIB($gssapi_lib, gss_krb5_ccache_name,
+- AC_DEFINE(HAVE_GSS_KRB5_CCACHE_NAME, 1, [Define this if the Kerberos GSS library supports gss_krb5_ccache_name]), ,$KRBLIBS)
+-
+- dnl Check for newer error message facility
+- AC_CHECK_LIB($gssapi_lib, krb5_get_error_message,
+- AC_DEFINE(HAVE_KRB5_GET_ERROR_MESSAGE, 1, [Define this if the function krb5_get_error_message is available]), ,$KRBLIBS)
+-
+- dnl Check for function to specify addressless tickets
+- AC_CHECK_LIB($gssapi_lib, krb5_get_init_creds_opt_set_addressless,
+- AC_DEFINE(HAVE_KRB5_GET_INIT_CREDS_OPT_SET_ADDRESSLESS, 1, [Define this if the function krb5_get_init_creds_opt_set_addressless is available]), ,$KRBLIBS)
+-
+- dnl If they specified a directory and it didn't work, give them a warning
+- if test "x$krb5_with" != "x" -a "$krb5_with" != "$KRBDIR"; then
+- AC_MSG_WARN(Using $KRBDIR instead of requested value of $krb5_with for Kerberos!)
+- fi
++ AC_CHECK_LIB($gssapi_lib, gss_krb5_export_lucid_sec_context, AC_DEFINE(HAVE_LUCID_CONTEXT_SUPPORT, 1, [Define this if the Kerberos GSS library supports gss_krb5_export_lucid_sec_context]), ,$KRBLIBS)
++ AC_CHECK_LIB($gssapi_lib, gss_krb5_set_allowable_enctypes, AC_DEFINE(HAVE_SET_ALLOWABLE_ENCTYPES, 1, [Define this if the Kerberos GSS library supports gss_krb5_set_allowable_enctypes]), ,$KRBLIBS)
++ AC_CHECK_LIB($gssapi_lib, gss_krb5_ccache_name, AC_DEFINE(HAVE_GSS_KRB5_CCACHE_NAME, 1, [Define this if the Kerberos GSS library supports gss_krb5_ccache_name]), ,$KRBLIBS)
++ AC_CHECK_LIB($gssapi_lib, krb5_get_error_message, AC_DEFINE(HAVE_KRB5_GET_ERROR_MESSAGE, 1, [Define this if the function krb5_get_error_message is available]), ,$KRBLIBS)
++ AC_CHECK_LIB($gssapi_lib, krb5_get_init_creds_opt_set_addressless, AC_DEFINE(HAVE_KRB5_GET_INIT_CREDS_OPT_SET_ADDRESSLESS, 1, [Define this if the function krb5_get_init_creds_opt_set_addressless is available]), ,$KRBLIBS)
+
+- AC_SUBST([KRBDIR])
+ AC_SUBST([KRBLIBS])
+ AC_SUBST([KRBCFLAGS])
+ AC_SUBST([KRBLDFLAGS])
diff --git a/package/nfs-utils/patches/patch-support_nfs_nfs_mntent_c b/package/nfs-utils/patches/patch-support_nfs_nfs_mntent_c
new file mode 100644
index 000000000..5097e0cf0
--- /dev/null
+++ b/package/nfs-utils/patches/patch-support_nfs_nfs_mntent_c
@@ -0,0 +1,30 @@
+$Id: update-patches 24 2008-08-31 14:56:13Z wbx $
+--- nfs-utils-1.1.3.orig/support/nfs/nfs_mntent.c 2008-07-27 23:01:45.000000000 +0200
++++ nfs-utils-1.1.3/support/nfs/nfs_mntent.c 2008-10-06 16:53:17.000000000 +0200
+@@ -9,7 +9,7 @@
+ */
+
+ #include <stdio.h>
+-#include <string.h> /* for index */
++#include <string.h> /* for strchr */
+ #include <ctype.h> /* for isdigit */
+ #include <sys/stat.h> /* for umask */
+
+@@ -163,7 +163,7 @@ nfs_getmntent (mntFILE *mfp) {
+ return NULL;
+
+ mfp->mntent_lineno++;
+- s = index (buf, '\n');
++ s = strchr (buf, '\n');
+ if (s == NULL) {
+ /* Missing final newline? Otherwise extremely */
+ /* long line - assume file was corrupted */
+@@ -171,7 +171,7 @@ nfs_getmntent (mntFILE *mfp) {
+ fprintf(stderr, _("[mntent]: warning: no final "
+ "newline at the end of %s\n"),
+ mfp->mntent_file);
+- s = index (buf, 0);
++ s = strchr (buf, 0);
+ } else {
+ mfp->mntent_errs = 1;
+ goto err;
diff --git a/package/nfs-utils/patches/patch-tools_Makefile_am b/package/nfs-utils/patches/patch-tools_Makefile_am
new file mode 100644
index 000000000..073486f8d
--- /dev/null
+++ b/package/nfs-utils/patches/patch-tools_Makefile_am
@@ -0,0 +1,11 @@
+$Id: update-patches 24 2008-08-31 14:56:13Z wbx $
+--- nfs-utils-1.1.4.orig/tools/Makefile.am 2008-10-17 16:20:09.000000000 +0200
++++ nfs-utils-1.1.4/tools/Makefile.am 2009-01-03 14:12:09.000000000 +0100
+@@ -6,6 +6,6 @@ if CONFIG_RPCGEN
+ OPTDIRS += rpcgen
+ endif
+
+-SUBDIRS = locktest rpcdebug nlmtest $(OPTDIRS)
++SUBDIRS = $(OPTDIRS)
+
+ MAINTAINERCLEANFILES = Makefile.in
diff --git a/package/nfs-utils/patches/patch-tools_Makefile_in b/package/nfs-utils/patches/patch-tools_Makefile_in
new file mode 100644
index 000000000..ef12d1e52
--- /dev/null
+++ b/package/nfs-utils/patches/patch-tools_Makefile_in
@@ -0,0 +1,21 @@
+$Id$
+--- nfs-utils-1.1.4.orig/tools/Makefile.in 2008-10-17 16:23:52.000000000 +0200
++++ nfs-utils-1.1.4/tools/Makefile.in 2009-01-03 13:46:50.000000000 +0100
+@@ -59,7 +59,7 @@ RECURSIVE_CLEAN_TARGETS = mostlyclean-re
+ distclean-recursive maintainer-clean-recursive
+ ETAGS = etags
+ CTAGS = ctags
+-DIST_SUBDIRS = locktest rpcdebug nlmtest rpcgen
++DIST_SUBDIRS = rpcgen
+ DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+ ACLOCAL = @ACLOCAL@
+ ACLOCAL_AMFLAGS = @ACLOCAL_AMFLAGS@
+@@ -210,7 +210,7 @@ target_alias = @target_alias@
+ top_builddir = @top_builddir@
+ top_srcdir = @top_srcdir@
+ OPTDIRS = $(am__append_1)
+-SUBDIRS = locktest rpcdebug nlmtest $(OPTDIRS)
++SUBDIRS = $(OPTDIRS)
+ MAINTAINERCLEANFILES = Makefile.in
+ all: all-recursive
+
diff --git a/package/nfs-utils/patches/patch-utils_mount_error_c b/package/nfs-utils/patches/patch-utils_mount_error_c
new file mode 100644
index 000000000..ab4590270
--- /dev/null
+++ b/package/nfs-utils/patches/patch-utils_mount_error_c
@@ -0,0 +1,12 @@
+$Id: update-patches 24 2008-08-31 14:56:13Z wbx $
+--- nfs-utils-1.1.3.orig/utils/mount/error.c 2008-07-27 23:01:45.000000000 +0200
++++ nfs-utils-1.1.3/utils/mount/error.c 2008-10-06 16:58:40.000000000 +0200
+@@ -62,7 +62,7 @@ static int rpc_strerror(int spos)
+ char *tmp;
+
+ if (estr) {
+- if ((ptr = index(estr, ':')))
++ if ((ptr = strchr(estr, ':')))
+ estr = ++ptr;
+
+ tmp = &errbuf[spos];
diff --git a/package/nfs-utils/patches/patch-utils_mountd_cache_c b/package/nfs-utils/patches/patch-utils_mountd_cache_c
new file mode 100644
index 000000000..5f46d3116
--- /dev/null
+++ b/package/nfs-utils/patches/patch-utils_mountd_cache_c
@@ -0,0 +1,75 @@
+$Id: update-patches 24 2008-08-31 14:56:13Z wbx $
+--- nfs-utils-1.1.4.orig/utils/mountd/cache.c 2008-10-17 16:20:09.000000000 +0200
++++ nfs-utils-1.1.4/utils/mountd/cache.c 2009-01-03 13:48:33.000000000 +0100
+@@ -118,54 +118,6 @@ void auth_unix_ip(FILE *f)
+ free(he);
+ }
+
+-void auth_unix_gid(FILE *f)
+-{
+- /* Request are
+- * uid
+- * reply is
+- * uid expiry count list of group ids
+- */
+- int uid;
+- struct passwd *pw;
+- gid_t glist[100], *groups = glist;
+- int ngroups = 100;
+- int rv, i;
+- char *cp;
+-
+- if (readline(fileno(f), &lbuf, &lbuflen) != 1)
+- return;
+-
+- cp = lbuf;
+- if (qword_get_int(&cp, &uid) != 0)
+- return;
+-
+- 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);
+- }
+- }
+- qword_printint(f, uid);
+- qword_printint(f, time(0)+30*60);
+- if (rv >= 0) {
+- qword_printint(f, ngroups);
+- for (i=0; i<ngroups; i++)
+- qword_printint(f, groups[i]);
+- } else
+- qword_printint(f, 0);
+- qword_eol(f);
+-
+- if (groups != glist)
+- free(groups);
+-}
+
+ #if USE_BLKID
+ static const char *get_uuid_blkdev(char *path)
+@@ -730,7 +682,6 @@ struct {
+ FILE *f;
+ } cachelist[] = {
+ { "auth.unix.ip", auth_unix_ip},
+- { "auth.unix.gid", auth_unix_gid},
+ { "nfsd.export", nfsd_export},
+ { "nfsd.fh", nfsd_fh},
+ { NULL, NULL }
+@@ -742,8 +693,6 @@ void cache_open(void)
+ int i;
+ for (i=0; cachelist[i].cache_name; i++ ) {
+ char path[100];
+- if (!manage_gids && cachelist[i].cache_handle == auth_unix_gid)
+- continue;
+ sprintf(path, "/proc/net/rpc/%s/channel", cachelist[i].cache_name);
+ cachelist[i].f = fopen(path, "r+");
+ }
diff --git a/package/nfs-utils/patches/patch-utils_mountd_fsloc_c b/package/nfs-utils/patches/patch-utils_mountd_fsloc_c
new file mode 100644
index 000000000..61e42a7c6
--- /dev/null
+++ b/package/nfs-utils/patches/patch-utils_mountd_fsloc_c
@@ -0,0 +1,12 @@
+$Id: update-patches 24 2008-08-31 14:56:13Z wbx $
+--- nfs-utils-1.1.3.orig/utils/mountd/fsloc.c 2008-07-27 23:01:45.000000000 +0200
++++ nfs-utils-1.1.3/utils/mountd/fsloc.c 2008-10-06 16:46:49.000000000 +0200
+@@ -126,7 +126,7 @@ static struct servers *method_list(char
+ struct servers *rv=NULL;
+
+ xlog(L_NOTICE, "method_list(%s)\n", data);
+- for (ptr--, listsize=1; ptr; ptr=index(ptr, ':'), listsize++)
++ for (ptr--, listsize=1; ptr; ptr=strchr(ptr, ':'), listsize++)
+ ptr++;
+ list = malloc(listsize * sizeof(char *));
+ copy = strdup(data);