We previously added a sysusers file, but missed the 'virtlogin' group.
This group is used to make the virt-login-shell binary setgid, so we
shoudl be registering that too. It must be done in a separate sysusers
file, however, since it is packaged separately from the daemons.
Fixes: a2c3e390f7bedf36f4ddc544d09fe3b8772c5c6f
Reviewed-by: Jiri Denemark <jdenemar@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
%package login-shell
Summary: Login shell for connecting users to an LXC container
Requires: libvirt-libs = %{version}-%{release}
+# For uid creation during pre
+Requires(pre): shadow-utils
%description login-shell
Provides the set-uid virt-login-shell binary that is used to
%attr(4750, root, virtlogin) %{_bindir}/virt-login-shell
%{_libexecdir}/virt-login-shell-helper
%config(noreplace) %{_sysconfdir}/libvirt/virt-login-shell.conf
+%{_sysusersdir}/libvirt-login-shell.conf
%{_mandir}/man1/virt-login-shell.1*
%endif
--- /dev/null
+g virtlogin -
)
install_data('virt-login-shell.conf', install_dir: sysconfdir / 'libvirt')
+
+ # Install the sysuser config for the setgid binary
+ install_data(
+ 'libvirt-login-shell.sysusers.conf',
+ install_dir: sysusersdir,
+ rename: [ 'libvirt-login-shell.conf' ],
+ )
endif
if host_machine.system() == 'windows'