zookeeper 1.2.3-java → 1.2.4-java
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGELOG +6 -0
- data/ext/Rakefile +1 -1
- data/ext/c_zookeeper.rb +2 -0
- data/ext/extconf.rb +4 -1
- data/ext/zkrb.c +7 -7
- data/lib/zookeeper/version.rb +1 -1
- data/spec/support/10_spawn_zookeeper.rb +5 -1
- metadata +4 -4
data/CHANGELOG
CHANGED
@@ -1,3 +1,9 @@
|
|
1
|
+
v1.2.4 fix buffer overflow in CZookeeper client_id code
|
2
|
+
|
3
|
+
* the 'passwd' part of the struct is a char[16], but isn't null terminated.
|
4
|
+
use rb_str_new with an explicit length, rather than rb_str_new2 which
|
5
|
+
uses strlen().
|
6
|
+
|
1
7
|
v1.2.3 ensure that all threads are woken up on shutdown
|
2
8
|
|
3
9
|
* There was an edge case where a call would be queued up and its thread
|
data/ext/Rakefile
CHANGED
data/ext/c_zookeeper.rb
CHANGED
data/ext/extconf.rb
CHANGED
@@ -26,7 +26,7 @@ end
|
|
26
26
|
|
27
27
|
ZK_DEBUG = (ENV['DEBUG'] or ARGV.any? { |arg| arg == '--debug' })
|
28
28
|
ZK_DEV = ENV['ZK_DEV']
|
29
|
-
DEBUG_CFLAGS = " -O0 -ggdb3 -DHAVE_DEBUG"
|
29
|
+
DEBUG_CFLAGS = " -O0 -ggdb3 -DHAVE_DEBUG -fstack-protector-all"
|
30
30
|
|
31
31
|
if ZK_DEBUG
|
32
32
|
$stderr.puts "*** Setting debug flags. ***"
|
@@ -61,6 +61,9 @@ Dir.chdir(HERE) do
|
|
61
61
|
raise "'#{cmd}' failed" unless system(cmd)
|
62
62
|
end
|
63
63
|
|
64
|
+
# clean up stupid apple rsrc fork bullshit
|
65
|
+
FileUtils.rm_f(Dir['**/._*'].select{|p| test(?f, p)})
|
66
|
+
|
64
67
|
Dir.chdir(BUNDLE_PATH) do
|
65
68
|
configure = "./configure --prefix=#{HERE} --with-pic --without-cppunit --disable-dependency-tracking #{$EXTRA_CONF} 2>&1"
|
66
69
|
configure = "env CFLAGS='#{DEBUG_CFLAGS}' #{configure}" if ZK_DEBUG
|
data/ext/zkrb.c
CHANGED
@@ -885,15 +885,15 @@ static VALUE method_client_id(VALUE self) {
|
|
885
885
|
char buf[32];
|
886
886
|
const clientid_t *cid = zoo_client_id(zk->zh);
|
887
887
|
|
888
|
-
if (strlen(cid->passwd) != 16) {
|
889
|
-
zkrb_debug("passwd is not null-terminated")
|
890
|
-
} else {
|
891
|
-
hexbufify(buf, cid->passwd, 16)
|
892
|
-
zkrb_debug("password in hex is: %s", buf)
|
893
|
-
}
|
888
|
+
/* if (strlen(cid->passwd) != 16) { */
|
889
|
+
/* zkrb_debug("passwd is not null-terminated");*/
|
890
|
+
/* } else {*/
|
891
|
+
/* hexbufify(buf, cid->passwd, 16);*/
|
892
|
+
/* zkrb_debug("password in hex is: %s", buf);*/
|
893
|
+
/* }*/
|
894
894
|
|
895
895
|
VALUE session_id = LL2NUM(cid->client_id);
|
896
|
-
VALUE passwd =
|
896
|
+
VALUE passwd = rb_str_new(cid->passwd, 16);
|
897
897
|
|
898
898
|
VALUE client_id_obj = rb_class_new_instance(0, RARRAY_PTR(rb_ary_new()), ZookeeperClientId);
|
899
899
|
|
data/lib/zookeeper/version.rb
CHANGED
@@ -7,6 +7,10 @@ module Zookeeper
|
|
7
7
|
!!ENV['TRAVIS']
|
8
8
|
end
|
9
9
|
|
10
|
+
def self.default_cnx_host
|
11
|
+
ENV['ZK_DEFAULT_HOST'] || 'localhost'
|
12
|
+
end
|
13
|
+
|
10
14
|
@test_port ||= spawn_zookeeper? ? 21811 : 2181
|
11
15
|
|
12
16
|
class << self
|
@@ -14,7 +18,7 @@ module Zookeeper
|
|
14
18
|
end
|
15
19
|
|
16
20
|
def self.default_cnx_str
|
17
|
-
"
|
21
|
+
"#{default_cnx_host}:#{test_port}"
|
18
22
|
end
|
19
23
|
end
|
20
24
|
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: zookeeper
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 23
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 1
|
8
8
|
- 2
|
9
|
-
-
|
10
|
-
version: 1.2.
|
9
|
+
- 4
|
10
|
+
version: 1.2.4
|
11
11
|
platform: java
|
12
12
|
authors:
|
13
13
|
- Phillip Pearson
|
@@ -20,7 +20,7 @@ autorequire:
|
|
20
20
|
bindir: bin
|
21
21
|
cert_chain: []
|
22
22
|
|
23
|
-
date: 2012-05-
|
23
|
+
date: 2012-05-24 00:00:00 Z
|
24
24
|
dependencies:
|
25
25
|
- !ruby/object:Gem::Dependency
|
26
26
|
name: backports
|