From: Jonathan McDowell Date: Sat, 28 May 2022 18:12:28 +0000 (+0100) Subject: Use an onak subdir for the keyd socket X-Git-Tag: onak-0.6.2~6 X-Git-Url: https://the.earth.li/gitweb/?p=onak.git;a=commitdiff_plain;h=30a4eee133c15503dad435c8ce41953d94492c28 Use an onak subdir for the keyd socket Instead of putting keyd.sock file directly in /run create a /run/onak which can then be owned by the onak user. Otherwise keyd will have problems creating the socket when activated directly instead of via the socket unit file. --- diff --git a/debian/onak.service b/debian/onak.service index 8763784..c3ad674 100644 --- a/debian/onak.service +++ b/debian/onak.service @@ -4,6 +4,8 @@ Documentation=man:keyd [Service] User=onak +ExecStartPre=/bin/mkdir -m 0755 /run/onak +ExecStartPre=/bin/chown onak /run/onak ExecStart=/usr/sbin/keyd -f ExecStop=/usr/bin/keydctl quit diff --git a/debian/onak.socket b/debian/onak.socket index b62d283..a6af88f 100644 --- a/debian/onak.socket +++ b/debian/onak.socket @@ -1,5 +1,5 @@ [Socket] -ListenStream=/run/keyd.sock +ListenStream=/run/onak/keyd.sock SocketUser=onak SocketMode=0660 diff --git a/onak.ini.in b/onak.ini.in index 92e02d8..fd6b9e4 100644 --- a/onak.ini.in +++ b/onak.ini.in @@ -9,7 +9,7 @@ logfile=@CMAKE_INSTALL_FULL_LOCALSTATEDIR@/log/onak.log loglevel=3 ; Should we use the keyd backend? use_keyd=false -sock_dir=@CMAKE_INSTALL_FULL_RUNSTATEDIR@ +sock_dir=@CMAKE_INSTALL_FULL_RUNSTATEDIR@/onak ; Maximum number of keys to return in a reply to an index, verbose index or ; get. Setting it to -1 will allow any size of reply. max_reply_keys=128