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

tests for running as a normal user #49

Open
sbrudenell opened this issue Aug 9, 2024 · 0 comments
Open

tests for running as a normal user #49

sbrudenell opened this issue Aug 9, 2024 · 0 comments
Assignees
Labels
tests Testing infrastructure

Comments

@sbrudenell
Copy link
Owner

I tried adding some naive tests to run as a normal user, but among other things, btrfs send fails with EPERM-related failures.

the send ioctl, and others, require CAP_SYS_ADMIN. in order to simulate a non-root user with this, we need to retain the capability while dropping root. the dance to do this is documented here. but the linux capability-related functions aren't currently mapped in python (an ancient bug).

I expect the best move is to call these functions with ctypes.

@sbrudenell sbrudenell added the tests Testing infrastructure label Aug 9, 2024
@sbrudenell sbrudenell self-assigned this Aug 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
tests Testing infrastructure
Projects
None yet
Development

No branches or pull requests

1 participant