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

add run-as to run hook in other user context #645

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

malaupa
Copy link

@malaupa malaupa commented Jul 5, 2023

This PR introduces the use of syscall.SysProcAttr.Credential to set uid and gid. These values are queried using os/user.Lookup with a given username.

It would be nice to have this option available, for instance, file operations with different user context than root is often necessary.

@adnanh
Copy link
Owner

adnanh commented Apr 16, 2024

Hey, thank you for your contribution! This should already be possible to achieve using the -setuid and -setgid flags.

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.

2 participants