Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

apport: create /var/crash with setgid permission #349

Merged
merged 2 commits into from
Jun 13, 2024

Conversation

bdrung
Copy link
Collaborator

@bdrung bdrung commented Jun 13, 2024

In case /var/crash exists, let apport --start not modify the permission of the directory. Otherwise the permission might be changed to an unwanted mode (see discussion in the linked bug).

Create /var/crash with mode 3777 instead of 1777 to have the setgid permission set. The setgid permission causes crash files created in /var/crash to inherit its group ownership.

Bug: https://launchpad.net/bugs/2066995

In case `/var/crash` exists, let `apport --start` not modify the
permission of the directory. Otherwise the permission might be changed
to an unwanted mode (see discussion in the linked bug).

Bug: https://launchpad.net/bugs/2066995
Create `/var/crash` with mode 3777 instead of 1777 to have the `setgid`
permission set. The `setgid` permission causes crash files created in
`/var/crash` to inherit its group ownership.

Bug: https://launchpad.net/bugs/2066995
Signed-off-by: Benjamin Drung <benjamin.drung@canonical.com>
Copy link

codecov bot commented Jun 13, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 82.28%. Comparing base (9b1bd02) to head (9876313).

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #349      +/-   ##
==========================================
+ Coverage   82.07%   82.28%   +0.20%     
==========================================
  Files          96       96              
  Lines       19819    19820       +1     
  Branches     3211     3215       +4     
==========================================
+ Hits        16266    16308      +42     
+ Misses       3027     2998      -29     
+ Partials      526      514      -12     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@bdrung bdrung requested a review from schopin-pro June 13, 2024 13:44
@schopin-pro schopin-pro merged commit 95ac088 into canonical:main Jun 13, 2024
18 checks passed
@bdrung bdrung deleted the crashdir-permission branch June 13, 2024 13:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants