Josh Fiske <[EMAIL PROTECTED]> writes:

> I would appreciate seeing the patches.  Though it should be noted that I
> am trying to make this work with RHEL4/FC4.  Perhaps your patches will
> lead me towards something useful.  If you'd prefer, you can send them to
> me off-list.

They're short enough to put on the list.  I've never managed to get RHEL4
working, but I'm not sure I tried everything that I could try.

Oh, right, that's what I did.  I built the .a libraries PIC and then
linked them in to the PAM modules to work around the PIC problem.  Note
that this is an ugly hack that builds some other portions of the code PIC
as well, and I've not tested using this patch in conjunction with a
regular client compile (I apply this patch and then build only the pieces
that we want that aren't in the Debian packages, mostly all the krb4
support components).

These are against 1.2.13; porting to 1.3 should be easy but is left as an
exercise to the reader.

--- openafs-extra-1.2.13.orig/Makefile.in
+++ openafs-extra-1.2.13/Makefile.in
@@ -321,7 +321,7 @@
                ${COMPILE_PART1} vfsck ${COMPILE_PART2} ;; \
        esac
 
-login: project kauth rxkad
+login: project kauth rxkad libafsauthent libafsrpc
        set -x; \
        case ${SYS_NAME} in \
        sgi_* ) \
--- openafs-extra-1.2.13.orig/src/auth/Makefile.in
+++ openafs-extra-1.2.13/src/auth/Makefile.in
@@ -57,7 +57,7 @@
 setkey.o: setkey.c ${INCLS} AFS_component_version_number.o
 
 ktc.krb.o: ktc.c ${INCLS} ${TOP_INCDIR}/afs/vice.h
-       ${CC} ${CFLAGS} -DAFS_KERBEROS_ENV -c ktc.c -o ktc.krb.o
+       ${CC} ${CFLAGS} -DAFS_KERBEROS_ENV -fPIC -c ktc.c -o ktc.krb.o
 
 libauth.a: $(OBJS) AFS_component_version_number.o
        -$(RM) -f libauth.a
--- openafs-extra-1.2.13.orig/src/libafsauthent/Makefile.in
+++ openafs-extra-1.2.13/src/libafsauthent/Makefile.in
@@ -31,7 +31,7 @@
 include ../config/Makefile.${SYS_NAME}
 
 CC=${MT_CC}
-CFLAGS=${OPTMZ} ${DBG} -I${TOP_SRCDIR}/config -I${TOP_INCDIR} ${MT_CFLAGS}
+CFLAGS=${OPTMZ} ${DBG} -I${TOP_SRCDIR}/config -I${TOP_INCDIR} ${MT_CFLAGS} 
-fPIC
 CCRULE = ${CC} ${CFLAGS} -c $?
 
 AUDIT= ../audit
--- openafs-extra-1.2.13.orig/src/libafsrpc/Makefile.in
+++ openafs-extra-1.2.13/src/libafsrpc/Makefile.in
@@ -34,7 +34,7 @@
 
 CC=${MT_CC}
 INCLUDES=-I${TOP_INCDIR} -I.. -I../rx -I../rxkad
-CFLAGS = ${OPTMZ} ${DBG} ${INCLUDES} -DRXDEBUG ${MT_CFLAGS} 
-I${TOP_SRCDIR}/config
+CFLAGS = ${OPTMZ} ${DBG} ${INCLUDES} -DRXDEBUG ${MT_CFLAGS} 
-I${TOP_SRCDIR}/config -fPIC
 SFLAGS=-P -I${TOP_INCDIR}
 RX = ../rx
 CCRULE = ${CC} ${CFLAGS} -c $?
--- openafs-extra-1.2.13.orig/src/pam/Makefile.in
+++ openafs-extra-1.2.13/src/pam/Makefile.in
@@ -34,6 +34,9 @@
          ${TOP_LIBDIR}/liblwp.a ${TOP_LIBDIR}/libaudit.a \
           ${TOP_LIBDIR}/libcmd.a ${TOP_LIBDIR}/libcom_err.a \
          ${TOP_LIBDIR}/util.a
+THRDLIBS= ${TOP_LIBDIR}/libafsrpc.a ${TOP_LIBDIR}/libafsauthent.a \
+         ${TOP_LIBDIR}/util.a ${TOP_LIBDIR}/libafsrpc.a \
+         ${TOP_LIBDIR}/libafsauthent.a
 
 LDFLAGS = ${SHLIB_LDFLAGS}
    LIBS = ${TOP_LIBDIR}/libkauth.a ${LIBSA} ${TOP_LIBDIR}/libauth.a \
@@ -76,7 +79,9 @@
                $(LD) $(LDFLAGS) -M mapfile -o $@ afs_setcred.o afs_auth.o 
afs_util.o\
                        $(SHOBJS) $(LIBS) ;; \
        *linux*) \
-               $(CC) $(LDFLAGS) -o $@ afs_setcred.o afs_auth.o afs_util.o 
$(SHOBJS) $(LIBS) ;;\
+               $(CC) $(LDFLAGS) -o $@ afs_setcred.o afs_auth.o afs_util.o \
+                   $(SHOBJS) $(LIBS) $(THRDLIBS) -lcrypt -lpam -lresolv \
+                   -lpthread ;;\
        *fbsd*) \
                $(CC) $(LDFLAGS) -o $@ afs_setcred.o afs_auth.o afs_util.o 
$(SHOBJS) $(LIBS) ;;\
        * ) \
@@ -93,7 +98,9 @@
                $(LD) $(LDFLAGS) -M mapfile -o $@ \
                        afs_setcred_krb.o afs_auth_krb.o afs_util_krb.o 
$(SHOBJS) $(LDFLAGS) $(KLIBS) ;; \
        *linux*) \
-               $(CC) $(LDFLAGS) -o $@ afs_setcred_krb.o afs_auth_krb.o 
afs_util_krb.o $(SHOBJS) $(KLIBS) ;;\
+               $(CC) $(LDFLAGS) -o $@ afs_setcred_krb.o afs_auth_krb.o \
+                   afs_util_krb.o $(SHOBJS) ../auth/ktc.krb.o \
+                   $(THRDLIBS) -lcrypt -lpam -lresolv -lpthread ;;\
        *fbsd*) \
                $(CC) $(LDFLAGS) -o $@ afs_setcred_krb.o afs_auth_krb.o 
afs_util_krb.o $(SHOBJS) $(KLIBS) ;;\
        * ) \
--- openafs-extra-1.2.13.orig/src/util/Makefile.in
+++ openafs-extra-1.2.13/src/util/Makefile.in
@@ -37,7 +37,7 @@
 
 include ../config/Makefile.${SYS_NAME}
 
-CFLAGS=${OPTMZ} -I${TOP_SRCDIR}/config -I. -I${TOP_INCDIR} ${XCFLAGS}
+CFLAGS=${OPTMZ} -I${TOP_SRCDIR}/config -I. -I${TOP_INCDIR} ${XCFLAGS} -fPIC
 LDFLAGS = ${OPTMZ} ${XLDFLAGS}
 
 objects = assert.o base64.o casestrcpy.o ktime.o volparse.o hostparse.o \

-- 
Russ Allbery ([EMAIL PROTECTED])             <http://www.eyrie.org/~eagle/>
_______________________________________________
OpenAFS-devel mailing list
[email protected]
https://lists.openafs.org/mailman/listinfo/openafs-devel

Reply via email to