-
Notifications
You must be signed in to change notification settings - Fork 75
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
timer: make jobs-status file world readable #2796
Conversation
Jira: This PR is not related to a Jira item. (The PR title does not include a SC-#### reference) GitHub Issues: Launchpad Bugs: No Launchpad bugs are fixed by this PR. (No commits have LP: #### references) Documentation: The changes in this PR do not require documentation changes. 👍 this comment to confirm that this is correct. |
if dpkg --compare-versions "$PREVIOUS_PKG_VER" lt "31~"; then | ||
if [ -f /var/lib/ubuntu-advantage/jobs-status.json ]; then | ||
chmod 0644 /var/lib/ubuntu-advantage/jobs-status.json | ||
fi | ||
fi | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does this change deserve a postinst transition? I think the next time the file is written it will get the new permissions anyway.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, I think you are right. My concern was that if the user disabled the timer jobs, we would not update the file, but this is not the case. I will remove this bit together with the manual test
features/collect_logs.feature
Outdated
@@ -1,5 +1,6 @@ | |||
Feature: Command behaviour when attached to an Ubuntu Pro subscription | |||
|
|||
@wip |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
some @wip
s left behind 🙃
When running collect-logs as non-root, we might fail trying to collect the jobs-status information. Since there is no private date in this file, we are making it world readable now. Fixes: #2601
175d763
to
46e11e6
Compare
@orndorffgrant updated |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM thank you!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Why is this needed?
When running collect-logs as non-root, we might fail trying to collect the jobs-status information. Since there is no private date in this file, we are making it world readable now.
Fixes: #2601
Test Steps
Run the modified integration test and the manual test in this PR
Checklist
Does this PR require extra reviews?