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

Remove need for running test suite as root #15

Open
phmccarty opened this issue Feb 4, 2021 · 0 comments
Open

Remove need for running test suite as root #15

phmccarty opened this issue Feb 4, 2021 · 0 comments

Comments

@phmccarty
Copy link
Contributor

phmccarty commented Feb 4, 2021

After the bspatch program applies a delta to FILE1 to produce FILE2, it runs chmod(2) and chown(2) to set permissions and ownership for FILE2 according to the metadata in the delta file.

This behavior is a convenience for some use cases. For example, consumers of the delta files (like swupd from swupd-client) do not have to bother running the ownership/permission modifications on FILE2 after an update.

But from a testing perspective, requiring root privileges to apply delta files is an inconvenience when those delta files specify to change ownership to an arbitrary user ID and group ID, and the user running the test suite might lack privileges to carry out the operation.

To sidestep the root requirement, it would be nice to either make the chmod(2) and chown(2) calls optional in some way, or add a mechanism to hotpatch delta files on-the-fly to set the user/group ID to the effective user/group ID of the calling process, specifically for the test suite.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant