[OpenAFS-devel] [PATCH] Path to klog and friends from within pam_afs
Stefaan
Stefaan <stefaan.deroeck@gmail.com>
Thu, 21 Jul 2005 16:33:46 +0200
I noticed use_klog didn't work with pam_afs, and then I stumbled upon
hardcoded paths to the klog binary defined in afs_util.h. I propose
something like the following patch:
--- src/pam/Makefile.in.old 2005-07-21 15:42:28.000000000 +0200
+++ src/pam/Makefile.in 2005-07-21 15:51:30.000000000 +0200
@@ -25,7 +25,7 @@
afs_pam_msg.o afs_message.o AFS_component_version_number.o
OBJS =3D $(SHOBJS) test_pam.o
INCLUDES=3D-I${TOP_OBJDIR}/src/config -I${TOP_INCDIR}
-CFLAGS =3D ${DEBUG} ${INCLUDES} ${PAM_CFLAGS}
+CFLAGS =3D ${DEBUG} ${INCLUDES} ${PAM_CFLAGS} -DBINDIR=3D'"${bindir}"'
all: test_pam ${TOP_LIBDIR}/pam_afs.so.1 ${TOP_LIBDIR}/pam_afs.krb.so.1
--- src/pam/afs_util.h.old 2005-07-21 15:41:06.000000000 +0200
+++ src/pam/afs_util.h 2005-07-21 15:50:39.000000000 +0200
@@ -24,9 +24,9 @@
const char *lifetime, const char *cell_name);
extern afs_int32 getPAG(void);
-#define KLOG "/usr/afsws/bin/klog"
-#define KLOGKRB "/usr/afsws/bin/klog.krb"
-#define UNLOG "/usr/afsws/bin/unlog"
+#define KLOG BINDIR "/klog"
+#define KLOGKRB BINDIR "/klog.krb"
+#define UNLOG BINDIR "/unlog"
#define IGNORE_MAX 1000
#if defined(AFS_HPUX_ENV)
Regards,
Stefaan