[PR #2158] [MERGED] Add support for rudimentary conditionals in profiles #4190

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

📋 Pull Request Information

Original PR: https://github.com/netblue30/firejail/pull/2158
Author: @crass
Created: 10/10/2018
Status: Merged
Merged: 10/17/2018
Merged by: @crass

Base: masterHead: profile_conditional


📝 Commits (2)

  • dbf8d44 Add support for rudimentary conditionals in profiles, currently only the HAS_APPIMAGE conditional is supported.
  • b9e7412 Update documentation for profile conditionals.

📊 Changes

3 files changed (+100 additions, -0 deletions)

View changed files

📝 etc/whitelist-common.inc (+1 -0)
📝 src/firejail/profile.c (+87 -0)
📝 src/man/firejail-profile.txt (+12 -0)

📄 Description

This was suggested in #2147. The feature is designed to be extensible, though currently only HAS_APPIMAGE is supported. The conditional profile line is of the form ? + <conditional> + <normal profile line>. I've included in whitelist-common.inc the line ?HAS_APPIMAGE whitelist ${HOME}/.local/share/appimagekit, which demonstrates usage of this feature and solves #2147.

It should be noted that conditionals cannot be used for quiet or include profile lines. There is appropriate error messaging if the user tries this.


🔄 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/2158 **Author:** [@crass](https://github.com/crass) **Created:** 10/10/2018 **Status:** ✅ Merged **Merged:** 10/17/2018 **Merged by:** [@crass](https://github.com/crass) **Base:** `master` ← **Head:** `profile_conditional` --- ### 📝 Commits (2) - [`dbf8d44`](https://github.com/netblue30/firejail/commit/dbf8d44df8ed36fd4345c65b10fadd22c5572cf9) Add support for rudimentary conditionals in profiles, currently only the HAS_APPIMAGE conditional is supported. - [`b9e7412`](https://github.com/netblue30/firejail/commit/b9e74120dd771e077c29355192827b12fc15a631) Update documentation for profile conditionals. ### 📊 Changes **3 files changed** (+100 additions, -0 deletions) <details> <summary>View changed files</summary> 📝 `etc/whitelist-common.inc` (+1 -0) 📝 `src/firejail/profile.c` (+87 -0) 📝 `src/man/firejail-profile.txt` (+12 -0) </details> ### 📄 Description This was suggested in #2147. The feature is designed to be extensible, though currently only `HAS_APPIMAGE` is supported. The conditional profile line is of the form `?` + `<conditional>` + ` <normal profile line>`. I've included in `whitelist-common.inc` the line `?HAS_APPIMAGE whitelist ${HOME}/.local/share/appimagekit`, which demonstrates usage of this feature and solves #2147. It should be noted that conditionals cannot be used for `quiet` or `include` profile lines. There is appropriate error messaging if the user tries this. --- <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:15:24 -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#4190
No description provided.