[GH-ISSUE #3145] Handle "non-standard" login.defs paths better #1976

Closed
opened 2026-05-05 08:38:25 -06:00 by gitea-mirror · 4 comments
Owner

Originally created by @danieru98 on GitHub (Jan 14, 2020).
Original GitHub issue: https://github.com/netblue30/firejail/issues/3145

On function init_uid_gid_min firejail tries to open /etc/login.defs. But on opensuse for example they recently moved this file to /usr/etc/login.defs https://lizards.opensuse.org/2019/12/05/yast-sprint-90/
This means that firejail will fail in the case where /etc/login.defs is not found and a user with uid/gid other than 1000 attemps to run it.

pclinux might also be affected http://www.pclinuxos.com/forum/index.php?topic=146992.0

Originally created by @danieru98 on GitHub (Jan 14, 2020). Original GitHub issue: https://github.com/netblue30/firejail/issues/3145 On function init_uid_gid_min firejail tries to open /etc/login.defs. But on opensuse for example they recently moved this file to /usr/etc/login.defs https://lizards.opensuse.org/2019/12/05/yast-sprint-90/ This means that firejail will fail in the case where /etc/login.defs is not found and a user with uid/gid other than 1000 attemps to run it. pclinux might also be affected http://www.pclinuxos.com/forum/index.php?topic=146992.0
gitea-mirror 2026-05-05 08:38:25 -06:00
  • closed this issue
  • added the
    bug
    label
Author
Owner

@ghost commented on GitHub (Jan 17, 2020):

@danieru98 Great detective work. Thank you for reporting and providing those links. I've tested a quick patch but that didn't pan out well. Let's hope that by marking this as a bug the main C collaborators can come up with a proper fix sooner rather than later.

<!-- gh-comment-id:575472438 --> @ghost commented on GitHub (Jan 17, 2020): @danieru98 Great detective work. Thank you for reporting and providing those links. I've tested a quick patch but that didn't pan out well. Let's hope that by marking this as a bug the main C collaborators can come up with a proper fix sooner rather than later.
Author
Owner

@ghost commented on GitHub (Jan 17, 2020):

@smitsohu Sorry to bother you (again), but have you seen this? Looks rather urgent and complicated, but I'm not the best to judge as I've never came close to an actual opensuse machine...

<!-- gh-comment-id:575473737 --> @ghost commented on GitHub (Jan 17, 2020): @smitsohu Sorry to bother you (again), but have you seen this? Looks rather urgent and complicated, but I'm not the best to judge as I've never came close to an actual opensuse machine...
Author
Owner

@smitsohu commented on GitHub (Jan 17, 2020):

Creating a second /etc hierarchy inside /usr is a quite significant change. It's not only about login.defs, there is also an impact on private-etc and maybe other options.

@danieru98 Do I understand it right that if there is a file /etc/login.defs it will take precedence over /usr/etc/login.defs?

<!-- gh-comment-id:575640732 --> @smitsohu commented on GitHub (Jan 17, 2020): Creating a second /etc hierarchy inside /usr is a quite significant change. It's not only about `login.defs`, there is also an impact on `private-etc` and maybe other options. @danieru98 Do I understand it right that if there is a file `/etc/login.defs` it will take precedence over `/usr/etc/login.defs`?
Author
Owner

@smitsohu commented on GitHub (Feb 9, 2020):

Thanks for the report!

<!-- gh-comment-id:583830301 --> @smitsohu commented on GitHub (Feb 9, 2020): Thanks for the report!
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#1976
No description provided.