Re: Bug#499203: libpam-pwdfile completely broken on hppa
On Wed, 17 Sep 2008, Bastian Blank wrote:
> On Wed, Sep 17, 2008 at 03:12:17AM +0200, Bastian Blank wrote:
> > On Wed, Sep 17, 2008 at 02:51:11AM +0200, Peter Palfrader wrote:
> > > -LDFLAGS = -x --shared
> > > +LDFLAGS = --shared
> > You should check the exported symbols, maybe you want to use -Wl,-x.
>
> As this is a lib which should not export symbols under any circumstances
> except for pam_sm_*, you may want to use -fvisibility=hidden and mark
> the pam_sm_* symbols as exported with
> "__attribute__((visibility("default"))).
Ok, I'll upload this to sid tomorrow, and one with a different debian
changelog (libpam-pwdfile (0.99-3etch1) stable; urgency=low) to delayed
unless I hear from you folks otherwise.
diff -u libpam-pwdfile-0.99/Makefile.Debian libpam-pwdfile-0.99/Makefile.Debian
--- libpam-pwdfile-0.99/Makefile.Debian
+++ libpam-pwdfile-0.99/Makefile.Debian
@@ -3,9 +3,9 @@
TITLE=pam_pwdfile
CC = gcc
-LD = ld
-CFLAGS = -fPIC -c -g -Wall -Wformat-security
-LDFLAGS = -x --shared
+LD = gcc
+CFLAGS = -fPIC -c -g -Wall -Wformat-security -fvisibility=hidden
+LDFLAGS = -Wl,-x --shared
LDLIBS = -lcrypt -lpam -lpam_misc
LIBSRC = $(TITLE).c
LIBOBJ = $(TITLE).o md5_good.o md5_broken.o md5_crypt_good.o md5_crypt_broken.o bigcrypt.o
diff -u libpam-pwdfile-0.99/debian/changelog libpam-pwdfile-0.99/debian/changelog
--- libpam-pwdfile-0.99/debian/changelog
+++ libpam-pwdfile-0.99/debian/changelog
@@ -1,3 +1,12 @@
+libpam-pwdfile (0.99-3.1) unstable; urgency=low
+
+ * Non-maintainer upload.
+ * Link using gcc instead of ld (closes: #499203).
+ * Mark the pam_sm_* functions as __attribute__((visibility("default"))) and
+ build with -fvisibility=hidden.
+
+ -- Peter Palfrader <weasel@debian.org> Thu, 25 Sep 2008 12:50:11 +0200
+
libpam-pwdfile (0.99-3) unstable; urgency=low
* Update doeumentation in README.Debian
only in patch2:
unchanged:
--- libpam-pwdfile-0.99.orig/pam_pwdfile.c
+++ libpam-pwdfile-0.99/pam_pwdfile.c
@@ -222,6 +222,7 @@
}
/* 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 @@
}
/* another expected hook */
+__attribute__((visibility("default")))
PAM_EXTERN int pam_sm_setcred(pam_handle_t *pamh, int flags,
int argc, const char **argv)
{
--
| .''`. ** Debian GNU/Linux **
Peter Palfrader | : :' : The universal
http://www.palfrader.org/ | `. `' Operating System
| `- http://www.debian.org/
Reply to: