diff --git a/nfs-utils-1.1.1-gssd-mcred.patch b/nfs-utils-1.1.1-gssd-mcred.patch new file mode 100644 index 0000000..7472f7c --- /dev/null +++ b/nfs-utils-1.1.1-gssd-mcred.patch @@ -0,0 +1,23 @@ +commit 46d439b17f22216ce8f9257a982c6ade5d1c5931 +Author: Vince Busam +Date: Tue Feb 26 13:04:52 2008 -0500 + + Stop gssd from ignoring the machine credential cache + defined by the -d flag + + Signed-off-by: Steve Dickson + Signed-off-by: Kevin Coffman + +diff --git a/utils/gssd/krb5_util.c b/utils/gssd/krb5_util.c +index bf8690e..3cf27ca 100644 +--- a/utils/gssd/krb5_util.c ++++ b/utils/gssd/krb5_util.c +@@ -404,7 +404,7 @@ gssd_get_single_krb5_cred(krb5_context context, + cache_type = "FILE"; + snprintf(cc_name, sizeof(cc_name), "%s:%s/%s%s_%s", + cache_type, +- GSSD_DEFAULT_CRED_DIR, GSSD_DEFAULT_CRED_PREFIX, ++ ccachedir, GSSD_DEFAULT_CRED_PREFIX, + GSSD_DEFAULT_MACHINE_CRED_SUFFIX, ple->realm); + ple->endtime = my_creds.times.endtime; + if (ple->ccname != NULL) diff --git a/nfs-utils-1.1.1-idmapd-validasc.patch b/nfs-utils-1.1.1-idmapd-validasc.patch new file mode 100644 index 0000000..a0dae51 --- /dev/null +++ b/nfs-utils-1.1.1-idmapd-validasc.patch @@ -0,0 +1,28 @@ +commit bcd0fcaf0966c546da5043be700587f73174ae25 +Author: NeilBrown +Date: Tue Feb 26 13:57:39 2008 -0500 + + If validateascii is passed a string containing only non-zero 7bit + values, then the loop with exit with i == len, and the following + test will access beyond the end of the array. + + So add an extra test to fix this. + + Found by Marcus Meissner . + + Signed-off-by: NeilBrown + Signed-off-by: Steve Dickson + +diff --git a/utils/idmapd/idmapd.c b/utils/idmapd/idmapd.c +index 355c6e1..6b5971c 100644 +--- a/utils/idmapd/idmapd.c ++++ b/utils/idmapd/idmapd.c +@@ -848,7 +848,7 @@ validateascii(char *string, u_int32_t len) + return (-1); + } + +- if (string[i] != '\0') ++ if ((i >= len) || string[i] != '\0') + return (-1); + + return (i + 1); diff --git a/nfs-utils-1.1.1-mountd-crossmnt-cleanup.patch b/nfs-utils-1.1.1-mountd-crossmnt-cleanup.patch new file mode 100644 index 0000000..432794f --- /dev/null +++ b/nfs-utils-1.1.1-mountd-crossmnt-cleanup.patch @@ -0,0 +1,47 @@ +commit 7a817c45eaeb6aa93fdb5ca4d81c363b4e4218f0 +Author: Frank Filz +Date: Sat Feb 9 07:48:48 2008 -0500 + + Cleaned up some typos that were found in the various + places in the mountd code. + + Signed-off-by: Steve Dickson + Signed-off-by: Frank Filz + +diff -up nfs-utils-1.1.1/utils/mountd/cache.c.orig nfs-utils-1.1.1/utils/mountd/cache.c +--- nfs-utils-1.1.1/utils/mountd/cache.c.orig 2008-02-09 09:52:40.000000000 -0500 ++++ nfs-utils-1.1.1/utils/mountd/cache.c 2008-02-09 09:53:45.000000000 -0500 +@@ -111,7 +111,7 @@ void auth_unix_ip(FILE *f) + else if (client) + qword_print(f, *client?client:"DEFAULT"); + qword_eol(f); +- xlog(D_CALL, "auth_unix_ip: client %p '%s'", client, *client?client: "DEFAULT"); ++ xlog(D_CALL, "auth_unix_ip: client %p '%s'", client, client?client: "DEFAULT"); + + if (client) free(client); + free(he); +@@ -516,8 +516,10 @@ void nfsd_fh(FILE *f) + qword_print(f, found->e_path); + qword_eol(f); + out: +- free(found_path); +- free(he); ++ if (found_path) ++ free(found_path); ++ if (he) ++ free(he); + free(dom); + xlog(D_CALL, "nfsd_fh: found %p path %s", found, found ? found->e_path : NULL); + return; +@@ -667,9 +669,9 @@ void nfsd_export(FILE *f) + } + /* If one is a CROSSMOUNT, then prefer the longest path */ + if (((found->m_export.e_flags & NFSEXP_CROSSMOUNT) || +- (found->m_export.e_flags & NFSEXP_CROSSMOUNT)) && ++ (exp->m_export.e_flags & NFSEXP_CROSSMOUNT)) && + strlen(found->m_export.e_path) != +- strlen(found->m_export.e_path)) { ++ strlen(exp->m_export.e_path)) { + + if (strlen(exp->m_export.e_path) > + strlen(found->m_export.e_path)) { diff --git a/nfs-utils-1.1.1-mountd-crossmnt.patch b/nfs-utils-1.1.1-mountd-crossmnt.patch new file mode 100644 index 0000000..4e7a93a --- /dev/null +++ b/nfs-utils-1.1.1-mountd-crossmnt.patch @@ -0,0 +1,45 @@ +commit 2d77e3a27b7b211f303fcc3a813a044838dad970 +Author: Steve Dickson +Date: Sat Jan 19 07:59:26 2008 -0500 + + Fix bug when both crossmnt and fsid are set. + + When exported a filesystems with option inherited (by the crossmnt + option) from a higherlevel filesystem, ignore filesystem specific + options like FSID and explicit UUID. + + Signed-off-by: NeilBrown + Signed-off-by: Steve Dickson + +diff -up nfs-utils-1.1.1/utils/mountd/cache.c.orig nfs-utils-1.1.1/utils/mountd/cache.c +--- nfs-utils-1.1.1/utils/mountd/cache.c.orig 2008-01-22 14:15:12.000000000 -0500 ++++ nfs-utils-1.1.1/utils/mountd/cache.c 2008-01-22 14:16:48.000000000 -0500 +@@ -571,20 +571,25 @@ static int dump_to_cache(FILE *f, char * + qword_print(f, path); + qword_printint(f, time(0)+30*60); + if (exp) { +- qword_printint(f, exp->e_flags); ++ int different_fs = strcmp(path, exp->e_path) != 0; ++ ++ if (different_fs) ++ qword_printint(f, exp->e_flags & ~NFSEXP_FSID); ++ else ++ qword_printint(f, exp->e_flags); + qword_printint(f, exp->e_anonuid); + qword_printint(f, exp->e_anongid); + qword_printint(f, exp->e_fsid); + write_fsloc(f, exp, path); + write_secinfo(f, exp); + #if USE_BLKID +- if (exp->e_uuid == NULL) { ++ if (exp->e_uuid == NULL || different_fs) { + char u[16]; + if (get_uuid(path, NULL, 16, u)) { + qword_print(f, "uuid"); + qword_printhex(f, u, 16); + } +- } else if (exp->e_uuid) { ++ } else { + qword_print(f, "uuid"); + qword_printhex(f, exp->e_uuid, 16); + } diff --git a/nfs-utils-1.1.1-xlog-valist.patch b/nfs-utils-1.1.1-xlog-valist.patch new file mode 100644 index 0000000..2e041da --- /dev/null +++ b/nfs-utils-1.1.1-xlog-valist.patch @@ -0,0 +1,42 @@ +commit 399cc3dad0cdfe8dca4a0ae9035a0554d7223eb2 +Author: Steve Dickson +Date: Thu Jan 17 11:25:37 2008 -0500 + + Stop segfaults on amd64 during warnings messages by creating + a second va_list in xlog_backend() and then use that va_list + to print messages on stderr. + + Signed-off-by: Steinar H. Gunderson + Signed-off-by: Steve Langasek + Signed-off-by: Steve Dickson + +diff -up nfs-utils-1.1.1/support/nfs/xlog.c.orig nfs-utils-1.1.1/support/nfs/xlog.c +--- nfs-utils-1.1.1/support/nfs/xlog.c.orig 2007-10-18 23:07:28.000000000 -0400 ++++ nfs-utils-1.1.1/support/nfs/xlog.c 2008-01-22 14:13:36.000000000 -0500 +@@ -133,9 +133,14 @@ xlog_enabled(int fac) + void + xlog_backend(int kind, const char *fmt, va_list args) + { ++ va_list args2; ++ + if (!(kind & (L_ALL)) && !(logging && (kind & logmask))) + return; + ++ if (log_stderr) ++ va_copy(args2, args); ++ + if (log_syslog) { + switch (kind) { + case L_FATAL: +@@ -171,9 +176,9 @@ xlog_backend(int kind, const char *fmt, + #else + fprintf(stderr, "%s: ", log_name); + #endif +- +- vfprintf(stderr, fmt, args); ++ vfprintf(stderr, fmt, args2); + fprintf(stderr, "\n"); ++ va_end(args2); + } + + if (kind == L_FATAL) diff --git a/nfs-utils.spec b/nfs-utils.spec index a4b3e42..04a231a 100644 --- a/nfs-utils.spec +++ b/nfs-utils.spec @@ -32,6 +32,11 @@ Patch06: nfs-utils-1.1.0-smnotify-path.patch Patch07: nfs-utils-1.1.0-exportfs-man-update.patch Patch08: nfs-utils-1.1.1-mountd-man.patch Patch09: nfs-utils-1.1.0-fsloc-nohide.patch +Patch10: nfs-utils-1.1.1-xlog-valist.patch +Patch11: nfs-utils-1.1.1-mountd-crossmnt.patch +Patch12: nfs-utils-1.1.1-mountd-crossmnt-cleanup.patch +Patch13: nfs-utils-1.1.1-gssd-mcred.patch +Patch14: nfs-utils-1.1.1-idmapd-validasc.patch %if %{enablefscache} Patch90: nfs-utils-1.1.0-mount-fsc.patch @@ -94,6 +99,11 @@ This package also contains the mount.nfs and umount.nfs program. %patch07 -p1 %patch08 -p1 %patch09 -p1 +%patch10 -p1 +%patch11 -p1 +%patch12 -p1 +%patch13 -p1 +%patch14 -p1 %if %{enablefscache} %patch90 -p1