# -----------------------------------------------------------------------------
# cockpit-session

libexec_PROGRAMS += cockpit-session

cockpit_session_LDADD = \
	$(libcockpit_common_nodeps_a_LIBS) \
	$(krb5_LIBS) \
	$(libsystemd_LIBS) \
	-lpam \
	$(NULL)

cockpit_session_SOURCES = \
	src/common/cockpitclosefrom.c \
	src/common/cockpithacks.h \
	src/session/client-certificate.h \
	src/session/client-certificate.c \
	src/session/client-certificate.h \
	src/session/session-utils.c \
	src/session/session-utils.h \
	src/session/session.c \
	$(NULL)

# set up cockpit-session to be setuid root, but only runnable by cockpit-session
install-exec-hook::
	chown -f root:cockpit-wsinstance $(DESTDIR)$(libexecdir)/cockpit-session || true
	chmod -f 4750 $(DESTDIR)$(libexecdir)/cockpit-session || true
