iodine 0.7.52 → 0.7.54

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
  SHA256:
3
- metadata.gz: a785781b6a34e3c24c4a1f66e3d6ab25b3bee3cbd7021060182e85a10957e907
4
- data.tar.gz: 8f3df880cc02eb1e1a139c4a4e4b3c9e37c3240f31bc205ceea69b000a8ca33f
3
+ metadata.gz: 6bf1dc45230e4d64130055f60291bddd92144bc7c2349a8b10a8829d32f3c09c
4
+ data.tar.gz: 858d92f6b21c05d6b38ee525822c986de2757e1a290f8164369012e60735b920
5
5
  SHA512:
6
- metadata.gz: eedc0f42ce25b27090b61a138d03a8e0a092b9f44a297396e354fea57091b7028de59ad76e9e7818c6ddd44120216a0fa776ed106f86386757f169f16c05289b
7
- data.tar.gz: f279e9c69f22e7361f300a561dc9310a026d128a319497e4ac170ca63cab875d67d219d688380b9f51894e4b5b298fb125f38cc0fbe82171ff1e3d25a6e4767f
6
+ metadata.gz: ebaf17fafa2997d5b2d06df4fbc9c537558e5f6a2464b16da3af20908fc6f3875d772ad81da393cb8bcba713bb359fb8918266060a9d80ee5ec07f04957732dd
7
+ data.tar.gz: 7e87d6eaa475c5c39e0dfdb60ad8b45a3d095e7f8b702dacbdbc5acf8a7410caf86793415e482b8cb08b882ddc5678a90800697a8ce6a1c6cdece47cf7cecec1
data/CHANGELOG.md CHANGED
@@ -6,12 +6,19 @@ Please notice that this change log contains changes for upcoming releases as wel
6
6
 
7
7
  ## Changes:
8
8
 
9
+ #### Change log v.0.7.54 (2023-03-15)
10
+
11
+ **Fix**: Fixes verbosity option in iodine's CLI where the value `0` was ignored. Credit to @jsaak for opening issue #139.
12
+
13
+ #### Change log v.0.7.53 (2023-01-13)
14
+
15
+ **Fix**: Fixes Unix socket permission limitations, so unix sockets are not limited to the owner of the process. Credit to Patrik Rak (@raxoft) for opening issue #136.
9
16
 
10
17
  #### Change log v.0.7.52 (2022-12-10)
11
18
 
12
- **Fix**: Fixes `Iodine.unsubscribe` which failed when a symbol was supplied. Credit to Alexander Pavlenko (@raxoft) for opening issue #134.
19
+ **Fix**: Fixes `Iodine.unsubscribe` which failed when a symbol was supplied. Credit to Patrik Rak (@raxoft) for opening issue #134.
13
20
 
14
- **Fix**: Fixes `Iodine.is_worker` which gave an incorrect answer due to a copy & paste error. Credit to Alexander Pavlenko (@raxoft) for opening PR #133.
21
+ **Fix**: Fixes `Iodine.is_worker` which gave an incorrect answer due to a copy & paste error. Credit to Patrik Rak (@raxoft) for opening PR #133.
15
22
 
16
23
  #### Change log v.0.7.51 (2022-12-03)
17
24
 
data/ext/iodine/fio.c CHANGED
@@ -3198,18 +3198,26 @@ static intptr_t fio_unix_socket(const char *address, uint8_t server) {
3198
3198
  }
