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

Feature request: Ability to define additional capabilites in systemd file #91

Open
joe-bowman opened this issue Nov 2, 2018 · 1 comment

Comments

@joe-bowman
Copy link

Using the pam-auth plugin that ships with OpenVPN, requires editing of the systemd file to add CAP_AUDIT_WRITE to be able to authenticate against PAM.

At present the formula does not manage the systemd file, and instead uses the one that ships with the package. Can we add the ability to amend the systemd file with the additional capabilty if required?

Thanks.

@aboe76
Copy link
Member

aboe76 commented Nov 2, 2018

if you wan't you can create a PR, with an pillar variable and an if statement to create a systemd override file..something like:

{%- if openvpn.cap_audit_write  %}
reload_systemd_configuration:
  cmd.wait:
    - name: systemctl daemon-reload
    - runas: root

openvpn_override:
  file.managed:
    - name: /etc/systemd/system/openvpn.service.d/10-pam-capability-fix.conf
    - contents: |
          [Service]
          CapabilityBoundingSet=
          CapabilityBoundingSet=CAP_IPC_LOCK CAP_NET_ADMIN CAP_NET_BIND_SERVICE CAP_NET_RAW CAP_SETGID CAP_SETUID CAP_SYS_CHROOT CAP_DAC_OVERRIDE CAP_AUDIT_WRITE
    - makedirs: True
    - watch_in:
      - cmd: reload_systemd_configuration
{% endif %}

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

2 participants