iodine 0.7.52 → 0.7.53

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
  SHA256:
3
- metadata.gz: a785781b6a34e3c24c4a1f66e3d6ab25b3bee3cbd7021060182e85a10957e907
4
- data.tar.gz: 8f3df880cc02eb1e1a139c4a4e4b3c9e37c3240f31bc205ceea69b000a8ca33f
3
+ metadata.gz: 2d908d42070e3a604c33e2ea2cb565339779046a5c17bb9e72f85417ad5eed5c
4
+ data.tar.gz: 91ac3e4939b3ea93bcaa548d8688cf54e15841560237ec3e8e864b483add5a74
5
5
  SHA512:
6
- metadata.gz: eedc0f42ce25b27090b61a138d03a8e0a092b9f44a297396e354fea57091b7028de59ad76e9e7818c6ddd44120216a0fa776ed106f86386757f169f16c05289b
7
- data.tar.gz: f279e9c69f22e7361f300a561dc9310a026d128a319497e4ac170ca63cab875d67d219d688380b9f51894e4b5b298fb125f38cc0fbe82171ff1e3d25a6e4767f
6
+ metadata.gz: 9fbf367a02283bc139ff358ca383d596c68f2eebcae65f0f4bc4d47b2bf72f06dc19dc4a2418dd5d4b6864af857d693a7041fc4e25e4f2f08e92d57868590d79
7
+ data.tar.gz: 7e9f7fbdd64a134bc2a491d6ae5c1ed41a5d5995023135678d2905b5bd9662a09b9aea7fe07a0fd70c6d4935706a8a062ee948c7fd375307d64afe9e97180bf3
data/CHANGELOG.md CHANGED
@@ -6,12 +6,15 @@ 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.53 2023-01-13
10
+
11
+ **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
12
 
10
13
  #### Change log v.0.7.52 (2022-12-10)
11
14
 
12
- **Fix**: Fixes `Iodine.unsubscribe` which failed when a symbol was supplied. Credit to Alexander Pavlenko (@raxoft) for opening issue #134.
15
+ **Fix**: Fixes `Iodine.unsubscribe` which failed when a symbol was supplied. Credit to Patrik Rak (@raxoft) for opening issue #134.
13
16
 
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.
17
+ **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
18
 
16
19
  #### Change log v.0.7.51 (2022-12-03)
17
20
 
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 */
@@ -1,3 +1,3 @@
1
1
  module Iodine
2
- VERSION = '0.7.52'.freeze
2
+ VERSION = '0.7.53'.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.53
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-01-13 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.53.
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: