summaryrefslogtreecommitdiff
path: root/interface-definitions
diff options
context:
space:
mode:
authorChristian Poessinger <christian@poessinger.com>2021-06-10 21:35:07 +0200
committerChristian Poessinger <christian@poessinger.com>2021-06-10 21:35:07 +0200
commit556e03922f78f8e258c6d6630ad47569be376e11 (patch)
treef2ea3758029b5c93f8777df168684286d693448d /interface-definitions
parent1be388a66b0c1ed707d4d8cf09cff069a835b7f7 (diff)
downloadvyos-1x-556e03922f78f8e258c6d6630ad47569be376e11.tar.gz
vyos-1x-556e03922f78f8e258c6d6630ad47569be376e11.zip
xml: ssh: move user/group definition to includable files
Diffstat (limited to 'interface-definitions')
-rw-r--r--interface-definitions/include/ssh-group.xml.i12
-rw-r--r--interface-definitions/include/ssh-user.xml.i12
-rw-r--r--interface-definitions/ssh.xml.in49
3 files changed, 29 insertions, 44 deletions
diff --git a/interface-definitions/include/ssh-group.xml.i b/interface-definitions/include/ssh-group.xml.i
new file mode 100644
index 000000000..9c8b8692f
--- /dev/null
+++ b/interface-definitions/include/ssh-group.xml.i
@@ -0,0 +1,12 @@
+<!-- include start from ssh-group.xml.i -->
+<leafNode name="group">
+ <properties>
+ <help>Allow members of a group to login</help>
+ <constraint>
+ <regex>[a-z_][a-z0-9_-]{1,31}[$]?</regex>
+ </constraint>
+ <constraintErrorMessage>illegal characters or more than 32 characters</constraintErrorMessage>
+ <multi/>
+ </properties>
+</leafNode>
+<!-- include end -->
diff --git a/interface-definitions/include/ssh-user.xml.i b/interface-definitions/include/ssh-user.xml.i
new file mode 100644
index 000000000..677602dd8
--- /dev/null
+++ b/interface-definitions/include/ssh-user.xml.i
@@ -0,0 +1,12 @@
+<!-- include start from ssh-user.xml.i -->
+<leafNode name="user">
+ <properties>
+ <help>Allow specific users to login</help>
+ <constraint>
+ <regex>[a-z_][a-z0-9_-]{1,31}[$]?</regex>
+ </constraint>
+ <constraintErrorMessage>illegal characters or more than 32 characters</constraintErrorMessage>
+ <multi/>
+ </properties>
+</leafNode>
+<!-- include end -->
diff --git a/interface-definitions/ssh.xml.in b/interface-definitions/ssh.xml.in
index 6faef9bd5..54742f1d0 100644
--- a/interface-definitions/ssh.xml.in
+++ b/interface-definitions/ssh.xml.in
@@ -1,5 +1,4 @@
<?xml version="1.0"?>
-<!--SSH configuration -->
<interfaceDefinition>
<node name="service">
<properties>
@@ -14,9 +13,7 @@
<children>
<node name="access-control">
<properties>
- <help>SSH user/group access controls. Directives are processed
- in the following order: deny-users, allow-users, deny-groups and
- allow-groups.</help>
+ <help>SSH user/group access controls</help>
</properties>
<children>
<node name="allow">
@@ -24,26 +21,8 @@
<help>Allow user/group SSH access</help>
</properties>
<children>
- <leafNode name="group">
- <properties>
- <help>Allow members of a group to login</help>
- <constraint>
- <regex>[a-z_][a-z0-9_-]{1,31}[$]?</regex>
- </constraint>
- <constraintErrorMessage>illegal characters or more than 32 characters</constraintErrorMessage>
- <multi/>
- </properties>
- </leafNode>
- <leafNode name="user">
- <properties>
- <help>Allow specific users to login</help>
- <constraint>
- <regex>[a-z_][a-z0-9_-]{1,31}[$]?</regex>
- </constraint>
- <constraintErrorMessage>illegal characters or more than 32 characters</constraintErrorMessage>
- <multi/>
- </properties>
- </leafNode>
+ #include <include/ssh-group.xml.i>
+ #include <include/ssh-user.xml.i>
</children>
</node>
<node name="deny">
@@ -51,26 +30,8 @@
<help>Deny user/group SSH access</help>
</properties>
<children>
- <leafNode name="group">
- <properties>
- <help>Disallow members of a group to login</help>
- <constraint>
- <regex>[a-z_][a-z0-9_-]{1,31}[$]?</regex>
- </constraint>
- <constraintErrorMessage>illegal characters or more than 32 characters</constraintErrorMessage>
- <multi/>
- </properties>
- </leafNode>
- <leafNode name="user">
- <properties>
- <help>Disallow specific users to login</help>
- <constraint>
- <regex>[a-z_][a-z0-9_-]{1,31}[$]?</regex>
- </constraint>
- <constraintErrorMessage>illegal characters or more than 32 characters</constraintErrorMessage>
- <multi/>
- </properties>
- </leafNode>
+ #include <include/ssh-group.xml.i>
+ #include <include/ssh-user.xml.i>
</children>
</node>
</children>