summaryrefslogtreecommitdiffstats
path: root/meta-webserver/recipes-webadmin/webmin/files/mount-excludefs.patch
diff options
context:
space:
mode:
Diffstat (limited to 'meta-webserver/recipes-webadmin/webmin/files/mount-excludefs.patch')
-rw-r--r--meta-webserver/recipes-webadmin/webmin/files/mount-excludefs.patch25
1 files changed, 25 insertions, 0 deletions
diff --git a/meta-webserver/recipes-webadmin/webmin/files/mount-excludefs.patch b/meta-webserver/recipes-webadmin/webmin/files/mount-excludefs.patch
new file mode 100644
index 000000000..8cb74c4b1
--- /dev/null
+++ b/meta-webserver/recipes-webadmin/webmin/files/mount-excludefs.patch
@@ -0,0 +1,25 @@
1Add excludefs config option to mount module
2
3Adds a configuration option (currently hidden) to allow the distro to
4hide certain filesystems from the mount module within Webmin (e.g. /dev)
5since these shouldn't be modified from the web interface.
6
7Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
8
9Upstream-status: Pending
10
11--- webmin-1.570.orig/mount/index.cgi
12+++ webmin-1.570/mount/index.cgi
13@@ -33,10 +33,12 @@ elsif ($config{'sort_mode'} == 1) {
14 }
15
16 # Build visible filesystems list
17+@excludefs = split(/,/, $config{excludefs});
18 foreach $m (@all) {
19 @minfo = @$m;
20 $p = &simplify_mount_path($minfo[0], $minfo[2]);
21 next if ($ignore{$minfo[2]});
22+ next if (grep {$_ eq $minfo[2]} @excludefs);
23 @mmodes = &mount_modes($minfo[2], $minfo[0], $minfo[1]);
24 $canedit = $can_edit{$minfo[2]} && !$mmodes[4] &&
25 &can_edit_fs(@minfo);