summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTimo Weingärtner <timo@tiwe.de>2013-04-25 14:27:07 +0200
committerTimo Weingärtner <timo@tiwe.de>2013-04-25 19:52:52 +0200
commitfbce1a480fda4c97b21c87fb39096d23db6eedfb (patch)
treedc02974bc5166269680fef493c38cf384a3c4be0
parent0148de59cdcea4013d694fc04db3174ce06c60b1 (diff)
downloadlibpam-pwdfile-fbce1a480fda4c97b21c87fb39096d23db6eedfb.tar.gz
apply visibility patch by Peter Palfrader
-rw-r--r--Makefile2
-rw-r--r--pam_pwdfile.c2
2 files changed, 3 insertions, 1 deletions
diff --git a/Makefile b/Makefile
index 364cee0..06e1637 100644
--- a/Makefile
+++ b/Makefile
@@ -2,7 +2,7 @@ PAM_LIB_DIR ?= $(DESTDIR)/lib/security
INSTALL ?= install
CFLAGS ?= -O2 -g -Wall -Wformat-security
-CFLAGS += -fPIC
+CFLAGS += -fPIC -fvisibility=hidden
LDFLAGS += -Wl,-x -shared
TITLE = pam_pwdfile
diff --git a/pam_pwdfile.c b/pam_pwdfile.c
index 2d020a9..c8cae75 100644
--- a/pam_pwdfile.c
+++ b/pam_pwdfile.c
@@ -222,6 +222,7 @@ static int fgetpwnam(FILE *stream, const char *name, char *password) {
}
/* expected hook for auth service */
+__attribute__((visibility("default")))
PAM_EXTERN int pam_sm_authenticate(pam_handle_t *pamh, int flags,
int argc, const char **argv) {
int retval, pcnt, pwdfilename_found;
@@ -408,6 +409,7 @@ PAM_EXTERN int pam_sm_authenticate(pam_handle_t *pamh, int flags,
}
/* another expected hook */
+__attribute__((visibility("default")))
PAM_EXTERN int pam_sm_setcred(pam_handle_t *pamh, int flags,
int argc, const char **argv)
{