forked from pool/nodejs18
Adam Majer
1f9bdb1024
OBS-URL: https://build.opensuse.org/package/show/devel:languages:nodejs/nodejs18?expand=0&rev=49
19 lines
912 B
Diff
19 lines
912 B
Diff
Index: node-v19.5.0/test/parallel/test-cluster-bind-privileged-port.js
|
|
===================================================================
|
|
--- node-v19.5.0.orig/test/parallel/test-cluster-bind-privileged-port.js
|
|
+++ node-v19.5.0/test/parallel/test-cluster-bind-privileged-port.js
|
|
@@ -24,11 +24,10 @@ const common = require('../common');
|
|
const assert = require('assert');
|
|
const cluster = require('cluster');
|
|
const net = require('net');
|
|
-const { execSync } = require('child_process');
|
|
+const { readFileSync } = require('fs');
|
|
|
|
if (common.isLinux) {
|
|
- const sysctlOutput = execSync('sysctl net.ipv4.ip_unprivileged_port_start').toString();
|
|
- const unprivilegedPortStart = parseInt(sysctlOutput.split(' ')[2], 10);
|
|
+ const unprivilegedPortStart = parseInt(readFileSync('/proc/sys/net/ipv4/ip_unprivileged_port_start'));
|
|
if (unprivilegedPortStart <= 42) {
|
|
common.skip('Port 42 is unprivileged');
|
|
}
|