Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F101965701
D25300.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D25300.diff
View Options
Index: head/sys/kern/vfs_export.c
===================================================================
--- head/sys/kern/vfs_export.c
+++ head/sys/kern/vfs_export.c
@@ -61,6 +61,9 @@
#include <netinet/in.h>
#include <net/radix.h>
+#include <rpc/types.h>
+#include <rpc/auth.h>
+
static MALLOC_DEFINE(M_NETADDR, "export_host", "Export host address structure");
#if defined(INET) || defined(INET6)
@@ -303,7 +306,7 @@
return (EINVAL);
if ((argp->ex_flags & MNT_EXPORTED) != 0 &&
- (argp->ex_numsecflavors <= 0
+ (argp->ex_numsecflavors < 0
|| argp->ex_numsecflavors >= MAXSECFLAVORS))
return (EINVAL);
@@ -340,6 +343,10 @@
MNT_ILOCK(mp);
mp->mnt_flag |= MNT_EXPUBLIC;
MNT_IUNLOCK(mp);
+ }
+ if (argp->ex_numsecflavors == 0) {
+ argp->ex_numsecflavors = 1;
+ argp->ex_secflavors[0] = AUTH_SYS;
}
if ((error = vfs_hang_addrlist(mp, nep, argp)))
goto out;
Index: head/sys/kern/vfs_mount.c
===================================================================
--- head/sys/kern/vfs_mount.c
+++ head/sys/kern/vfs_mount.c
@@ -70,9 +70,6 @@
#include <machine/stdarg.h>
-#include <rpc/types.h>
-#include <rpc/auth.h>
-
#include <security/audit/audit.h>
#include <security/mac/mac_framework.h>
@@ -1131,8 +1128,6 @@
switch (len) {
case (sizeof(struct oexport_args)):
bzero(&o2export, sizeof(o2export));
- o2export.ex_numsecflavors = 1;
- o2export.ex_secflavors[0] = AUTH_SYS;
/* FALLTHROUGH */
case (sizeof(o2export)):
bcopy(bufp, &o2export, len);
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Wed, Nov 6, 9:44 PM (21 h, 3 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
14500726
Default Alt Text
D25300.diff (1 KB)
Attached To
Mode
D25300: Apply default security policy in vfs_export
Attached
Detach File
Event Timeline
Log In to Comment