# install::
# $(MAKE) $(MFLAGS) install.man
-fake-install: runenv.py
- $(RM) -r $(FAKEPREFIX)
- @for i in $(INSTALLMKDIRS); do \
- $(srcdir)/config/mkinstalldirs util/fakedest$$i; \
- done
- (w=`pwd`; cd util && $(MAKE) install DESTDIR="$$w/util/fakedest")
- (w=`pwd`; cd lib && $(MAKE) install DESTDIR="$$w/util/fakedest")
- (w=`pwd`; cd plugins/kdb/db2 && $(MAKE) install DESTDIR="$$w/util/fakedest")
- if test -r plugins/preauth/pkinit/Makefile; then \
- (w=`pwd`; cd plugins/preauth/pkinit && $(MAKE) install DESTDIR="$$w/util/fakedest"); \
- fi
-
-# (w=`pwd`; cd plugins/locate/python && $(MAKE) install DESTDIR="$$w/util/fakedest")
-
TAGS: $(SRCS)
etags $(SRCS)
clean-:: clean-windows
clean-unix::
$(RM) *.o core krb5-config
- $(RM) -r util/fakedest
mostlyclean: clean
# $(PURE) or $(LDFLAGS) in case someone changes config/shlib.conf
check-unix:: krb5-config
$(SHELL) $(srcdir)/t_krbconf
-check-prerecurse: fake-install
+check-prerecurse: runenv.py
# Create a test realm and spawn a shell in an environment pointing to it.
# If CROSSNUM is set, create that many fully connected test realms and
# point the shell at the first one.
-testrealm: fake-install
+testrealm: runenv.py
PYTHONPATH=$(top_srcdir)/util $(PYTHON) $(srcdir)/util/testrealm.py \
$(CROSSNUM)
esac
OBJLISTS="OBJS.SH"
PLUGIN='$(LIBBASE)$(DYNOBJEXT)'
- PLUGINLINK=
+ PLUGINLINK='../$(PLUGIN)'
PLUGININST=install-plugin
KDB5_PLUGIN_DEPLIBS=
KDB5_PLUGIN_LIBS=
set -x; objlist=`$(PARSE_OBJLISTS) $(PFOBJLISTS)` && $(AR) cq $@ $$objlist
$(RANLIB) $@
+# For static builds, we make a symlink in the main library directory,
+# allowing the plugin library to be a dependency of the core libraries
+# which use it.
$(TOPLIBD)/libkrb5_$(LIBBASE)$(STLIBEXT):
$(RM) $@
(cd $(TOPLIBD) && $(LN_S) $(RELDIR)/libkrb5_$(LIBBASE)$(STLIBEXT) .)
+# For shared builds, we make a symlink in the parent directory, allowing
+# tests to point plugin_base_dir at $(BUILDTOP)/plugins.
+../$(LIBBASE)$(DYNOBJEXT):
+ $(RM) $@
+ (cd .. && $(LN_S) `basename $(mydir)`/$(LIBBASE)$(DYNOBJEXT) .)
+
all-liblinks: all-libs $(PLUGINLINK)
all-libs: $(PLUGIN)
$(RM) $(LIBBASE)$(DYNOBJEXT)
$(RM) binutils.versions osf1.exports darwin.exports hpux10.exports
+clean-liblinks:
+ $(RM) $(PLUGINLINK)
+
install-libs: $(PLUGININST)
install-static:
$(RM) $(DESTDIR)$(KRB5_LIBDIR)/libkrb5_$(LIBBASE)$(STLIBEXT)
VPATH = @srcdir@
CONFIG_RELTOPDIR = @CONFIG_RELTOPDIR@
-FAKEDEST=$(BUILDTOP)/util/fakedest
-FAKEPREFIX=$(FAKEDEST)/$(prefix)
-FAKELIBDIR=$(FAKEPREFIX)/lib
-
# DEFS set by configure
# DEFINES set by local Makefile.in
# LOCALINCLUDES set by local Makefile.in
# _RLD_ROOT hack needed to repoint "root" directory for purposes
# of searching for shared libs, since RPATHs take precedence over
# LD_LIBRARY_PATH.
- RUN_ENV='LD_LIBRARY_PATH=`echo $(PROG_LIBPATH) | sed -e "s/-L//g" -e "s/ /:/g"`$${LD_LIBRARY_PATH+:$$LD_LIBRARY_PATH}; export LD_LIBRARY_PATH; _RLD_ROOT=$(FAKEDEST):$${_RLD_ROOT+$$_RLD_ROOT}$${_RLD_ROOT-/}; export _RLD_ROOT;'
+ RUN_ENV='LD_LIBRARY_PATH=`echo $(PROG_LIBPATH) | sed -e "s/-L//g" -e "s/ /:/g"`$${LD_LIBRARY_PATH+:$$LD_LIBRARY_PATH}; export LD_LIBRARY_PATH; _RLD_ROOT=$${_RLD_ROOT+$$_RLD_ROOT}$${_RLD_ROOT-/}; export _RLD_ROOT;'
RUN_VARS='LD_LIBRARY_PATH _RLD_ROOT'
;;
RUN_ENV=
for i in N32 64 ''; do
RUN_ENV="${RUN_ENV+ $RUN_ENV}LD_LIBRARY${i}_PATH=$add\$\${LD_LIBRARY${i}_PATH+:\$\$LD_LIBRARY${i}_PATH}; export LD_LIBRARY${i}_PATH;"
- RUN_ENV="${RUN_ENV} _RLD${i}_ROOT=\$(FAKEDEST):\$\${_RLD${i}_ROOT+\$\${_RLD${i}_ROOT}}\$\${_RLD${i}_ROOT-/}; export _RLD${i}_ROOT;"
+ RUN_ENV="${RUN_ENV} _RLD${i}_ROOT=\$\${_RLD${i}_ROOT+\$\${_RLD${i}_ROOT}}\$\${_RLD${i}_ROOT-/}; export _RLD${i}_ROOT;"
RUN_VARS="$RUN_VARS LD_LIBRARY${i}_PATH _RLD${i}_ROOT"
done
;;
RUN_ENV=
for i in N32 64 ''; do
RUN_ENV="${RUN_ENV+ $RUN_ENV}LD_LIBRARY${i}_PATH=$add\$\${LD_LIBRARY${i}_PATH+:\$\$LD_LIBRARY${i}_PATH}; export LD_LIBRARY${i}_PATH;"
- RUN_ENV="${RUN_ENV} _RLD${i}_ROOT=\$(FAKEDEST):\$\${_RLD${i}_ROOT+\$\${_RLD${i}_ROOT}}\$\${_RLD${i}_ROOT-/}; export _RLD${i}_ROOT;"
+ RUN_ENV="${RUN_ENV} _RLD${i}_ROOT=\$\${_RLD${i}_ROOT+\$\${_RLD${i}_ROOT}}\$\${_RLD${i}_ROOT-/}; export _RLD${i}_ROOT;"
RUN_VARS="$RUN_VARS LD_LIBRARY${i}_PATH _RLD${i}_ROOT"
done
;;
BUILDTOP=@RBUILD@
# XXX kludge!
PROG_RPATH=@RBUILD@/lib
-# XXX more kludge!
-FAKEDEST=@RBUILD@/util/fakedest
# This converts $(TOPLIBD) to $TOPLIBD
cat > /tmp/env_setup$$ <<\EOF
@KRB5_RUN_ENV@
ADMIN=$TOP/dbutil
BIN=$IROOT/bin
ETC=$IROOT/etc
-MODDIR=$TOP/../util/fakedest$libdir/krb5/plugins/kdb
+MODDIR=$TOP/../plugins/kdb
SBIN=$TOP/keytab:$TOP/server
DUMMY=${REALM=SECURE-TEST.OV.COM}; export REALM
sed -e "s/__REALM__/$REALM/g" -e "s#__K5ROOT__#$K5ROOT#g" \
-e "s/__KDCHOST__/$hostname/g" \
-e "s/__LOCALHOST__/$localname/g" \
- -e "s#__MODDIR__#$TOP/../util/fakedest$libdir/db-modules#g"\
+ -e "s#__MODDIR__#$TOP/../plugins/kdb#g"\
< $STESTDIR/proto/krb5.conf.proto > $K5ROOT/krb5.conf
# Using /usr/ucb/rsh and getting rid of "-k $REALM" until we get
SRCS= greet_auth.c
-all-unix:: all-liblinks
+all-unix:: all-libs
install-unix:: install-libs
clean-unix:: clean-libs clean-libobjs
SRCS= greet.c
-all-unix:: all-liblinks
+all-unix:: all-libs
install-unix:: install-libs
clean-unix:: clean-libs clean-libobjs
SRCS= greet_auth.c
-all-unix:: all-liblinks
+all-unix:: all-libs
install-unix:: install-libs
clean-unix:: clean-libs clean-libobjs
SRCS= $(srcdir)/main.c
-all-unix:: all-liblinks
+all-unix:: all-libs
install-unix::
clean-unix:: clean-libs clean-libobjs
all-unix:: all-liblinks
install-unix:: install-libs
-clean-unix:: clean-libs clean-libobjs
+clean-unix:: clean-liblinks clean-libs clean-libobjs
$(DB_DEPS) $(DBOBJLISTS-k5) $(DBSHOBJLISTS): all-recurse
all-unix:: all-liblinks
install-unix:: install-libs
-clean-unix:: clean-libs clean-libobjs
+clean-unix:: clean-liblinks clean-libs clean-libobjs
$(DB_DEPS) $(DBOBJLISTS-k5) $(DBSHOBJLISTS): all-recurse
all-unix:: all-liblinks
install-unix:: install-libs
-clean-unix:: clean-libs clean-libobjs
+clean-unix:: clean-liblinks clean-libs clean-libobjs
@libnover_frag@
@libobj_frag@
all-unix:: all-liblinks
install-unix:: install-libs
-clean-unix:: clean-libs clean-libobjs
+clean-unix:: clean-liblinks clean-libs clean-libobjs
@libnover_frag@
@libobj_frag@
all-unix:: all-liblinks
install-unix:: install-libs
-clean-unix:: clean-libs clean-libobjs
+clean-unix:: clean-liblinks clean-libs clean-libobjs
clean::
$(RM) lib$(LIBBASE)$(SO_EXT)
SRCS= $(srcdir)/securid_sam2_main.c $(srcdir)/securid2.c 2
-all-unix:: all-liblinks
+all-unix:: all-libs
install-unix:: install-libs
clean-unix:: clean-libs clean-libobjs
krb5.conf: Makefile
cat $(top_srcdir)/config-files/krb5.conf > krb5.new
echo "[dbmodules]" >> krb5.new
- echo " db_module_dir = `pwd`/../util/fakedest$(KRB5_DB_MODULE_DIR)" >> krb5.new
+ echo " db_module_dir = `pwd`/../plugins/kdb" >> krb5.new
mv krb5.new krb5.conf
kdb_check: kdc.conf krb5.conf
site.exp: runenv.vals Makefile
echo "set runvarlist [list `cat runenv.vals | tr '\n' ' '`]" | \
sed -e 's%=\.%='`pwd`'/.%g' > site.exp
- echo "set KRB5_DB_MODULE_DIR {$(KRB5_DB_MODULE_DIR)}" >> site.exp
- echo "set MODULE_DIR {$(MODULE_DIR)}" >> site.exp
echo "set PRIOCNTL_HACK @PRIOCNTL_HACK@" >> site.exp
global allow_weak_crypto
global mode
global portbase
- global KRB5_DB_MODULE_DIR
- global MODULE_DIR
global srcdir
set pkinit_certs [findfile "[pwd]/$srcdir/pkinit-certs" "[pwd]/$srcdir/pkinit-certs" "$srcdir/pkinit-certs"]
if { $mode == "tcp" } {
puts $conffile " udp_preference_limit = 1"
}
- puts $conffile " plugin_base_dir = $tmppwd/../../../util/fakedest$MODULE_DIR"
+ puts $conffile " plugin_base_dir = $tmppwd/../../../plugins"
puts $conffile ""
puts $conffile "\[realms\]"
puts $conffile " $REALMNAME = \{"
puts $conffile " default = FILE:$tmppwd/others.log"
puts $conffile ""
puts $conffile "\[dbmodules\]"
- puts $conffile " db_module_dir = $tmppwd/../../../util/fakedest$KRB5_DB_MODULE_DIR"
+ puts $conffile " db_module_dir = $tmppwd/../../../plugins/kdb"
puts $conffile " foo_db2 = {"
puts $conffile " db_library = db2"
puts $conffile " database_name = $tmppwd/$type-db"
global portbase
global mode
global tmppwd
- global MODULE_DIR
setup_kerberos_env kdc
}
# If we have anonymous then test it
- if [file exists "$tmppwd/../../../util/fakedest$MODULE_DIR/preauth/pkinit.so" ] {
+ if [file exists "$tmppwd/../../../plugins/preauth/pkinit.so" ] {
kinit_anonymous "WELLKNOWN/ANONYMOUS"
}
krb5.conf: Makefile
cat $(top_srcdir)/config-files/krb5.conf > krb5.new
echo "[dbmodules]" >> krb5.new
- echo " db_module_dir = $(BUILDTOP)/util/fakedest$(KRB5_DB_MODULE_DIR)" >> krb5.new
+ echo " db_module_dir = $(BUILDTOP)/plugins/kdb" >> krb5.new
mv krb5.new krb5.conf
# Verify that the mkey stash code is backward compat with old/non-keytab stashfile format
all-recurse:
-clean-unix::
- $(RM) -r $(FAKEPREFIX)
-
NO_OUTDIR=1
install::
- $testdir: The realm storage directory (absolute path)
- $buildtop: The root of the build directory
- $srctop: The root of the source directory
- - $plugins: The plugin directory under $buildtop/util/fakedest
+ - $plugins: The plugin directory in the build tree
- $hostname: The FQDN of the host
- $port0: The first listener port (portbase)
- ...
* srctop: The top of the source directory (absolute path).
-* plugins: The plugin directory under <buildtop>/util/fakedest.
+* plugins: The plugin directory in the build tree (absolute path).
* hostname: This machine's fully-qualified domain name.
return os.path.abspath(root)
-def _find_plugins():
- global buildtop
- fakeroot = os.path.join(buildtop, 'util', 'fakedest')
- if not os.path.exists(fakeroot):
- fail('You must run "make fake-install" in %s first.' % buildtop)
- for dir, subdirs, files in os.walk(fakeroot):
- if os.path.basename(dir) == 'plugins' and 'kdb' in subdirs:
- return dir
- fail('Cannot locate plugins; run "make fake-install" at %s.' % buildtop)
-
# Return the local hostname as it will be canonicalized by
# krb5_sname_to_principal. We can't simply use socket.getfqdn()
# because it explicitly prefers results containing periods and
_cmd_index = 1
buildtop = _find_buildtop()
srctop = _find_srctop()
-plugins = _find_plugins()
+plugins = os.path.join(buildtop, 'plugins')
_runenv = _import_runenv()
hostname = _get_hostname()
null_input = open(os.devnull, 'r')