[PR #319] [MERGED] Add compile-time option to restrict --net= to root only #3596

Closed
opened 2026-05-05 10:04:19 -06:00 by gitea-mirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/netblue30/firejail/pull/319
Author: @yumkam
Created: 2/23/2016
Status: Merged
Merged: 2/24/2016
Merged by: @netblue30

Base: masterHead: network-restricted


📝 Commits (1)

  • 4db1a65 Add compile-time option to restrict --net= to root only

📊 Changes

2 files changed (+9 additions, -0 deletions)

View changed files

📝 configure.ac (+3 -0)
📝 src/firejail/main.c (+6 -0)

📄 Description

./configure --enable-network=restricted allows only --net=none to non-root users.

Other variants delegate too much power to non-root users and dangerous (it completely bypasses system-wide firewall and routing, it allows introducing arbitrary-chosen MAC and IP interfaces on LAN [disregarding DHCP policy], etc).

Root already had power to twiddle with anything, so no sense to restrain her, and --net=none looks safe enough (and still useful) for ordinary users (and permitted via unshare -rn anyway).

See #290


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/netblue30/firejail/pull/319 **Author:** [@yumkam](https://github.com/yumkam) **Created:** 2/23/2016 **Status:** ✅ Merged **Merged:** 2/24/2016 **Merged by:** [@netblue30](https://github.com/netblue30) **Base:** `master` ← **Head:** `network-restricted` --- ### 📝 Commits (1) - [`4db1a65`](https://github.com/netblue30/firejail/commit/4db1a65a0775ce3cc65febc41ac84f5cfc81a51c) Add compile-time option to restrict --net= to root only ### 📊 Changes **2 files changed** (+9 additions, -0 deletions) <details> <summary>View changed files</summary> 📝 `configure.ac` (+3 -0) 📝 `src/firejail/main.c` (+6 -0) </details> ### 📄 Description ./configure --enable-network=restricted allows only `--net=none` to non-root users. Other variants delegate too much power to non-root users and dangerous (it completely bypasses system-wide firewall and routing, it allows introducing arbitrary-chosen MAC and IP interfaces on LAN [disregarding DHCP policy], etc). Root already had power to twiddle with anything, so no sense to restrain her, and `--net=none` looks safe enough (and still useful) for ordinary users (and permitted via `unshare -rn` anyway). See #290 --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
gitea-mirror 2026-05-05 10:04:19 -06:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: github-starred/firejail#3596
No description provided.