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

Use Unix.getuid instead of getlogin #27

Merged
merged 1 commit into from
Jul 17, 2021
Merged

Use Unix.getuid instead of getlogin #27

merged 1 commit into from
Jul 17, 2021

Conversation

SquidDev
Copy link
Contributor

This ensures that processes launched via sudo -u can access the bus.

While this does mean we're using Unix instead of Lwt_unix, in practice I don't think this matters as getuid is incredibly cheap.

This ensures that processes launched via sudo (rather than machinectl
shell --user) can access the bus.
@SquidDev SquidDev requested a review from pmetzger as a code owner June 16, 2021 13:09
@meadofpoetry
Copy link
Collaborator

The only thing that concerns me here is that this wont work on windows. But tbh I don't know if it works on windows, nor that anybody uses it there, so let's merge it that way.

@meadofpoetry meadofpoetry merged commit 0c5ec96 into ocaml-community:master Jul 17, 2021
@meadofpoetry
Copy link
Collaborator

Thanks for contribution

@SquidDev SquidDev deleted the hotfix/uid-check branch July 17, 2021 10:51
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