3199
3199
  if (server) {
3200
3200
  unlink(addr.sun_path);
3201
- if (bind(fd, (struct sockaddr *)&addr, sizeof(addr)) == -1) {
3202
- // perror("couldn't bind unix socket");
3201
+ #ifndef FIO_SOCK_AVOID_UMASK
3202
+ int org_umask = umask(0x1FF);
3203
+ int btmp = bind(fd, (struct sockaddr *)&addr, sizeof(addr));
3204
+ umask(org_umask);
3205
+ #else
3206
+ int btmp = bind(fd, (struct sockaddr *)&addr, sizeof(addr));
3207
+ #endif
3208
+ if (btmp == -1) {
3209
+ // perror("couldn't bind unix socket");
3203
3210
  close(fd);
3204
3211
  return -1;
3205
3212
  }
3213
+ /* chmod for foreign connections... if possible */
3214
+ if(chmod(addr.sun_path, 0x1FF))
3215
+ FIO_LOG_WARNING("chmod failed for %s (%d: %s)", address, errno, strerror(errno));
3206
3216
  if (listen(fd, SOMAXCONN) < 0) {
3207
3217
  // perror("couldn't start listening to unix socket");
3208
3218
  close(fd);
3209
3219
  return -1;
3210
3220
  }
3211
- /* chmod for foreign connections */
3212
- fchmod(fd, 0777);
3213
3221
  } else {
3214
3222
  if (connect(fd, (struct sockaddr *)&addr, sizeof(addr)) == -1 &&
3215
3223
  errno != EINPROGRESS) {
@@ -6736,11 +6744,11 @@ static void fio_cluster_init(void) {
6736
6744
  if (cluster_data.name[tmp_folder_len - 1] != '/')
6737
6745
  cluster_data.name[tmp_folder_len++] = '/';
6738
6746
  }
6739
- memcpy(cluster_data.name + tmp_folder_len, "facil-io-sock-", 14);
6740
- tmp_folder_len += 14;
6747
+ memcpy(cluster_data.name + tmp_folder_len, "fio-usock-", 10);
6748
+ tmp_folder_len += 10;
6741
6749
  tmp_folder_len +=
6742
6750
  snprintf(cluster_data.name + tmp_folder_len,
6743
- FIO_CLUSTER_NAME_LIMIT - tmp_folder_len, "%d", (int)getpid());
6751
+ FIO_CLUSTER_NAME_LIMIT - tmp_folder_len, "%08x", (int)getpid() + (int)(fio_rand64() & 0xAFFFFFFF));
6744
6752
  cluster_data.name[tmp_folder_len] = 0;
6745
6753
 
6746
6754
  /* remove if existing */
data/ext/iodine/iodine.c CHANGED
@@ -439,7 +439,7 @@ static VALUE iodine_cli_parse(VALUE self) {
439
439
  /* copy values from CLI library to iodine */
440
440
  if (fio_cli_get("-V")) {
441
441
  int level = fio_cli_get_i("-V");
442
- if (level > 0 && level < 100)
442
+ if (level >= 0 && level < 100)
443
443
  FIO_LOG_LEVEL = level;
444
444
  }
445
445
  if (!fio_cli_get("-w") && getenv("WEB_CONCURRENCY")) {
@@ -1,3 +1,3 @@
1
1
  module Iodine
2
- VERSION = '0.7.52'.freeze
2
+ VERSION = '0.7.54'.freeze
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: iodine
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.7.52
4
+ version: 0.7.54
5
5
  platform: ruby
6
6
  authors:
7
7
  - Boaz Segev
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2022-12-10 00:00:00.000000000 Z
11
+ date: 2023-03-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake
@@ -246,7 +246,7 @@ licenses:
246
246
  metadata:
247
247
  allowed_push_host: https://rubygems.org
248
248
  post_install_message: |-
249
- Thank you for installing Iodine 0.7.52.
249
+ Thank you for installing Iodine 0.7.54.
250
250
  Remember: if iodine supports your business, it's only fair to give value back (code contributions / donations).
251
251
  rdoc_options: []
252
252
  require_paths:
@@ -269,7 +269,7 @@ requirements:
269
269
  - Ruby >= 2.5.0 recommended.
270
270
  - TLS requires OpenSSL >= 1.1.0.
271
271
  - Or Windows with Ruby >= 3.0.0 build with MingW and MingW as compiler.
272
- rubygems_version: 3.3.7
272
+ rubygems_version: 3.3.26
273
273
  signing_key:
274
274
  specification_version: 4
275
275
  summary: iodine - a fast HTTP / Websocket Server with Pub/Sub support, optimized for