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

NAS-132001 / 25.04 / Fix __job_by_credential_and_id crashing for non-full-admins and internally ran jobs #14790

Merged
merged 2 commits into from
Oct 29, 2024

Conversation

themylogin
Copy link
Contributor

@themylogin themylogin commented Oct 28, 2024

@yocalebo please note that this only fixes half of the real issue. I created a new ticket for you to review and determine fix version https://ixsystems.atlassian.net/browse/NAS-132031

@bugclerk
Copy link
Contributor

@bugclerk bugclerk changed the title Fix __job_by_credential_and_id crashing for non-full-admins and internally ran jobs NAS-132001 / 25.04 / Fix __job_by_credential_and_id crashing for non-full-admins and internally ran jobs Oct 28, 2024
@themylogin
Copy link
Contributor Author

time 1:30

@yocalebo
Copy link
Contributor

@themylogin we missed the 24.10.0 boat. It's too late now. Not sure if you want to keep this ticket opened up or close it and push a new PR with what you described in the other PR?

@themylogin
Copy link
Contributor Author

@yocalebo we should merge it, this should still be fixed. The PR I opened is a separate issue.

@yocalebo
Copy link
Contributor

retest this please

@@ -101,6 +101,11 @@ def __job_by_credential_and_id(self, credential, job_id):

job = self.middleware.jobs[job_id]

if job.credentials is None:
raise CallError(
'Only users with full administrative privileges can download internal job logs', errno.EPERM,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can't someone hit this by running core.job_wait for any job that's owned by root?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You are correct. Fixed the error message.

@themylogin themylogin requested a review from anodos325 October 29, 2024 12:01
@bugclerk
Copy link
Contributor

This PR has been merged and conversations have been locked.
If you would like to discuss more about this issue please use our forums or raise a Jira ticket.

@truenas truenas locked as resolved and limited conversation to collaborators Oct 29, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants