xlogin 0.5.8 → 0.5.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/lib/xlogin/templates/iosxr.rb +10 -0
- data/lib/xlogin/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5742f26a175da199356781f6b0f098533aaa2acf
|
4
|
+
data.tar.gz: 61694269069e235f3c5024f1be88682a32dcd9c4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: fdd07176cf852b39f1c1d123a5f347cb0913e0d54c5f1bceb30e963e27e163a7b52d52560d654b3c72f1b35bd6d8626b2f8ba71d2a3ca71601c3aa176930672c
|
7
|
+
data.tar.gz: b926e383726dfe008ad4c6f2942896eca461cb5f96e9e49b9dfb87ecff5fa955b4e25e5c2b1ff2b72715b2603a61f54e74cd699aedfd7ca75286f1a566bf17f8
|
data/Gemfile.lock
CHANGED
@@ -8,4 +8,14 @@ Xlogin.configure :iosxr do |os|
|
|
8
8
|
waitfor(/Password: /) && puts(password)
|
9
9
|
waitfor
|
10
10
|
end
|
11
|
+
|
12
|
+
os.hook do |command|
|
13
|
+
if command =~ /^(?:adm |admi |admin )?\s*(?:con|rel|red|cle|hw|ro)/
|
14
|
+
# commands: configure, reload, redundancy, clear, hw-module, rollback
|
15
|
+
# with or without admin prefix is prihibited if not authorized.
|
16
|
+
raise Xlogin::AuthorizationError.new("prohibited command: #{command}") unless Xlogin.authorized?
|
17
|
+
end
|
18
|
+
|
19
|
+
pass(command)
|
20
|
+
end
|
11
21
|
end
|
data/lib/xlogin/version.rb
CHANGED