summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorTobias Järvelöv <tobias.jarvelov@mullvad.net>2025-05-26 22:57:05 +0200
committerSebastian Holmin <sebastian.holmin@mullvad.net>2025-05-28 13:25:42 +0200
commit2263f2b906f43bf33e1ca9e6e1c44a56d448ab59 (patch)
tree44545097a9b9128084f346871766290e047ab7d2
parenteb4d97a5fca24bbbcb7c0fb9ad46f0ecf51e76f6 (diff)
downloadmullvadvpn-2263f2b906f43bf33e1ca9e6e1c44a56d448ab59.tar.xz
mullvadvpn-2263f2b906f43bf33e1ca9e6e1c44a56d448ab59.zip
Remove gid check when verifying daemon ownership on Linux and macOS
-rw-r--r--desktop/packages/mullvad-vpn/src/main/daemon-rpc.ts9
1 files changed, 2 insertions, 7 deletions
diff --git a/desktop/packages/mullvad-vpn/src/main/daemon-rpc.ts b/desktop/packages/mullvad-vpn/src/main/daemon-rpc.ts
index ff9acc8eca..d0d4244186 100644
--- a/desktop/packages/mullvad-vpn/src/main/daemon-rpc.ts
+++ b/desktop/packages/mullvad-vpn/src/main/daemon-rpc.ts
@@ -105,14 +105,9 @@ export class DaemonRpc extends GrpcClient {
} catch {
throw new Error('Failed to verify admin ownership of named pipe');
}
- } else if (process.platform === 'darwin') {
- const stat = fs.statSync(DAEMON_RPC_PATH);
- if (stat.uid !== 0 || stat.gid !== 1) {
- throw new Error('Failed to verify root ownership of socket');
- }
- } else if (process.platform === 'linux') {
+ } else {
const stat = fs.statSync(DAEMON_RPC_PATH);
- if (stat.uid !== 0 || stat.gid !== 0) {
+ if (stat.uid !== 0) {
throw new Error('Failed to verify root ownership of socket');
}
}