blob: 787bd8c69b65a8ce9bdb735a83541ba5d78125ab [file] [log] [blame]
Patrick Williamsb48b7b42016-08-17 15:04:38 -05001Add 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
Patrick Williamsb9af8752023-01-30 13:28:01 -06009Upstream-Status: Pending
Patrick Williamsb48b7b42016-08-17 15:04:38 -050010
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);