Patrick Williams | b48b7b4 | 2016-08-17 15:04:38 -0500 | [diff] [blame] | 1 | Add excludefs config option to mount module |
| 2 | |
| 3 | Adds a configuration option (currently hidden) to allow the distro to |
| 4 | hide certain filesystems from the mount module within Webmin (e.g. /dev) |
| 5 | since these shouldn't be modified from the web interface. |
| 6 | |
| 7 | Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> |
| 8 | |
| 9 | Upstream-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); |