summaryrefslogtreecommitdiff
path: root/package/nfs-utils/patches
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/patches
Initial import
Diffstat (limited to 'package/nfs-utils/patches')
-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
7 files changed, 299 insertions, 0 deletions
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);