[PR #26] [MERGED] Call realpath to resolve symlinks correctly in disable_file #3510

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

📋 Pull Request Information

Original PR: https://github.com/netblue30/firejail/pull/26
Author: @ghost
Created: 8/15/2015
Status: Merged
Merged: 8/16/2015
Merged by: @netblue30

Base: masterHead: symlink-bug


📝 Commits (1)

  • 5076a73 Call realpath to resolve symlinks correctly in disable_file

📊 Changes

1 file changed (+11 additions, -15 deletions)

View changed files

📝 src/firejail/fs.c (+11 -15)

📄 Description

Firejail wasn't handling relative symlinks correctly (like when a symlink is ../file) and also wasn't handling multiple symlinks correctly (it could only handle one link, not a link to a link). This commit fixes that by calling the realpath function to do all the hard work for us.


🔄 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/26 **Author:** [@ghost](https://github.com/ghost) **Created:** 8/15/2015 **Status:** ✅ Merged **Merged:** 8/16/2015 **Merged by:** [@netblue30](https://github.com/netblue30) **Base:** `master` ← **Head:** `symlink-bug` --- ### 📝 Commits (1) - [`5076a73`](https://github.com/netblue30/firejail/commit/5076a73928cd9917fe78515e3dd91d957dd20063) Call realpath to resolve symlinks correctly in disable_file ### 📊 Changes **1 file changed** (+11 additions, -15 deletions) <details> <summary>View changed files</summary> 📝 `src/firejail/fs.c` (+11 -15) </details> ### 📄 Description Firejail wasn't handling relative symlinks correctly (like when a symlink is `../file`) and also wasn't handling multiple symlinks correctly (it could only handle one link, not a link to a link). This commit fixes that by calling the `realpath` function to do all the hard work for us. --- <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:02:45 -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#3510
No description provided.