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 support for systemd socket activation #704

Merged
merged 3 commits into from
Oct 25, 2024

Commits on Oct 25, 2024

  1. feat: add support for systemd socket activation

    If webhook has been launched via systemd socket activation, simply use the systemd-provided socket rather than opening our own.
    ianroberts committed Oct 25, 2024
    Configuration menu
    Copy the full SHA
    b00e932 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    661a96f View commit details
    Browse the repository at this point in the history
  3. refactor: moved setuid and setgid flags into platform-specific section

    The setuid and setgid flags do not work on Windows, so moved them to platform_unix so they are only added to the flag set on compatible platforms.
    
    Also disallow the use of setuid and setgid in combination with -socket, since a setuid webhook process would not be able to clean up a socket that was created while running as root.  If you _need_ to have the socket owned by root but the webhook process running as a normal user, you can achieve the same effect with systemd socket activation.
    ianroberts committed Oct 25, 2024
    Configuration menu
    Copy the full SHA
    ee918ac View commit details
    Browse the repository at this point in the history