Update to the latest RC release: nfs-utils-1.2.6-rc7

Signed-off-by: Steve Dickson <steved@redhat.com>
This commit is contained in:
Steve Dickson 2012-05-03 15:23:17 -04:00
parent 76f08567aa
commit 2eff033677
7 changed files with 4198 additions and 248 deletions

View File

@ -1,52 +0,0 @@
mount.nfs: Do not send pmap inquire when port is specified
When the port is specified on the command line do not
send a pmap inquire asking for the port. Instead use
the given port in the NFS ping. If the ping fails,
assume a bad port was given and now go ask the server
for the correct port.
Signed-off-by: Steve Dickson <steved@redhat.com>
diff --git a/utils/mount/network.c b/utils/mount/network.c
index d1f91dc..405c320 100644
--- a/utils/mount/network.c
+++ b/utils/mount/network.c
@@ -545,17 +545,18 @@ static int nfs_probe_port(const struct sockaddr *sap, const socklen_t salen,
const unsigned int prot = (u_int)pmap->pm_prot, *p_prot;
const u_short port = (u_short) pmap->pm_port;
unsigned long vers = pmap->pm_vers;
- unsigned short p_port;
+ unsigned short p_port = port;
+ int once = 1;
memcpy(saddr, sap, salen);
p_prot = prot ? &prot : protos;
p_vers = vers ? &vers : versions;
-
for (;;) {
if (verbose)
printf(_("%s: prog %lu, trying vers=%lu, prot=%u\n"),
progname, prog, *p_vers, *p_prot);
- p_port = nfs_getport(saddr, salen, prog, *p_vers, *p_prot);
+ if (!p_port)
+ p_port = nfs_getport(saddr, salen, prog, *p_vers, *p_prot);
if (p_port) {
if (!port || port == p_port) {
nfs_set_port(saddr, p_port);
@@ -564,6 +565,15 @@ static int nfs_probe_port(const struct sockaddr *sap, const socklen_t salen,
if (nfs_rpc_ping(saddr, salen, prog,
*p_vers, *p_prot, NULL))
goto out_ok;
+ if (port == p_port && once) {
+ /*
+ * Could be a bad port was specified. This
+ * time ask the server for the port but only
+ * do it once.
+ */
+ p_port = once = 0;
+ continue;
+ }
} else
rpc_createerr.cf_stat = RPC_PROGNOTREGISTERED;
}

View File

@ -1,26 +0,0 @@
commit 880e2efecb4469573a5c2e89aee4963f29288f88
Author: Steve Dickson <steved@redhat.com>
Date: Thu Jan 26 14:56:13 2012 -0500
rpc.gssd: Links directly with libgssapi_krb5 which not needed.
rpc.gssd and rpc.svcgssd both link with the libgssapi_krb5 and
libgssglue libraries which is not needed since libgssglue
will dynamically load the gssapi interface defined in the
/etc/gssapi_mech.conf. Most likely the libgssapi_krb5 library.
Signed-off-by: Steve Dickson <steved@redhat.com>
diff --git a/aclocal/kerberos5.m4 b/aclocal/kerberos5.m4
index dfa5738..7574e2d 100644
--- a/aclocal/kerberos5.m4
+++ b/aclocal/kerberos5.m4
@@ -31,7 +31,7 @@ AC_DEFUN([AC_KERBEROS_V5],[
fi
if test "$K5CONFIG" != ""; then
KRBCFLAGS=`$K5CONFIG --cflags`
- KRBLIBS=`$K5CONFIG --libs gssapi`
+ KRBLIBS=`$K5CONFIG --libs`
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 \

View File

@ -1,96 +0,0 @@
commit 245fad6be5a32866b2cefad55b3e2d50f6b197af
Author: Steve Dickson <steved@redhat.com>
Date: Thu Mar 22 11:02:46 2012 -0400
gssd: Look for user creds in user defined directory
The user credential cache currently is kept in /tmp.
In upcoming Kerberos release that will be moved to
/run/user/<username>/. This patch enables gssd to
look in both the old and new caches
Signed-off-by: Steve Dickson <steved@redhat.com>
diff -up nfs-utils-1.2.5/utils/gssd/gssd.c.orig nfs-utils-1.2.5/utils/gssd/gssd.c
--- nfs-utils-1.2.5/utils/gssd/gssd.c.orig 2011-09-24 07:55:15.000000000 -0400
+++ nfs-utils-1.2.5/utils/gssd/gssd.c 2012-03-22 11:12:47.441219000 -0400
@@ -57,7 +57,7 @@
char pipefs_dir[PATH_MAX] = GSSD_PIPEFS_DIR;
char keytabfile[PATH_MAX] = GSSD_DEFAULT_KEYTAB_FILE;
-char ccachedir[PATH_MAX] = GSSD_DEFAULT_CRED_DIR;
+char ccachedir[PATH_MAX] = GSSD_DEFAULT_CRED_DIR ":" GSSD_USER_CRED_DIR;
char *ccachesearch[GSSD_MAX_CCACHE_SEARCH + 1];
int use_memcache = 0;
int root_uses_machine_creds = 1;
diff -up nfs-utils-1.2.5/utils/gssd/gssd.h.orig nfs-utils-1.2.5/utils/gssd/gssd.h
--- nfs-utils-1.2.5/utils/gssd/gssd.h.orig 2011-09-24 07:55:15.000000000 -0400
+++ nfs-utils-1.2.5/utils/gssd/gssd.h 2012-03-22 11:12:47.447222000 -0400
@@ -45,6 +45,7 @@
#define DNOTIFY_SIGNAL (SIGRTMIN + 3)
#define GSSD_DEFAULT_CRED_DIR "/tmp"
+#define GSSD_USER_CRED_DIR "/run/user"
#define GSSD_DEFAULT_CRED_PREFIX "krb5cc_"
#define GSSD_DEFAULT_MACHINE_CRED_SUFFIX "machine"
#define GSSD_DEFAULT_KEYTAB_FILE "/etc/krb5.keytab"
diff -up nfs-utils-1.2.5/utils/gssd/gssd_proc.c.orig nfs-utils-1.2.5/utils/gssd/gssd_proc.c
--- nfs-utils-1.2.5/utils/gssd/gssd_proc.c.orig 2011-09-24 07:55:15.000000000 -0400
+++ nfs-utils-1.2.5/utils/gssd/gssd_proc.c 2012-03-22 11:12:47.455220000 -0400
@@ -949,6 +949,23 @@ int create_auth_rpc_client(struct clnt_i
goto out;
}
+static char *
+user_cachedir(char *dirname, uid_t uid)
+{
+ struct passwd *pw;
+ char *ptr;
+
+ if ((pw = getpwuid(uid)) == NULL) {
+ printerr(0, "user_cachedir: Failed to find '%d' uid"
+ " for cache directory\n");
+ return NULL;
+ }
+ ptr = malloc(strlen(dirname)+strlen(pw->pw_name)+2);
+ if (ptr)
+ sprintf(ptr, "%s/%s", dirname, pw->pw_name);
+
+ return ptr;
+}
/*
* this code uses the userland rpcsec gss library to create a krb5
* context on behalf of the kernel
@@ -963,7 +980,7 @@ process_krb5_upcall(struct clnt_info *cl
gss_buffer_desc token;
char **credlist = NULL;
char **ccname;
- char **dirname;
+ char **dirname, *dir, *userdir;
int create_resp = -1;
int err, downcall_err = -EACCES;
@@ -1006,7 +1023,22 @@ process_krb5_upcall(struct clnt_info *cl
service == NULL)) {
/* Tell krb5 gss which credentials cache to use */
for (dirname = ccachesearch; *dirname != NULL; dirname++) {
- err = gssd_setup_krb5_user_gss_ccache(uid, clp->servername, *dirname);
+ /* See if the user name is needed */
+ if (strncmp(*dirname, GSSD_USER_CRED_DIR,
+ strlen(GSSD_USER_CRED_DIR)) == 0) {
+ userdir = user_cachedir(*dirname, uid);
+ if (userdir == NULL)
+ continue;
+ dir = userdir;
+ } else
+ dir = *dirname;
+
+ err = gssd_setup_krb5_user_gss_ccache(uid, clp->servername, dir);
+
+ if (userdir) {
+ free(userdir);
+ userdir = NULL;
+ }
if (err == -EKEYEXPIRED)
downcall_err = -EKEYEXPIRED;
else if (!err)

View File

@ -1,26 +0,0 @@
commit 3ce15aeaa66a2f523c6fa92bfe818734bdedfcea
Author: Noah Friedman <friedman@splode.com>
Date: Thu Mar 15 12:52:50 2012 -0400
rpc.idmap: Hide global symbols from libidmap plugins
This patch limits the visibility of the symbols in the nfs-utils
conffile.c so that they are only visible to programs linked directly to
it. This forces the objects dynamically loaded via libnfsidmap to use
the functions defined in that shared library instead.
Signed-off-by: Steve Dickson <steved@redhat.com>
diff --git a/support/nfs/conffile.c b/support/nfs/conffile.c
index 2f1e235..5015e94 100644
--- a/support/nfs/conffile.c
+++ b/support/nfs/conffile.c
@@ -49,6 +49,8 @@
#include "conffile.h"
#include "xlog.h"
+#pragma GCC visibility push(hidden)
+
static void conf_load_defaults(void);
static int conf_set(int , char *, char *, char *,
char *, int , int );

View File

@ -1,36 +0,0 @@
commit 5397edac120350bd5fd8284819c1a900cb41546c
Author: Steve Dickson <steved@redhat.com>
Date: Fri Mar 16 09:34:43 2012 -0400
nfsd: Bump up the default to 8 nprocs
When the nproc argument is not given the rpc.nfsd
a default number of processes is created. This
patch bumps that default up from 1 to 8.
Signed-off-by: Steve Dickson <steved@redhat.com>
diff --git a/utils/nfsd/nfsd.c b/utils/nfsd/nfsd.c
index 8bc5d3a..2a3f5cc 100644
--- a/utils/nfsd/nfsd.c
+++ b/utils/nfsd/nfsd.c
@@ -27,6 +27,10 @@
#include "nfssvc.h"
#include "xlog.h"
+#ifndef NFSD_NPROC
+#define NFSD_NPROC 8
+#endif
+
static void usage(const char *);
static struct option longopts[] =
@@ -90,7 +94,7 @@ nfsd_enable_protos(unsigned int *proto4, unsigned int *proto6)
int
main(int argc, char **argv)
{
- int count = 1, c, error = 0, portnum = 0, fd, found_one;
+ int count = NFSD_NPROC, c, error = 0, portnum = 0, fd, found_one;
char *p, *progname, *port;
char *haddr = NULL;
int socket_up = 0;

4192
nfs-utils-1.2.6-rc7.patch Normal file

File diff suppressed because it is too large Load Diff

View File

@ -2,7 +2,7 @@ Summary: NFS utilities and supporting clients and daemons for the kernel NFS ser
Name: nfs-utils
URL: http://sourceforge.net/projects/nfs
Version: 1.2.5
Release: 15%{?dist}
Release: 16%{?dist}
Epoch: 1
# group all 32bit related archs
@ -30,12 +30,7 @@ Source52: nfs-server.postconfig
Source60: nfs4-modalias.conf
Patch001: nfs-utils-1.2.6-rc6.patch
Patch002: nfs-utils-1.2.4-mountshortcut.patch
Patch003: nfs-utils-1.2.5-libidmap-hide-syms.patch
Patch004: nfs-utils-1.2.5-nfsd-new-default.patch
Patch005: nfs-utils-1.2.5-gssd-usercreds.patch
Patch006: nfs-utils-1.2.5-gssd-nolibgssapi-krb5.patch
Patch001: nfs-utils-1.2.6-rc7.patch
Patch100: nfs-utils-1.2.1-statdpath-man.patch
Patch101: nfs-utils-1.2.1-exp-subtree-warn-off.patch
@ -93,11 +88,6 @@ This package also contains the mount.nfs and umount.nfs program.
%setup -q
%patch001 -p1
%patch002 -p1
%patch003 -p1
%patch004 -p1
%patch005 -p1
%patch006 -p1
%patch100 -p1
%patch101 -p1
@ -262,6 +252,7 @@ fi
%doc linux-nfs/ChangeLog linux-nfs/KNOWNBUGS linux-nfs/NEW linux-nfs/README
%doc linux-nfs/THANKS linux-nfs/TODO
/sbin/rpc.statd
/sbin/osd_login
/usr/sbin/exportfs
/usr/sbin/nfsstat
/usr/sbin/rpcdebug
@ -290,6 +281,9 @@ fi
%attr(4755,root,root) /sbin/umount.nfs4
%changelog
* Thu May 3 2012 Steve Dickson <steved@redhat.com> 1.2.5-16
- Update to the latest RC release: nfs-utils-1.2.6-rc7
* Thu Apr 26 2012 Josh Boyer <jwboyer@redhat.com> 1.2.5-15
- Add modprobe config file to alias 'nfs4' to 'nfs' (bz 806333)