summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Makefile.am36
-rw-r--r--configure.ac3
-rw-r--r--src/sss_client/sss_sudo.exports15
-rw-r--r--src/sss_client/sudo/libsss_sudo.pc.in12
4 files changed, 58 insertions, 8 deletions
diff --git a/Makefile.am b/Makefile.am
index f8082ed3..971a1496 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -39,6 +39,7 @@ logpath = @logpath@
pubconfpath = @pubconfpath@
pkgconfigdir = $(libdir)/pkgconfig
krb5rcachedir = @krb5rcachedir@
+sudolibdir = @appmodpath@
UNICODE_LIBS=@UNICODE_LIBS@
@@ -571,14 +572,11 @@ sss_debuglevel_LDADD = \
if BUILD_SUDO
sss_sudo_cli_SOURCES = \
- src/sss_client/sudo_testcli/sudo_testcli.c \
- src/sss_client/sudo/sss_sudo_response.c \
- src/sss_client/sudo/sss_sudo.c \
- src/sss_client/sudo/sss_sudo.h \
- src/sss_client/sudo/sss_sudo_private.h \
src/sss_client/common.c \
- src/sss_client/sss_cli.h
+ src/sss_client/sudo_testcli/sudo_testcli.c
sss_sudo_cli_CFLAGS = $(AM_CFLAGS)
+sss_sudo_cli_LDADD = \
+ libsss_sudo.la
endif
#################
@@ -869,9 +867,32 @@ pam_sss_la_LDFLAGS = \
-avoid-version \
-Wl,--version-script,$(srcdir)/src/sss_client/sss_pam.exports
+if BUILD_SUDO
+
+libsss_sudo_la_SOURCES = \
+ src/sss_client/common.c \
+ src/sss_client/sss_cli.h \
+ src/sss_client/sudo/sss_sudo_response.c \
+ src/sss_client/sudo/sss_sudo.c \
+ src/sss_client/sudo/sss_sudo.h \
+ src/sss_client/sudo/sss_sudo_private.h
+libsss_sudo_la_LDFLAGS = \
+ -Wl,--version-script,$(srcdir)/src/sss_client/sss_sudo.exports \
+ -version 1:0:0
+
+sudolib_LTLIBRARIES = libsss_sudo.la
+dist_pkgconfig_DATA += src/sss_client/sudo/libsss_sudo.pc
+
+include_HEADERS += \
+ src/sss_client/sudo/sss_sudo.h
+endif
+
dist_noinst_DATA += \
src/sss_client/sss_nss.exports \
src/sss_client/sss_pam.exports
+if BUILD_SUDO
+dist_noinst_DATA += src/sss_client/sss_sudo.exports
+endif
####################
# Plugin Libraries #
@@ -1191,7 +1212,8 @@ installsssddirs::
$(DESTDIR)$(dbpath) \
$(DESTDIR)$(pidpath) \
$(DESTDIR)$(logpath) \
- $(DESTDIR)$(pubconfpath)
+ $(DESTDIR)$(pubconfpath) \
+ $(DESTDIR)$(sudolibdir)
if HAVE_DOXYGEN
docs:
diff --git a/configure.ac b/configure.ac
index 2f9857a1..f338aaa1 100644
--- a/configure.ac
+++ b/configure.ac
@@ -231,5 +231,6 @@ AC_SUBST([abs_builddir], $abs_build_dir)
AC_CONFIG_FILES([Makefile contrib/sssd.spec src/examples/rwtab src/doxy.config
src/sysv/systemd/sssd.service po/Makefile.in src/man/Makefile
- src/providers/ipa/ipa_hbac.pc src/providers/ipa/ipa_hbac.doxy])
+ src/providers/ipa/ipa_hbac.pc src/providers/ipa/ipa_hbac.doxy
+ src/sss_client/sudo/libsss_sudo.pc])
AC_OUTPUT
diff --git a/src/sss_client/sss_sudo.exports b/src/sss_client/sss_sudo.exports
new file mode 100644
index 00000000..3f6bea30
--- /dev/null
+++ b/src/sss_client/sss_sudo.exports
@@ -0,0 +1,15 @@
+EXPORTED {
+
+ # public functions
+ global:
+
+ sss_sudo_send_recv;
+ sss_sudo_free_result;
+ sss_sudo_get_values;
+ sss_sudo_free_values;
+
+ # everything else is local
+ local:
+ *;
+};
+
diff --git a/src/sss_client/sudo/libsss_sudo.pc.in b/src/sss_client/sudo/libsss_sudo.pc.in
new file mode 100644
index 00000000..ba67fa98
--- /dev/null
+++ b/src/sss_client/sudo/libsss_sudo.pc.in
@@ -0,0 +1,12 @@
+prefix=@prefix@
+exec_prefix=@exec_prefix@
+libdir=@libdir@
+includedir=@includedir@
+
+Name: sss_sudo
+Description: A library to allow communication between SUDO and SSSD
+Version: @VERSION@
+Libs: -L@appmodpath@ -lsss_sudo
+Cflags:
+URL: http://fedorahosted.org/sssd/
+