From 723fdd5a2327b71d5a326c8c4b5e21f652085b48 Mon Sep 17 00:00:00 2001
From: Stephen Gallagher <sgallagh@redhat.com>
Date: Tue, 16 Jun 2009 15:18:06 -0400
Subject: [PATCH 4/4] Control sss_client exports

---
 sss_client/Makefile.am     |    9 +++++++--
 sss_client/sss_nss.exports |    4 ++++
 sss_client/sss_pam.exports |    4 ++++
 3 files changed, 15 insertions(+), 2 deletions(-)
 create mode 100644 sss_client/sss_nss.exports
 create mode 100644 sss_client/sss_pam.exports

diff --git a/sss_client/Makefile.am b/sss_client/Makefile.am
index 90427b0..9a7ebab 100644
--- a/sss_client/Makefile.am
+++ b/sss_client/Makefile.am
@@ -24,7 +24,8 @@ libnss_sss_la_SOURCES = \
     sss_cli.h
 libnss_sss_la_LDFLAGS = \
     -module \
-    -avoid-version
+    -avoid-version \
+    -Wl,--version-script,$(srcdir)/sss_nss.exports
 
 pam_sss_la_SOURCES = \
     pam_sss.c \
@@ -38,7 +39,8 @@ pam_sss_la_LDFLAGS = \
     -lpam \
     -lpam_misc \
     -module \
-    -avoid-version
+    -avoid-version \
+    -Wl,--version-script,$(srcdir)/sss_pam.exports
 
 noinst_PROGRAMS = pam_test_client
 pam_test_client_SOURCES = pam_test_client.c
@@ -46,6 +48,9 @@ pam_test_client_LDFLAGS = -lpam -lpam_misc
 
 
 EXTRA_DIST = build/config.rpath
+dist_noinst_DATA = \
+    sss_nss.exports \
+    sss_pam.exports
 
 install-data-hook:
 	mv $(DESTDIR)/$(nsslibdir)/libnss_sss.so $(DESTDIR)/$(nsslibdir)/libnss_sss.so.2
diff --git a/sss_client/sss_nss.exports b/sss_client/sss_nss.exports
new file mode 100644
index 0000000..9afa106
--- /dev/null
+++ b/sss_client/sss_nss.exports
@@ -0,0 +1,4 @@
+{
+    global:
+    *;
+};
diff --git a/sss_client/sss_pam.exports b/sss_client/sss_pam.exports
new file mode 100644
index 0000000..9afa106
--- /dev/null
+++ b/sss_client/sss_pam.exports
@@ -0,0 +1,4 @@
+{
+    global:
+    *;
+};
-- 
1.6.2.2

