win32-eventlog 0.6.6 → 0.6.7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- checksums.yaml.gz.sig +0 -0
- data.tar.gz.sig +0 -0
- data/CHANGES +5 -0
- data/certs/djberg96_pub.pem +15 -15
- data/lib/win32/eventlog.rb +13 -4
- data/test/test_eventlog.rb +1 -1
- data/win32-eventlog.gemspec +1 -1
- metadata +18 -18
- metadata.gz.sig +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 24b4bd7a8e5fa401c3496ae1e430b7a827023b9f
|
4
|
+
data.tar.gz: 716b03276bce374be48a01eddfdf23b79321e196
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 633765f7eaee4ced0e91e563803bd4e938b0aa51b9789ac539b92b60c405f3dbe0a1d247c74d432976dc5e5a7fedcf918ace4f7aa19e3327f08b7fe07a11da50
|
7
|
+
data.tar.gz: 0a19913e909b457b4716b0c02d272f7946b4a003e486f931918937003c6f089710d3eb94c7dd3001cdcf4bce547a65c8739959da01fd6de72b367a4796b7f599
|
checksums.yaml.gz.sig
CHANGED
Binary file
|
data.tar.gz.sig
CHANGED
Binary file
|
data/CHANGES
CHANGED
@@ -1,3 +1,8 @@
|
|
1
|
+
== 0.6.7 - 14-Dec-2016
|
2
|
+
* The report_event method now accepts a 'user_sid' argument which can be either
|
3
|
+
a sid string or a Win32::Security::SID object. Thanks go to Elias Fr�hner
|
4
|
+
for the patch.
|
5
|
+
|
1
6
|
== 0.6.6 - 25-Jun-2016
|
2
7
|
* Renamed the various modules that contain FFI information in order to
|
3
8
|
avoid a namespacing conflict. Thanks go to Bryan McLellan for the spot.
|
data/certs/djberg96_pub.pem
CHANGED
@@ -1,21 +1,21 @@
|
|
1
1
|
-----BEGIN CERTIFICATE-----
|
2
2
|
MII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|
15
|
+
ggEBACjRCHRP944MHIQJNCglZbDnZowybV2HxmG1uhnvRwrOjBA7CXemc+QSAL7K
|
16
|
+
7eXC4FdojVEJrnU7ZxuCmfQU+fvkEQKOnah1osG1874aPiDlwtjHclpeqcDgTUI7
|
17
|
+
A7CF+OXK8x7ksFx205ruhPHKaPYtwVG/W/J+y7Wx8yl9rvwUgRBL5cVzTBiEz+AB
|
18
|
+
NRT7yoHXXfFXjuQWN1eHunSbNds2ZTGQd64yBCujb17Xdl+F9tu4klkTga3gxP3P
|
19
|
+
y3zoX1VttxnIZBojRM/s2A7c2aubMH2SVbXMR3ccVkB9XbYKl1OvCe7q85xEHit2
|
20
|
+
Kbpico5nnyHqf7YSPmvZe8bCU94=
|
21
21
|
-----END CERTIFICATE-----
|
data/lib/win32/eventlog.rb
CHANGED
@@ -18,7 +18,7 @@ module Win32
|
|
18
18
|
class Error < StandardError; end
|
19
19
|
|
20
20
|
# The version of the win32-eventlog library
|
21
|
-
VERSION = '0.6.
|
21
|
+
VERSION = '0.6.7'.freeze
|
22
22
|
|
23
23
|
# The log is read in chronological order, i.e. oldest to newest.
|
24
24
|
FORWARDS_READ = EVENTLOG_FORWARDS_READ
|
@@ -620,6 +620,7 @@ module Win32
|
|
620
620
|
# * source # Event log source name. Defaults to "Application".
|
621
621
|
# * event_id # Event ID (defined in event message file).
|
622
622
|
# * category # Event category (defined in category message file).
|
623
|
+
# * user_sid # object of Win32::Security::SID or SID struct (e.g returned by Win32::Security::SID.open('username').sid).
|
623
624
|
# * data # String, or array of strings, that is written to the log.
|
624
625
|
# * event_type # Type of event, e.g. EventLog::ERROR_TYPE, etc.
|
625
626
|
#
|
@@ -638,7 +639,7 @@ module Win32
|
|
638
639
|
def report_event(args)
|
639
640
|
raise TypeError unless args.is_a?(Hash)
|
640
641
|
|
641
|
-
valid_keys = %w[source event_id category data event_type]
|
642
|
+
valid_keys = %w[source event_id category data event_type user_sid]
|
642
643
|
num_strings = 0
|
643
644
|
|
644
645
|
# Default values
|
@@ -646,7 +647,8 @@ module Win32
|
|
646
647
|
'source' => @source,
|
647
648
|
'event_id' => 0,
|
648
649
|
'category' => 0,
|
649
|
-
'data' => 0
|
650
|
+
'data' => 0,
|
651
|
+
'user_sid' => nil
|
650
652
|
}
|
651
653
|
|
652
654
|
# Validate the keys, and convert symbols and case to lowercase strings.
|
@@ -701,12 +703,19 @@ module Win32
|
|
701
703
|
num_strings = 0
|
702
704
|
end
|
703
705
|
|
706
|
+
if hash['user_sid']
|
707
|
+
sid = hash['user_sid'].respond_to?(:sid) ? hash['user_sid'].sid : hash['user_sid']
|
708
|
+
user_sid = FFI::MemoryPointer.from_string(sid)
|
709
|
+
else
|
710
|
+
user_sid = nil
|
711
|
+
end
|
712
|
+
|
704
713
|
bool = ReportEvent(
|
705
714
|
handle,
|
706
715
|
hash['event_type'],
|
707
716
|
hash['category'],
|
708
717
|
hash['event_id'],
|
709
|
-
|
718
|
+
user_sid,
|
710
719
|
num_strings,
|
711
720
|
0,
|
712
721
|
data,
|
data/test/test_eventlog.rb
CHANGED
data/win32-eventlog.gemspec
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: win32-eventlog
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.6.
|
4
|
+
version: 0.6.7
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Daniel J. Berger
|
@@ -13,25 +13,25 @@ cert_chain:
|
|
13
13
|
-----BEGIN CERTIFICATE-----
|
14
14
|
MIIDcDCCAligAwIBAgIBATANBgkqhkiG9w0BAQUFADA/MREwDwYDVQQDDAhkamJl
|
15
15
|
cmc5NjEVMBMGCgmSJomT8ixkARkWBWdtYWlsMRMwEQYKCZImiZPyLGQBGRYDY29t
|
16
|
-
|
16
|
+
MB4XDTE2MTIxMjAwMTQ1M1oXDTE3MTIxMjAwMTQ1M1owPzERMA8GA1UEAwwIZGpi
|
17
17
|
ZXJnO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oHXXfFXjuQWN1eHunSbNds2ZTGQd64yBCujb17Xdl+F9tu4klkTga3gxP3P
|
31
|
+
y3zoX1VttxnIZBojRM/s2A7c2aubMH2SVbXMR3ccVkB9XbYKl1OvCe7q85xEHit2
|
32
|
+
Kbpico5nnyHqf7YSPmvZe8bCU94=
|
33
33
|
-----END CERTIFICATE-----
|
34
|
-
date: 2016-
|
34
|
+
date: 2016-12-14 00:00:00.000000000 Z
|
35
35
|
dependencies:
|
36
36
|
- !ruby/object:Gem::Dependency
|
37
37
|
name: ffi
|
@@ -154,7 +154,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
154
154
|
version: '0'
|
155
155
|
requirements: []
|
156
156
|
rubyforge_project:
|
157
|
-
rubygems_version: 2.6.
|
157
|
+
rubygems_version: 2.6.8
|
158
158
|
signing_key:
|
159
159
|
specification_version: 4
|
160
160
|
summary: Interface for the MS Windows Event Log.
|
metadata.gz.sig
CHANGED
Binary file
|