Update the pseudo root to handle security flavors better.

This commit is contained in:
Steve Dickson 2009-12-10 19:24:27 +00:00
parent fd548b15aa
commit 9d5e785c8f
2 changed files with 11 additions and 18 deletions

View File

@ -172,10 +172,10 @@ index 888fd8c..179ef17 100644
break; break;
diff --git a/utils/mountd/v4root.c b/utils/mountd/v4root.c diff --git a/utils/mountd/v4root.c b/utils/mountd/v4root.c
new file mode 100644 new file mode 100644
index 0000000..817dfb4 index 0000000..b1e483a
--- /dev/null --- /dev/null
+++ b/utils/mountd/v4root.c +++ b/utils/mountd/v4root.c
@@ -0,0 +1,228 @@ @@ -0,0 +1,218 @@
+/* +/*
+ * Copyright (C) 2009 Red Hat <nfs@redhat.com> + * Copyright (C) 2009 Red Hat <nfs@redhat.com>
+ * + *
@ -375,12 +375,6 @@ index 0000000..817dfb4
+ } + }
+ } + }
+ +
+ if (insecure && secflavors) {
+ xlog(L_WARNING, "WARNING: The 'sec=' and 'insecure' export options "
+ "are incompatible, causing the security flavors set by "
+ "'sec=' to be ignored on V4 exports");
+ }
+
+ /* + /*
+ * If there are any insecure exports, the pseudo root + * If there are any insecure exports, the pseudo root
+ * also has to be insecure + * also has to be insecure
@ -391,16 +385,12 @@ index 0000000..817dfb4
+ +
+ /* + /*
+ * Make sure the pseudo root is accessible from all + * Make sure the pseudo root is accessible from all
+ * security flavors unless the insecure port is set, + * security flavors when it needs to be.
+ * which cause the kernel to silently fail v4 mounts
+ * with security flavors set.
+ */ + */
+ if (secflavors && !insecure) { + if (secflavors && !flavors_setall(proot)) {
+ if (!flavors_setall(proot)) { + xlog(L_WARNING, "v4root_set: Unable to set security "
+ xlog(L_WARNING, "v4root_set: Unable to set security " + "flavors on pseudo root");
+ "flavors on pseudo root");
+ }
+ } + }
+
+} +}
+ +
+

View File

@ -2,7 +2,7 @@ Summary: NFS utilities and supporting clients and daemons for the kernel NFS ser
Name: nfs-utils Name: nfs-utils
URL: http://sourceforge.net/projects/nfs URL: http://sourceforge.net/projects/nfs
Version: 1.2.1 Version: 1.2.1
Release: 5%{?dist} Release: 6%{?dist}
Epoch: 1 Epoch: 1
# group all 32bit related archs # group all 32bit related archs
@ -250,6 +250,9 @@ fi
%attr(4755,root,root) /sbin/umount.nfs4 %attr(4755,root,root) /sbin/umount.nfs4
%changelog %changelog
* Thu Dec 10 2009 Steve Dickson <steved@redhat.com> 1.2.1-6
- Update the pseudo root to handle security flavors better.
* Mon Dec 7 2009 Steve Dickson <steved@redhat.com> 1.2.1-5 * Mon Dec 7 2009 Steve Dickson <steved@redhat.com> 1.2.1-5
- mount.nfs: Retry v4 mounts with v3 on ENOENT errors - mount.nfs: Retry v4 mounts with v3 on ENOENT errors