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

Create temporary files to be shared between uses in /tmp #4500

Merged
merged 1 commit into from
Jul 14, 2023

Conversation

rcritten
Copy link
Contributor

Some commands need to be executed as the pki user and not root to retain filesystem permissions. There are a few places where passwords are written to files as root to be passed into commands executed by pkiuser.

If a private temporary directory is set before pkispawn is called then this method for sharing passwords between users will not work because the file will be unreadable.

So force these calls to use /tmp directly instead of the private temporary directory.

Fixes: #4475

Some commands need to be executed as the pki user and not
root to retain filesystem permissions. There are a few
places where passwords are written to files as root to be
passed into commands executed by pkiuser.

If a private temporary directory is set before pkispawn
is called then this method for sharing passwords between
users will not work because the file will be unreadable.

So force these calls to use /tmp directly instead of the
private temporary directory.

Fixes: dogtagpki#4475

Signed-off-by: Rob Crittenden <[email protected]>
@rcritten
Copy link
Contributor Author

This should be backported to 11.3 and 11.4. I can open those PRs as well if desired.

@sonarcloud
Copy link

sonarcloud bot commented Jul 14, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

0.0% 0.0% Coverage
7.1% 7.1% Duplication

@ckelleyRH
Copy link
Contributor

This should be backported to 11.3 and 11.4. I can open those PRs as well if desired.

Should the CI be happy on master I will backport it for you @rcritten.

@ckelleyRH ckelleyRH merged commit 3a611ff into dogtagpki:master Jul 14, 2023
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.

Don't assume user's temp directory is traversable
2 participants