[PR #6305] [MERGED] landlock: amend empty functions and comments #5945

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

📋 Pull Request Information

Original PR: https://github.com/netblue30/firejail/pull/6305
Author: @kmk3
Created: 4/10/2024
Status: Merged
Merged: 4/11/2024
Merged by: @netblue30

Base: masterHead: landlock-amend-empty


📝 Commits (1)

  • a05ae97 landlock: amend empty functions and comments

📊 Changes

3 files changed (+17 additions, -5 deletions)

View changed files

📝 src/firejail/firejail.h (+0 -2)
📝 src/firejail/landlock.c (+13 -1)
📝 src/firejail/profile.c (+4 -2)

📄 Description

Changes:

  • Always declare public landlock functions, regardless of
    HAVE_LANDLOCK
  • Make the other public landlock functions (besides ll_add_profile)
    also be empty when HAVE_LANDLOCK is not defined
  • Clarify related comments

This amends commit 8259f66e1 ("landlock fix for old kernel versions",
2024-04-06).

For clarity, landlock-common.inc is included by default.profile and the
issue that the aforementioned commit fixes is that if profile.c is built
without the part that parses landlock commands (that is, when
HAVE_LANDLOCK is not defined), using default.profile would cause
firejail to abort due to "invalid lines".

Note that the issue would only occur when firejail is built with an
older kernel (or with --disable-landlock), not when simply running on an
older kernel.

See also commit b02a7a337 ("landlock: remove empty functions",
2023-12-07).

Relates to #6078.


🔄 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/6305 **Author:** [@kmk3](https://github.com/kmk3) **Created:** 4/10/2024 **Status:** ✅ Merged **Merged:** 4/11/2024 **Merged by:** [@netblue30](https://github.com/netblue30) **Base:** `master` ← **Head:** `landlock-amend-empty` --- ### 📝 Commits (1) - [`a05ae97`](https://github.com/netblue30/firejail/commit/a05ae97af2a52b8349d732fecbc4343c86222400) landlock: amend empty functions and comments ### 📊 Changes **3 files changed** (+17 additions, -5 deletions) <details> <summary>View changed files</summary> 📝 `src/firejail/firejail.h` (+0 -2) 📝 `src/firejail/landlock.c` (+13 -1) 📝 `src/firejail/profile.c` (+4 -2) </details> ### 📄 Description Changes: * Always declare public landlock functions, regardless of `HAVE_LANDLOCK` * Make the other public landlock functions (besides `ll_add_profile`) also be empty when `HAVE_LANDLOCK` is not defined * Clarify related comments This amends commit 8259f66e1 ("landlock fix for old kernel versions", 2024-04-06). For clarity, landlock-common.inc is included by default.profile and the issue that the aforementioned commit fixes is that if profile.c is built without the part that parses landlock commands (that is, when `HAVE_LANDLOCK` is not defined), using default.profile would cause firejail to abort due to "invalid lines". Note that the issue would only occur when firejail is built with an older kernel (or with --disable-landlock), not when simply running on an older kernel. See also commit b02a7a337 ("landlock: remove empty functions", 2023-12-07). Relates to #6078. --- <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:47:50 -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#5945
No description provided.