1 Apply an incredibly ugly hack to build the PAM modules against the shared
2 objects generated for the shared libraries. Not suitable upstream in its
3 current form. The right upstream solution is to standardize the shared
4 library ABI and install it with a real SONAME, and then link the PAM
7 --- openafs.orig/Makefile.in
8 +++ openafs/Makefile.in
10 # pthread based user space RX library
11 shlibafsrpc: rx rxkad des
14 - echo Skipping shlibafsrpc for amd64_linux24 ;; \
15 alpha_dux*|sgi_*|sun4x_*|sunx86_*|rs_aix*|*linux*|hp_ux11*|ia64_hpux*) \
16 ${COMPILE_PART1} shlibafsrpc ${COMPILE_PART2} ;; \
20 shlibafsauthent: ubik auth kauth shlibafsrpc
23 - echo Skipping shlibafsauthent for amd64_linux24 ;; \
24 alpha_dux*|sgi_*|sun4x_*|sunx86_*|rs_aix*|*linux*|hp_ux11*|ia64_hpux*) \
25 ${COMPILE_PART1} shlibafsauthent ${COMPILE_PART2} ;; \
27 --- openafs.orig/src/pam/Makefile.in
28 +++ openafs/src/pam/Makefile.in
30 afs_pam_msg.o afs_message.o AFS_component_version_number.o
31 OBJS = $(SHOBJS) test_pam.o
32 INCLUDES=-I${TOP_OBJDIR}/src/config -I${TOP_INCDIR}
33 -CFLAGS = ${DEBUG} ${INCLUDES} ${PAM_CFLAGS}
34 +CFLAGS = ${DEBUG} ${INCLUDES} ${PAM_CFLAGS} ${MT_CFLAGS}
36 +# For Debian, we link directly with the object files that would have gone
37 +# into the libafsrpc and libafsauthent shared libraries. The shared libraries
38 +# themselves cannot be used because the interface isn't stable and they have
39 +# no SONAME, but this is the easiest way of getting PIC objects built with the
41 +SHLIB_OBJS := `ls ../shlibafsauthent/*.o | grep -v version_num` \
42 + `ls ../shlibafsrpc/*.o | grep -v version_num`
43 +KRB_SHLIB_OBJS := `ls ../shlibafsauthent/*.o | egrep -v 'version_num|ktc.o'` \
44 + `ls ../shlibafsrpc/*.o | grep -v version_num`
46 all: test_pam ${TOP_LIBDIR}/pam_afs.so.1 ${TOP_LIBDIR}/pam_afs.krb.so.1
49 afs_util_krb.o: afs_util.c afs_pam_msg.h afs_message.h afs_util.h
50 ${CC} ${CFLAGS} -DAFS_KERBEROS_ENV -c ${srcdir}/afs_util.c -o afs_util_krb.o
52 +ktc.o: ${srcdir}/../auth/ktc.c
53 + ${CC} ${CFLAGS} -DAFS_KERBEROS_ENV -c ${srcdir}/../auth/ktc.c
55 pam_afs.so.1: $(SHOBJS) afs_setcred.o afs_auth.o afs_util.o
57 case "$(SYS_NAME)" in \
59 afs_setcred.o afs_auth.o afs_util.o \
60 $(SHOBJS) $(LIBS) ;; \
62 - $(CC) $(LDFLAGS) -o $@ afs_setcred.o \
63 - afs_auth.o afs_util.o $(SHOBJS) $(LIBS) ;;\
64 + $(CC) $(LDFLAGS) $(PAM_CFLAGS) -o $@ afs_setcred.o \
65 + afs_auth.o afs_util.o $(SHOBJS) $(SHLIB_OBJS) \
66 + $(MT_LIBS) -lpam -lresolv;;\
68 $(CC) $(LDFLAGS) -o $@ afs_setcred.o \
69 afs_auth.o afs_util.o $(SHOBJS) $(LIBS) ;;\
71 echo No link line for system $(SYS_NAME). ;; \
74 -pam_afs.krb.so.1: $(SHOBJS) afs_setcred_krb.o afs_auth_krb.o afs_util_krb.o
75 +pam_afs.krb.so.1: $(SHOBJS) afs_setcred_krb.o afs_auth_krb.o afs_util_krb.o ktc.o
77 case "$(SYS_NAME)" in \
78 hp_ux* | ia64_hpux*) \
80 $(SHOBJS) $(LDFLAGS) $(KLIBS) ;; \
82 $(CC) $(LDFLAGS) -o $@ afs_setcred_krb.o \
83 - afs_auth_krb.o afs_util_krb.o $(SHOBJS) $(KLIBS) ;;\
84 + afs_auth_krb.o afs_util_krb.o ktc.o $(SHOBJS) \
85 + $(KRB_SHLIB_OBJS) $(MT_LIBS) -lpam -lresolv;;\
87 $(CC) $(LDFLAGS) -o $@ afs_setcred_krb.o \
88 afs_auth_krb.o afs_util_krb.o $(SHOBJS) $(KLIBS) ;;\