summaryrefslogtreecommitdiffstats
path: root/tests/bugs
diff options
context:
space:
mode:
authorSantosh Kumar Pradhan <spradhan@redhat.com>2014-04-09 10:19:43 +0530
committerVijay Bellur <vbellur@redhat.com>2014-04-22 23:40:26 -0700
commit00e247ee44067f2b3e7ca5f7e6dc2f7934c97181 (patch)
tree43868ec642fae37fcb013e8c2f66659bf9d7b3cc /tests/bugs
parentb6cc23204f1941184cb08ec3d84beecd2d06fd91 (diff)
gNFS: Support wildcard in RPC auth allow/reject
RFE: Support wildcard in "nfs.rpc-auth-allow" and "nfs.rpc-auth-reject". e.g. *.redhat.com 192.168.1[1-5].* 192.168.1[1-5].*, *.redhat.com, 192.168.21.9 Along with wildcard, support for subnetwork or IP range e.g. 192.168.10.23/24 The option will be validated for following categories: 1) Anonymous i.e. "*" 2) Wildcard pattern i.e. string containing any ('*', '?', '[') 3) IPv4 address 4) IPv6 address 5) FQDN 6) subnetwork or IPv4 range Currently this does not support IPv6 subnetwork. Change-Id: Iac8caf5e490c8174d61111dad47fd547d4f67bf4 BUG: 1086097 Signed-off-by: Santosh Kumar Pradhan <spradhan@redhat.com> Reviewed-on: http://review.gluster.org/7485 Reviewed-by: Poornima G <pgurusid@redhat.com> Reviewed-by: Harshavardhana <harsha@harshavardhana.net> Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com>
Diffstat (limited to 'tests/bugs')
-rwxr-xr-xtests/bugs/bug-822830.t24
1 files changed, 22 insertions, 2 deletions
diff --git a/tests/bugs/bug-822830.t b/tests/bugs/bug-822830.t
index 000d99f03cc..b7a5704cdba 100755
--- a/tests/bugs/bug-822830.t
+++ b/tests/bugs/bug-822830.t
@@ -18,18 +18,38 @@ EXPECT 'Created' volinfo_field $V0 'Status';
TEST $CLI volume start $V0;
EXPECT 'Started' volinfo_field $V0 'Status';
-## Setting nfs.rpc-auth-reject as 192.*..*
-TEST ! $CLI volume set $V0 nfs.rpc-auth-reject 192.*..*
+## Setting nfs.rpc-auth-reject as 192.{}.1.2
+TEST ! $CLI volume set $V0 nfs.rpc-auth-reject 192.{}.1.2
EXPECT '' volinfo_field $V0 'nfs.rpc-auth-reject';
# Setting nfs.rpc-auth-allow as a.a.
TEST ! $CLI volume set $V0 nfs.rpc-auth-allow a.a.
EXPECT '' volinfo_field $V0 'nfs.rpc-auth-allow';
+## Setting nfs.rpc-auth-reject as 192.*..*
+TEST $CLI volume set $V0 nfs.rpc-auth-reject 192.*..*
+EXPECT '192.*..*' volinfo_field $V0 'nfs.rpc-auth-reject';
+
# Setting nfs.rpc-auth-allow as a.a
TEST $CLI volume set $V0 nfs.rpc-auth-allow a.a
EXPECT 'a.a' volinfo_field $V0 'nfs.rpc-auth-allow';
+# Setting nfs.rpc-auth-allow as *.redhat.com
+TEST $CLI volume set $V0 nfs.rpc-auth-allow *.redhat.com
+EXPECT '\*.redhat.com' volinfo_field $V0 'nfs.rpc-auth-allow';
+
+# Setting nfs.rpc-auth-allow as 192.168.10.[1-5]
+TEST $CLI volume set $V0 nfs.rpc-auth-allow 192.168.10.[1-5]
+EXPECT '192.168.10.\[1-5]' volinfo_field $V0 'nfs.rpc-auth-allow';
+
+# Setting nfs.rpc-auth-allow as 192.168.70.?
+TEST $CLI volume set $V0 nfs.rpc-auth-allow 192.168.70.?
+EXPECT '192.168.70.?' volinfo_field $V0 'nfs.rpc-auth-allow';
+
+# Setting nfs.rpc-auth-reject as 192.168.10.5/16
+TEST $CLI volume set $V0 nfs.rpc-auth-reject 192.168.10.5/16
+EXPECT '192.168.10.5/16' volinfo_field $V0 'nfs.rpc-auth-reject';
+
## Setting nfs.rpc-auth-reject as 192.*.*
TEST $CLI volume set $V0 nfs.rpc-auth-reject 192.*.*
EXPECT '192.*.*' volinfo_field $V0 'nfs.rpc-auth-reject';