summaryrefslogtreecommitdiffstats
path: root/Makefile.am
diff options
context:
space:
mode:
authorJakub Hrozek <jhrozek@redhat.com>2016-08-01 12:52:07 +0200
committerJakub Hrozek <jhrozek@redhat.com>2017-03-27 09:56:19 +0200
commitb9c563c29243291f40489bb0dcbf3946fca72d58 (patch)
tree5659fa3d01b0f1745f769438685e6d2524230d15 /Makefile.am
parent1dbf09404e20b6e30a24afe72b6d349734aee62f (diff)
downloadsssd-b9c563c29243291f40489bb0dcbf3946fca72d58.tar.gz
sssd-b9c563c29243291f40489bb0dcbf3946fca72d58.tar.xz
sssd-b9c563c29243291f40489bb0dcbf3946fca72d58.zip
KCM: Initial responder build and packaging
Adds the initial build of the Kerberos Cache Manager responder (KCM). This is a deamon that is capable of holding and storing Kerberos ccaches. When KCM is used, the kerberos libraries (invoked through e.g. kinit) are referred to as a 'client' and the KCM deamon is referred to as 'server'. At the moment, only the Heimdal implementation of Kerberos implements the KCM server: https://www.h5l.org/manual/HEAD/info/heimdal/Credential-cache-server-_002d-KCM.html This patch adds a KCM server to SSSD. In MIT, only the 'client-side' support was added: http://k5wiki.kerberos.org/wiki/Projects/KCM_client This page also describes the protocol between the client and the server. The client is capable of talking to the server over either UNIX sockets (Linux, most Unixes) or Mach RPC (macOS). Our server only implements the UNIX sockets way and should be socket-activated by systemd, although can in theory be also ran explicitly. The KCM server only builds if the configuration option "--with-kcm" is enabled. It is packaged in a new subpackage sssd-kcm in order to allow distributions to enable the KCM credential caches by installing this subpackage only, without the rest of the SSSD. The sssd-kcm subpackage also includes a krb5.conf.d snippet that allows the admin to just uncomment the KCM defaults and instructs them to start the socket. The server can be configured in sssd.conf in the "[kcm]" section. By default, the server only listens on the same socket path the Heimdal server uses, which is "/var/run/.heim_org.h5l.kcm-socket". This is, however, configurable. The file src/responder/kcm/kcm.h is more or less directly imported from the MIT Kerberos tree, with an additional sentinel code and some comments. Not all KCM operations are implemented, only those that also the MIT client implements. That said, this KCM server should also be usable with a Heimdal client, although no special testing was with this hybrid. The patch also adds several error codes that will be used in later patches. Related to: https://pagure.io/SSSD/sssd/issue/2887 Reviewed-by: Michal Židek <mzidek@redhat.com> Reviewed-by: Simo Sorce <simo@redhat.com>
Diffstat (limited to 'Makefile.am')
-rw-r--r--Makefile.am53
1 files changed, 53 insertions, 0 deletions
diff --git a/Makefile.am b/Makefile.am
index 7516338bc..4248536e9 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -87,6 +87,7 @@ sudolibdir = @sudolibpath@
polkitdir = @polkitdir@
pamconfdir = $(sysconfdir)/pam.d
systemtap_tapdir = @tapset_dir@
+krb5sysincludedir = $(sysconfdir)/krb5.conf.d
if HAVE_SYSTEMD_UNIT
ifp_exec_cmd = $(sssdlibexecdir)/sssd_ifp --uid 0 --gid 0 --debug-to-files --dbus-activated
@@ -186,6 +187,11 @@ endif
if BUILD_SECRETS
sssdlibexec_PROGRAMS += sssd_secrets
endif
+if BUILD_KCM
+sssdlibexec_PROGRAMS += sssd_kcm
+dist_krb5sysinclude_DATA = contrib/kcm_default_ccache
+endif
+
if BUILD_PAC_RESPONDER
sssdlibexec_PROGRAMS += sssd_pac
@@ -703,6 +709,8 @@ dist_noinst_HEADERS = \
src/responder/secrets/secsrv_private.h \
src/responder/secrets/secsrv_local.h \
src/responder/secrets/secsrv_proxy.h \
+ src/responder/kcm/kcm.h \
+ src/responder/kcm/kcmsrv_pvt.h \
src/sbus/sbus_client.h \
src/sbus/sssd_dbus.h \
src/sbus/sssd_dbus_meta.h \
@@ -1476,6 +1484,24 @@ sssd_secrets_LDADD = \
$(NULL)
endif
+if BUILD_KCM
+sssd_kcm_SOURCES = \
+ src/responder/kcm/kcm.c \
+ src/responder/kcm/kcmsrv_cmd.c \
+ src/util/sss_sockets.c \
+ $(SSSD_RESPONDER_OBJ) \
+ $(NULL)
+sssd_kcm_CFLAGS = \
+ $(AM_CFLAGS) \
+ $(KRB5_CFLAGS) \
+ $(NULL)
+sssd_kcm_LDADD = \
+ $(KRB5_LIBS) \
+ $(SSSD_LIBS) \
+ $(SSSD_INTERNAL_LTLIBS) \
+ $(NULL)
+endif
+
sssd_be_SOURCES = \
src/providers/data_provider_be.c \
src/providers/data_provider_req.c \
@@ -4259,6 +4285,12 @@ if BUILD_SUDO
src/sysv/systemd/sssd-sudo.service \
$(NULL)
endif
+if BUILD_KCM
+ systemdunit_DATA += \
+ src/sysv/systemd/sssd-kcm.socket \
+ src/sysv/systemd/sssd-kcm.service \
+ $(NULL)
+endif
if WITH_JOURNALD
systemdconf_DATA += \
src/sysv/systemd/journal.conf
@@ -4350,6 +4382,12 @@ EXTRA_DIST += \
src/sysv/systemd/sssd-sudo.service.in \
$(NULL)
endif
+if BUILD_KCM
+EXTRA_DIST += \
+ src/sysv/systemd/sssd-kcm.socket.in \
+ src/sysv/systemd/sssd-kcm.service.in \
+ $(NULL)
+endif
src/sysv/systemd/sssd.service: src/sysv/systemd/sssd.service.in Makefile
@$(MKDIR_P) src/sysv/systemd/
@@ -4433,6 +4471,16 @@ src/sysv/systemd/sssd-sudo.service: src/sysv/systemd/sssd-sudo.service.in Makefi
$(replace_script)
endif
+if BUILD_KCM
+src/sysv/systemd/sssd-kcm.socket: src/sysv/systemd/sssd-kcm.socket.in Makefile
+ @$(MKDIR_P) src/sysv/systemd/
+ $(replace_script)
+
+src/sysv/systemd/sssd-kcm.service: src/sysv/systemd/sssd-kcm.service.in Makefile
+ @$(MKDIR_P) src/sysv/systemd/
+ $(replace_script)
+endif
+
SSSD_USER_DIRS = \
$(DESTDIR)$(dbpath) \
$(DESTDIR)$(keytabdir) \
@@ -4596,6 +4644,9 @@ install-data-hook:
if BUILD_SAMBA
mv $(DESTDIR)/$(winbindplugindir)/winbind_idmap_sss.so $(DESTDIR)/$(winbindplugindir)/sss.so
endif
+if BUILD_KCM
+ $(MKDIR_P) $(DESTDIR)/$(krb5sysincludedir)
+endif
uninstall-hook:
if [ -f $(abs_builddir)/src/config/.files2 ]; then \
@@ -4670,6 +4721,8 @@ endif
rm -f $(builddir)/src/sysv/systemd/sssd-sudo.service
rm -f $(builddir)/src/sysv/systemd/sssd-secrets.socket
rm -f $(builddir)/src/sysv/systemd/sssd-secrets.service
+ rm -f $(builddir)/src/sysv/systemd/sssd-kcm.socket
+ rm -f $(builddir)/src/sysv/systemd/sssd-kcm.service
rm -f $(builddir)/src/sysv/systemd/journal.conf
CLEANFILES += *.X */*.X */*/*.X