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

Access SO_PASSCRED credentials in handler #74

Open
Natureshadow opened this issue Mar 30, 2023 · 0 comments
Open

Access SO_PASSCRED credentials in handler #74

Natureshadow opened this issue Mar 30, 2023 · 0 comments

Comments

@Natureshadow
Copy link

While writing a backend for systemd-userdbd, which uses Varlink, I need to authorize user access to the Varlink service depending on the credentials passed over the Unix socket using SO_PASSCRED.

I am not sure how to best do that. Two options that come to mind are:

  • Pass the socket to the handler method – in that case, I could try to get the SO_PASSCRED message directly
  • Support SO_PASSCRED (and SO_PEERCRED) natively in the Varlink crate, and provide an interface to determine client credentials

Some advice or thoughts on how it could be done would be welcome.

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

No branches or pull requests

1 participant