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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: af7e34ba0695c2b79ff345cdb49ae379be8bc806
4
- data.tar.gz: b84528337e40acc49382fdf9f7d617b8393721c1
3
+ metadata.gz: 5742f26a175da199356781f6b0f098533aaa2acf
4
+ data.tar.gz: 61694269069e235f3c5024f1be88682a32dcd9c4
5
5
  SHA512:
6
- metadata.gz: 7d66686381a8fb3bb06874fdc6fcec33e2303afbba398553ad006ed9603ca9adad3b385f8ed9e58108f73bdf32601ea6ec491c6707d2e5fa9dfa45f3cd63e8ac
7
- data.tar.gz: 35b72ddb2662e478e1913ff435e72cd4e73d66126760470ce8b933ed5833df47588c4d85d08aa8f5044e11b3e9d1ece5979e4a3bb8e817b18f3cef67a7d82b11
6
+ metadata.gz: fdd07176cf852b39f1c1d123a5f347cb0913e0d54c5f1bceb30e963e27e163a7b52d52560d654b3c72f1b35bd6d8626b2f8ba71d2a3ca71601c3aa176930672c
7
+ data.tar.gz: b926e383726dfe008ad4c6f2942896eca461cb5f96e9e49b9dfb87ecff5fa955b4e25e5c2b1ff2b72715b2603a61f54e74cd699aedfd7ca75286f1a566bf17f8
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- xlogin (0.5.8)
4
+ xlogin (0.5.9)
5
5
  net-ssh
6
6
  net-ssh-gateway
7
7
  net-ssh-telnet
@@ -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
@@ -1,3 +1,3 @@
1
1
  module Xlogin
2
- VERSION = "0.5.8"
2
+ VERSION = "0.5.9"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: xlogin
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.8
4
+ version: 0.5.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - haccht