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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: ddf12eaa4b419f111eb52ec1e88c2eeb79f37ce8
4
- data.tar.gz: bc574189877a4c4d8d37c66e65e80f1a8c8ceb18
3
+ metadata.gz: 24b4bd7a8e5fa401c3496ae1e430b7a827023b9f
4
+ data.tar.gz: 716b03276bce374be48a01eddfdf23b79321e196
5
5
  SHA512:
6
- metadata.gz: ae2df2fe096c4fd6729f3c3b38779af85d3902f635b1882d28eddf2d1aabfb6b322f111541ca6a6975f9ae24a6bc3ebfa6be12ee634ac8a2f5808991c8964a50
7
- data.tar.gz: 81b27c47f295da3352559f6cc241b3b1793aed86e072a7007c41d436dbcc3f32877101172f5325115e4208ccda748e0c04ab5fe48b82e060efc552a0df86c39b
6
+ metadata.gz: 633765f7eaee4ced0e91e563803bd4e938b0aa51b9789ac539b92b60c405f3dbe0a1d247c74d432976dc5e5a7fedcf918ace4f7aa19e3327f08b7fe07a11da50
7
+ data.tar.gz: 0a19913e909b457b4716b0c02d272f7946b4a003e486f931918937003c6f089710d3eb94c7dd3001cdcf4bce547a65c8739959da01fd6de72b367a4796b7f599
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.
@@ -1,21 +1,21 @@
1
1
  -----BEGIN CERTIFICATE-----
2
2
  MIIDcDCCAligAwIBAgIBATANBgkqhkiG9w0BAQUFADA/MREwDwYDVQQDDAhkamJl
3
3
  cmc5NjEVMBMGCgmSJomT8ixkARkW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bpico5nnyHqf7YSPmvZe8bCU94=
21
21
  -----END CERTIFICATE-----
@@ -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.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
- nil,
718
+ user_sid,
710
719
  num_strings,
711
720
  0,
712
721
  data,
@@ -25,7 +25,7 @@ class TC_Win32_EventLog < Test::Unit::TestCase
25
25
  end
26
26
 
27
27
  test "version constant is set to expected value" do
28
- assert_equal('0.6.6', EventLog::VERSION)
28
+ assert_equal('0.6.7', EventLog::VERSION)
29
29
  end
30
30
 
31
31
  test "constructor basic functionality" do
@@ -2,7 +2,7 @@ require 'rubygems'
2
2
 
3
3
  Gem::Specification.new do |spec|
4
4
  spec.name = 'win32-eventlog'
5
- spec.version = '0.6.6'
5
+ spec.version = '0.6.7'
6
6
  spec.authors = ['Daniel J. Berger', 'Park Heesob']
7
7
  spec.license = 'Artistic 2.0'
8
8
  spec.email = 'djberg96@gmail.com'
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.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
- MB4XDTE1MDkwMjIwNDkxOFoXDTE2MDkwMTIwNDkxOFowPzERMA8GA1UEAwwIZGpi
16
+ MB4XDTE2MTIxMjAwMTQ1M1oXDTE3MTIxMjAwMTQ1M1owPzERMA8GA1UEAwwIZGpi
17
17
  ZXJnOTYxFTATBgoJkiaJk/IsZAEZFgVnbWFpbDETMBEGCgmSJomT8ixkARkWA2Nv
18
- bTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAMyTkvXqRp6hLs9eoJOS
19
- Hmi8kRYbq9Vkf15/hMxJpotYMgJVHHWrmDcC5Dye2PbnXjTkKf266Zw0PtT9h+lI
20
- S3ts9HO+vaCFSMwFFZmnWJSpQ3CNw2RcHxjWkk9yF7imEM8Kz9ojhiDXzBetdV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wjhPpXpf7/lu2I9hOTsvwSumb5UiKC
29
- /sqBxI3sfj9pr79Wpv4MuikX1XPik7Ncb7NPsJPw06Lvyc3Hkg5X2XpPtLtS+Gr2
30
- wKJnmzb5rIPS1cmsqv0M9LPWflzfwoZ/SpnmhagP+g05p8bRNKjZSA2iImM/GyYZ
31
- EJYzxdPOrx2n6NYR3Hk+vHP0U7UBSveI6+qx+ndQYaeyCn+GRX2PKS9h66YF/Q1V
32
- tGSHgAmcLlkdGgan182qsE/4kKM=
27
+ ggEBACjRCHRP944MHIQJNCglZbDnZowybV2HxmG1uhnvRwrOjBA7CXemc+QSAL7K
28
+ 7eXC4FdojVEJrnU7ZxuCmfQU+fvkEQKOnah1osG1874aPiDlwtjHclpeqcDgTUI7
29
+ A7CF+OXK8x7ksFx205ruhPHKaPYtwVG/W/J+y7Wx8yl9rvwUgRBL5cVzTBiEz+AB
30
+ NRT7yoHXXfFXjuQWN1eHunSbNds2ZTGQd64yBCujb17Xdl+F9tu4klkTga3gxP3P
31
+ y3zoX1VttxnIZBojRM/s2A7c2aubMH2SVbXMR3ccVkB9XbYKl1OvCe7q85xEHit2
32
+ Kbpico5nnyHqf7YSPmvZe8bCU94=
33
33
  -----END CERTIFICATE-----
34
- date: 2016-06-25 00:00:00.000000000 Z
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.4
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