latchset / tang

Tang binding daemon
GNU General Public License v3.0
468 stars 56 forks source link

tangd.socket: Set ownership and mode of jwkdir #108

Closed sgallagher closed 1 year ago

sgallagher commented 1 year ago

On OSTree-enabled systems (such as Fedora CoreOS), every update recreates the passwd and group files, which means that the dynamically-assigned ID and GID of the tang daemon may change, depending on the order of createuser calls. This patch ensures that starting the socket unit will fix any ownership issues in the jwkdir.

This is essentially moving the Fedora %post script out of RPM and into the systemd unit instead.