[PR #7074] [MERGED] modif: improve feature disabled warning/error messages #6305

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

📋 Pull Request Information

Original PR: https://github.com/netblue30/firejail/pull/7074
Author: @kmk3
Created: 2/20/2026
Status: Merged
Merged: 2/21/2026
Merged by: @kmk3

Base: masterHead: improve-config-disabled-msgs


📝 Commits (8)

  • 5736051 profile.c: remove redundant arg_quiet checks
  • 1e31423 firejail.h: add CFG_NONE to CFG enum
  • b7a6adf firejail.h: sort CFG enum
  • 3192a24 checkcfg.c: sort PARSE_YESNO section
  • be63ce1 checkcfg.c: add cfgstr map of CFG enum and config name
  • 56cf205 main.c: add noreturn attribute to exit_err_feature()
  • 9f55fd8 checkcfg.c: move feature warning/error functions into it
  • 4efbed7 modif: improve feature disabled warning/error messages

📊 Changes

4 files changed (+219 additions, -168 deletions)

View changed files

📝 src/firejail/checkcfg.c (+73 -15)
📝 src/firejail/firejail.h (+24 -19)
📝 src/firejail/main.c (+75 -82)
📝 src/firejail/profile.c (+47 -52)

📄 Description

Ensure that each message includes the relevant command that triggered
the message, the path to firejail.config and the source location for the
command (in the case of profiles).

Also, make sure to print the exact feature name from firejail.config and
put it in quotes.

Before:

$ firejail --noprofile --netfilter /bin/true
Error: networking feature is disabled in Firejail configuration file /etc/firejail/firejail.config
$ firejail /bin/true
Reading profile /etc/firejail/default.profile
[...]
Warning: networking feature is disabled in Firejail configuration file

After:

$ firejail --noprofile --netfilter /bin/true
Error: 'network' feature is disabled in /etc/firejail/firejail.config: --netfilter
$ firejail /bin/true
Reading profile /etc/firejail/default.profile
[...]
Warning: /etc/firejail/default.profile:32: ignoring command because 'network' feature is disabled in /etc/firejail/firejail.config: netfilter

Relates to #6456 #7073.

Kind of relates to #3574.

Reported-by: @YASOONA
Reported-by: @ginto37


🔄 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/7074 **Author:** [@kmk3](https://github.com/kmk3) **Created:** 2/20/2026 **Status:** ✅ Merged **Merged:** 2/21/2026 **Merged by:** [@kmk3](https://github.com/kmk3) **Base:** `master` ← **Head:** `improve-config-disabled-msgs` --- ### 📝 Commits (8) - [`5736051`](https://github.com/netblue30/firejail/commit/573605160219e1900250cfa203cde0e60893f801) profile.c: remove redundant arg_quiet checks - [`1e31423`](https://github.com/netblue30/firejail/commit/1e31423359fd7b15c7d6d3fa8d4c1418a4b36856) firejail.h: add CFG_NONE to CFG enum - [`b7a6adf`](https://github.com/netblue30/firejail/commit/b7a6adf7ca1375ccd64cd7f8ebb53f0dea30efa3) firejail.h: sort CFG enum - [`3192a24`](https://github.com/netblue30/firejail/commit/3192a24c2497a1bc18616d06102b334a7b52d962) checkcfg.c: sort PARSE_YESNO section - [`be63ce1`](https://github.com/netblue30/firejail/commit/be63ce1d37c93973e3bef978274b873416066061) checkcfg.c: add cfgstr map of CFG enum and config name - [`56cf205`](https://github.com/netblue30/firejail/commit/56cf205c8c8875fbe053063117f5017578196834) main.c: add noreturn attribute to exit_err_feature() - [`9f55fd8`](https://github.com/netblue30/firejail/commit/9f55fd8792e6c759cd78e634365c6c2810fb30b9) checkcfg.c: move feature warning/error functions into it - [`4efbed7`](https://github.com/netblue30/firejail/commit/4efbed7eba50c43d35a412a4483f62160d42243a) modif: improve feature disabled warning/error messages ### 📊 Changes **4 files changed** (+219 additions, -168 deletions) <details> <summary>View changed files</summary> 📝 `src/firejail/checkcfg.c` (+73 -15) 📝 `src/firejail/firejail.h` (+24 -19) 📝 `src/firejail/main.c` (+75 -82) 📝 `src/firejail/profile.c` (+47 -52) </details> ### 📄 Description Ensure that each message includes the relevant command that triggered the message, the path to firejail.config and the source location for the command (in the case of profiles). Also, make sure to print the exact feature name from firejail.config and put it in quotes. Before: $ firejail --noprofile --netfilter /bin/true Error: networking feature is disabled in Firejail configuration file /etc/firejail/firejail.config $ firejail /bin/true Reading profile /etc/firejail/default.profile [...] Warning: networking feature is disabled in Firejail configuration file After: $ firejail --noprofile --netfilter /bin/true Error: 'network' feature is disabled in /etc/firejail/firejail.config: --netfilter $ firejail /bin/true Reading profile /etc/firejail/default.profile [...] Warning: /etc/firejail/default.profile:32: ignoring command because 'network' feature is disabled in /etc/firejail/firejail.config: netfilter Relates to #6456 #7073. Kind of relates to #3574. Reported-by: @YASOONA Reported-by: @ginto37 --- <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:54:28 -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#6305
No description provided.