[PR #5856] [MERGED] modif: Standardize and add missing name/hostname checks #5693

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

📋 Pull Request Information

Original PR: https://github.com/netblue30/firejail/pull/5856
Author: @kmk3
Created: 6/14/2023
Status: Merged
Merged: 6/19/2023
Merged by: @kmk3

Base: masterHead: standardize-name-checks


📝 Commits (6)

  • 10e9596 main.c: remove redundant has_cntrl_chars check
  • 052de47 util.c: increase name max length from 64 to 253
  • 9473881 util.c: check first/last char and allow extra chars
  • eb6c611 Standardize name/hostname checks
  • a519683 Add missing name/hostname checks
  • 6489138 docs: document NAME VALIDATION in firejail.txt

📊 Changes

4 files changed (+78 additions, -41 deletions)

View changed files

📝 src/firejail/main.c (+10 -19)
📝 src/firejail/profile.c (+15 -12)
📝 src/firejail/util.c (+31 -8)
📝 src/man/firejail.txt (+22 -2)

📄 Description

Main changes:

  • Unify name and hostname checks
  • Use only invalid_name to check the name and hostname instead of
    ad-hoc checks
  • Standardize empty/invalid error messages for name/hostname
  • Add missing name/hostname checks
  • docs: document NAME VALIDATION in firejail.txt

Note: This makes the hostname validation less strict, though it still
forbids control characters and only numbers.

Relates to #5578 #5708.

See also commit b4ffaa2 ("merges; more on cleaning up esc chars",
2023-02-14).

Cc: @layderv @netblue30


🔄 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/5856 **Author:** [@kmk3](https://github.com/kmk3) **Created:** 6/14/2023 **Status:** ✅ Merged **Merged:** 6/19/2023 **Merged by:** [@kmk3](https://github.com/kmk3) **Base:** `master` ← **Head:** `standardize-name-checks` --- ### 📝 Commits (6) - [`10e9596`](https://github.com/netblue30/firejail/commit/10e9596109514b6160b79f426c67e41a01bb16c4) main.c: remove redundant has_cntrl_chars check - [`052de47`](https://github.com/netblue30/firejail/commit/052de475b9c6fc0c4670fc202ed24f75d12b1148) util.c: increase name max length from 64 to 253 - [`9473881`](https://github.com/netblue30/firejail/commit/94738819b17cd03adbce6284a87f5fd0bb28d077) util.c: check first/last char and allow extra chars - [`eb6c611`](https://github.com/netblue30/firejail/commit/eb6c61154c37605842c3fed906405e3d9653f1ae) Standardize name/hostname checks - [`a519683`](https://github.com/netblue30/firejail/commit/a51968336dfa869be765e7109948725582971319) Add missing name/hostname checks - [`6489138`](https://github.com/netblue30/firejail/commit/6489138a5685df83b7b8ce490b7fcc64cde3fb38) docs: document NAME VALIDATION in firejail.txt ### 📊 Changes **4 files changed** (+78 additions, -41 deletions) <details> <summary>View changed files</summary> 📝 `src/firejail/main.c` (+10 -19) 📝 `src/firejail/profile.c` (+15 -12) 📝 `src/firejail/util.c` (+31 -8) 📝 `src/man/firejail.txt` (+22 -2) </details> ### 📄 Description Main changes: * Unify name and hostname checks * Use only `invalid_name` to check the name and hostname instead of ad-hoc checks * Standardize empty/invalid error messages for name/hostname * Add missing name/hostname checks * docs: document NAME VALIDATION in firejail.txt Note: This makes the hostname validation less strict, though it still forbids control characters and only numbers. Relates to #5578 #5708. See also commit b4ffaa2 ("merges; more on cleaning up esc chars", 2023-02-14). Cc: @layderv @netblue30 --- <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:43:10 -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#5693
No description provided.