Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F111306774
D44502.id136206.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
D44502.id136206.diff
View Options
diff --git a/usr.sbin/mountd/mountd.c.sav b/usr.sbin/mountd/mountd.c
--- a/usr.sbin/mountd/mountd.c.sav
+++ b/usr.sbin/mountd/mountd.c
@@ -130,10 +130,11 @@
SLIST_ENTRY(exportlist) entries;
};
/* ex_flag bits */
-#define EX_LINKED 0x1
-#define EX_DONE 0x2
-#define EX_DEFSET 0x4
-#define EX_PUBLICFH 0x8
+#define EX_LINKED 0x01
+#define EX_DONE 0x02
+#define EX_DEFSET 0x04
+#define EX_PUBLICFH 0x08
+#define EX_ADMINWARN 0x10
SLIST_HEAD(exportlisthead, exportlist);
@@ -272,6 +273,7 @@
static char **exnames;
static char **hosts = NULL;
static int force_v2 = 0;
+static int warn_admin = 1;
static int resvport_only = 1;
static int nhosts = 0;
static int dir_only = 1;
@@ -434,11 +436,14 @@
else
close(s);
- while ((c = getopt(argc, argv, "2deh:lnp:RrS")) != -1)
+ while ((c = getopt(argc, argv, "2Adeh:lnp:RrS")) != -1)
switch (c) {
case '2':
force_v2 = 1;
break;
+ case 'A':
+ warn_admin = 0;
+ break;
case 'e':
/* now a no-op, since this is the default */
break;
@@ -1694,6 +1699,20 @@
warnx("found ep fs=0x%x,0x%x",
fsb.f_fsid.val[0],
fsb.f_fsid.val[1]);
+ }
+
+ if (warn_admin != 0 &&
+ (ep->ex_flag & EX_ADMINWARN) == 0 &&
+ strcmp(unvis_dir, fsb.f_mntonname) !=
+ 0) {
+ if (debug)
+ warnx("exporting %s exports entire "
+ "%s file system", unvis_dir,
+ fsb.f_mntonname);
+ syslog(LOG_ERR, "Warning: exporting %s "
+ "exports entire %s file system",
+ unvis_dir, fsb.f_mntonname);
+ ep->ex_flag |= EX_ADMINWARN;
}
/*
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Mon, Mar 3, 3:20 AM (1 h, 52 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
16938977
Default Alt Text
D44502.id136206.diff (1 KB)
Attached To
Mode
D44502: Make mountd generate warning log messages when administrative controls exports entire file systems
Attached
Detach File
Event Timeline
Log In to Comment