blob: c17e3b2167429ea15df5e8d6db011a454c1c3723 [file] [log] [blame]
Patrick Williamsb48b7b42016-08-17 15:04:38 -05001commit e48f61d2f6df32a518bcb84db8c6eacfe5435c32
2Author: Yu Ke <ke.yu@intel.com>
3Date: Fri Oct 28 14:40:51 2011 +0800
4
5NFS export: fix syntax issue
6
7fix two syntax issue in /etc/exports:
81. if it is exported to everyone, should use "*", e.g. "/export *(xxx)"
92. explicitly specify subtree_check or no_subtree_check, required by latest nfs-utils
10
11Upstream-Status: Pending
12
13Signed-off-by: Yu Ke <ke.yu@intel.com>
14
15diff --git a/exports/save_export.cgi b/exports/save_export.cgi
16index 3bc2f97..3e60298 100755
17--- a/exports/save_export.cgi
18+++ b/exports/save_export.cgi
19@@ -40,7 +40,7 @@ else {
20 &error(&text('save_enetmask', $in{'netmask'}));
21 $exp{'host'} = $in{'network'}."/".$in{'netmask'};
22 }
23- elsif ($in{'mode'} == 3) { $exp{'host'} = ""; }
24+ elsif ($in{'mode'} == 3) { $exp{'host'} = "*"; }
25 else {
26 $in{'host'} =~ /\*/ || &to_ipaddress($in{'host'}) ||
27 &error(&text('save_ehost', $in{'host'}));
28@@ -70,6 +70,11 @@ else {
29
30 delete($opts{'no_subtree_check'}); delete($opts{'subtree_check'});
31 $opts{'no_subtree_check'} = "" if ($in{'no_subtree_check'});
32+ if ($in{'no_subtree_check'}) {
33+ $opts{'no_subtree_check'} = "";
34+ } else {
35+ $opts{'subtree_check'} = "";
36+ }
37
38 delete($opts{'nohide'}); delete($opts{'hide'});
39 $opts{'nohide'} = "" if ($in{'nohide'});