krb5-ruby 0.2.4 → 0.2.5
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/README.md +14 -0
- data/VERSION +1 -1
- data/krb5-ruby.gemspec +2 -2
- data/lib/krb5/mixin/unpacker.rb +3 -3
- 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: b883aa7ee0f31a9b2e2bf3e3c010d58724230bc5
|
4
|
+
data.tar.gz: fc506e651a02a3279296f053f2ad1ad21b1b1e45
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1af9e0c98db560d4af96b86c561e011592a8270357196a9ea8c26af7041433bba5b5fbbf0a4b8dbf214936ee9e4c3320fd19a741a7739b5249766a3fde968b18
|
7
|
+
data.tar.gz: e4b176e0cc3555e0ee08f9e81d41b5cb6b7a116edd06d521398f9f095d590651cb13c010f9d05d0b567bff2c97281f1ec40b80e42a57b61aab69879097ad8e38
|
data/README.md
CHANGED
@@ -2,6 +2,20 @@
|
|
2
2
|
|
3
3
|
Ruby native implementation of the KRB5 library for interacting with Kerberos Keytab files.
|
4
4
|
|
5
|
+
## Usage
|
6
|
+
|
7
|
+
```ruby
|
8
|
+
require 'krb5'
|
9
|
+
|
10
|
+
kt = KRB5::Keytab.load('/etc/krb5.keytab')
|
11
|
+
kt.entries.each do |entry|
|
12
|
+
puts entry.principal
|
13
|
+
end
|
14
|
+
|
15
|
+
kt.entries.delete_if { |entry| entry.kvno < 2 }
|
16
|
+
kt.save('/etc/krb5_new.keytab')
|
17
|
+
```
|
18
|
+
|
5
19
|
## Contributing to krb5-ruby
|
6
20
|
|
7
21
|
- Check out the latest master to make sure the feature hasn't been implemented or the bug hasn't been fixed yet.
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.2.
|
1
|
+
0.2.5
|
data/krb5-ruby.gemspec
CHANGED
@@ -2,11 +2,11 @@
|
|
2
2
|
# DO NOT EDIT THIS FILE DIRECTLY
|
3
3
|
# Instead, edit Jeweler::Tasks in Rakefile, and run 'rake gemspec'
|
4
4
|
# -*- encoding: utf-8 -*-
|
5
|
-
# stub: krb5-ruby 0.2.
|
5
|
+
# stub: krb5-ruby 0.2.5 ruby lib
|
6
6
|
|
7
7
|
Gem::Specification.new do |s|
|
8
8
|
s.name = "krb5-ruby".freeze
|
9
|
-
s.version = "0.2.
|
9
|
+
s.version = "0.2.5"
|
10
10
|
|
11
11
|
s.required_rubygems_version = Gem::Requirement.new(">= 0".freeze) if s.respond_to? :required_rubygems_version=
|
12
12
|
s.require_paths = ["lib".freeze]
|
data/lib/krb5/mixin/unpacker.rb
CHANGED
@@ -30,21 +30,21 @@ class KRB5
|
|
30
30
|
end
|
31
31
|
|
32
32
|
def unpack_int8
|
33
|
-
data = bytes[@index].
|
33
|
+
data = bytes[@index].unpack('c').first
|
34
34
|
@index += 1
|
35
35
|
|
36
36
|
data
|
37
37
|
end
|
38
38
|
|
39
39
|
def unpack_int16
|
40
|
-
data = bytes[@index, 2].
|
40
|
+
data = bytes[@index, 2].unpack('s>').first
|
41
41
|
@index += 2
|
42
42
|
|
43
43
|
data
|
44
44
|
end
|
45
45
|
|
46
46
|
def unpack_int32
|
47
|
-
data = bytes[@index, 4].
|
47
|
+
data = bytes[@index, 4].unpack('l>').first
|
48
48
|
@index += 4
|
49
49
|
|
50
50
|
data
|