+2004-02-12 Tom Yu <tlyu@mit.edu>
+
+ * aclocal.m4 (KRB5_AC_PRIOCNTL_HACK): Set PRIOCNTL_HACK=1 on
+ Solaris 9.
+
+ * configure.in: Remove exitsleep.
+
2003-12-27 Ken Raeburn <raeburn@mit.edu>
* configure.in: Use AC_HELP_STRING for kdc-replay-cache option
test $krb5_cv_need_bind_8_compat = yes && AC_DEFINE(BIND_8_COMPAT,1,[Define if OS has bind 9])
])
dnl
+dnl KRB5_AC_PRIOCNTL_HACK
+dnl
+dnl
+AC_DEFUN([KRB5_AC_PRIOCNTL_HACK],
+[case $krb5_cv_host in
+*-*-solaris2.9*)
+ PRIOCNTL_HACK=1
+ ;;
+*)
+ PRIOCNTL_HACK=0
+ ;;
+esac
+AC_SUBST(PRIOCNTL_HACK)])
2004-02-12 Tom Yu <tlyu@mit.edu>
+ * shlib.conf (*-*-solaris-*): Remove exitsleep.
+
* pre.in (FAKEDEST, FAKEPREFIX, FAKELIBDIR): Support variables for
the _RLD_ROOT hack.
CC_LINK_SHARED='$(PURE) $(CC) $(PROG_LIBPATH) $(RPATH_FLAG)$(PROG_RPATH) $(CFLAGS) $(LDFLAGS)'
CC_LINK_STATIC='$(PURE) $(CC) $(PROG_LIBPATH) $(CFLAGS) $(LDFLAGS)'
RUN_ENV='LD_LIBRARY_PATH=`echo $(PROG_LIBPATH) | sed -e "s/-L//g" -e "s/ /:/g"`; export LD_LIBRARY_PATH;'
- case $krb5_cv_host in
- *-*-solaris2.9*)
- case $krb5_cv_prog_cc in
- # XXX need better test for 64-bit compilation
- *xarch=v9*)
- RUN_ENV="$RUN_ENV"' LD_PRELOAD_64=$(BUILDTOP)/util/exitsleep; export LD_PRELOAD_64;'
- ;;
- *)
- RUN_ENV="$RUN_ENV"' LD_PRELOAD_32=$(BUILDTOP)/util/exitsleep; export LD_PRELOAD_32;'
- ;;
- esac
- esac
;;
*-*-sunos*)
if test -n "$KRB4_LIB"; then
AC_CONFIG_SUBDIRS(krb524)
fi
-case $krb5_cv_host in
-*-*-solaris2.9*)
- if test "$krb5_cv_prog_gcc" = yes; then
- DL_COMPILE='$(CC) -fpic -G -nostdlib'
- DL_COMPILE_TAIL='-lc -ldl'
- else
- DL_COMPILE='$(CC) -Kpic -G'
- DL_COMPILE_TAIL='-ldl'
- fi
- EXITSLEEP_TARG=exitsleep
- ;;
-esac
-AC_SUBST(DL_COMPILE)
-AC_SUBST(DL_COMPILE_TAIL)
-AC_SUBST(EXITSLEEP_TARG)
AC_CONFIG_SUBDIRS(kdc kadmin slave clients appl tests)
AC_CONFIG_FILES(krb5-config, [chmod +x krb5-config])
+2004-02-12 Tom Yu <tlyu@mit.edu>
+
+ * configure.in: Invoke PRIOCNTL_HACK.
+
2003-06-03 Tom Yu <tlyu@mit.edu>
* alt_prof.c (krb5_read_realm_params): Don't bother reading in
KRB5_BUILD_LIBOBJS
KRB5_BUILD_LIBRARY_WITH_DEPS
KRB5_BUILD_PROGRAM
+KRB5_AC_PRIOCNTL_HACK
dnl
V5_AC_OUTPUT_MAKEFILE(. clnt srv unit-test)
+2004-02-12 Tom Yu <tlyu@mit.edu>
+
+ * config/unix.exp (PRIOCNTL_HACK): Wrap "spawn" to do priocntl
+ things to work around Solaris 9 pty-close bug.
+
+ * Makefile.in (unit-test-client-body, unit-test-server-body): Add
+ PRIOCNTL_HACK.
+
2003-10-16 Tom Yu <tlyu@mit.edu>
* api.1/lock.exp: Work around a race condition in the Solaris 9
$(ENV_SETUP) $(RUNTEST) --tool api RPC=1 API=$(CLNTTCL) \
KINIT=$(BUILDTOP)/clients/kinit/kinit \
KDESTROY=$(BUILDTOP)/clients/kdestroy/kdestroy \
- KADMIN_LOCAL=$(BUILDTOP)/kadmin/cli/kadmin.local $(RUNTESTFLAGS)
+ KADMIN_LOCAL=$(BUILDTOP)/kadmin/cli/kadmin.local \
+ PRIOCNTL_HACK=@PRIOCNTL_HACK@ $(RUNTESTFLAGS)
-mv api.log capi.log
-mv api.sum capi.sum
unit-test-server-body: site.exp test-handle-server lock-test
$(ENV_SETUP) $(RUNTEST) --tool api RPC=0 API=$(SRVTCL) \
LOCKTEST=./lock-test \
- KADMIN_LOCAL=$(BUILDTOP)/kadmin/cli/kadmin.local $(RUNTESTFLAGS)
+ KADMIN_LOCAL=$(BUILDTOP)/kadmin/cli/kadmin.local \
+ PRIOCNTL_HACK=@PRIOCNTL_HACK@ $(RUNTESTFLAGS)
-mv api.log sapi.log
-mv api.sum sapi.sum
set wait_status_index 3
}
+# Hack around Solaris 9 kernel race condition that causes last output
+# from a pty to get dropped.
+if { $PRIOCNTL_HACK } {
+ catch {exec priocntl -s -c FX -m 30 -p 30 -i pid [getpid]}
+ rename spawn oldspawn
+ proc spawn { args } {
+ upvar 1 spawn_id spawn_id
+ set newargs {}
+ set inflags 1
+ set eatnext 0
+ foreach arg $args {
+ if { $arg eq "-ignore" ||
+ $arg eq "-open" ||
+ $arg eq "-leaveopen" } {
+ lappend newargs $arg
+ set eatnext 1
+ continue
+ }
+ if [string match "-*" $arg] {
+ lappend newargs $arg
+ continue
+ }
+ if { $eatnext } {
+ set eatnext 0
+ lappend newargs $arg
+ continue
+ }
+ if { $inflags } {
+ set inflags 0
+ set newargs [concat $newargs {priocntl -e -c FX -p 0}]
+ }
+ lappend newargs $arg
+ }
+ set pid [eval oldspawn $newargs]
+ return $pid
+ }
+}
+
# Variables for keeping track of api process state
set api_pid "0"
+2004-02-12 Tom Yu <tlyu@mit.edu>
+
+ * configure.in: Invoke KRB5_AC_PRIOCNTL_HACK.
+
+ * config/unix.exp (PRIOCNTL_HACK): Wrap "spawn" to do priocntl
+ things to work around Solaris 9 pty-close bug.
+
2003-12-02 Ken Raeburn <raeburn@mit.edu>
* lib/helpers.exp (expect_kadm_ok, eof_client): Accept and ignore
$(RUNTEST) SERVER=./server CLIENT=./client \
KINIT=$(BUILDTOP)/clients/kinit/kinit \
KDESTROY=$(BUILDTOP)/clients/kdestroy/kdestroy \
+ PRIOCNTL_HACK=@PRIOCNTL_HACK@ \
PASS="$(PASS)" --tool rpc_test $(RUNTESTFLAGS) ; \
then \
echo Cleaning up... ; \
set hostname [exec hostname]
+# Hack around Solaris 9 kernel race condition that causes last output
+# from a pty to get dropped.
+if { $PRIOCNTL_HACK } {
+ catch {exec priocntl -s -c FX -m 30 -p 30 -i pid [getpid]}
+ rename spawn oldspawn
+ proc spawn { args } {
+ upvar 1 spawn_id spawn_id
+ set newargs {}
+ set inflags 1
+ set eatnext 0
+ foreach arg $args {
+ if { $arg eq "-ignore" ||
+ $arg eq "-open" ||
+ $arg eq "-leaveopen" } {
+ lappend newargs $arg
+ set eatnext 1
+ continue
+ }
+ if [string match "-*" $arg] {
+ lappend newargs $arg
+ continue
+ }
+ if { $eatnext } {
+ set eatnext 0
+ lappend newargs $arg
+ continue
+ }
+ if { $inflags } {
+ set inflags 0
+ set newargs [concat $newargs {priocntl -e -c FX -p 0}]
+ }
+ lappend newargs $arg
+ }
+ set pid [eval oldspawn $newargs]
+ return $pid
+ }
+}
+
# this will initialize the database and keytab
load_lib "helpers.exp"
AC_SUBST(PASS)
dnl
CHECK_SIGNALS
+KRB5_AC_PRIOCNTL_HACK
V5_AC_OUTPUT_MAKEFILE
+2004-02-12 Tom Yu <tlyu@mit.edu>
+
+ * configure.in: Invoke KRB5_AC_PRIOCNTL_HACK.
+
2003-06-04 Tom Yu <tlyu@mit.edu>
* Makefile.in (kdb_check): Remove uses of "dump -old", etc., since
KRB4_DEJAGNU_TEST="KRBIV=1"
fi
AC_SUBST(KRB4_DEJAGNU_TEST)
+KRB5_AC_PRIOCNTL_HACK
V5_AC_OUTPUT_MAKEFILE(. resolve asn.1 create hammer verify gssapi dejagnu)
+2004-02-12 Tom Yu <tlyu@mit.edu>
+
+ * Makefile.in (check-runtest-yes): Add PRIOCNTL_HACK.
+
2003-01-05 Sam Hartman <hartmans@mit.edu>
* t_inetd.c: Remove declaration of errno
@echo "+++"
check-runtest-yes:: t_inetd site.exp
- $(RUNTEST) --tool krb --srcdir $(srcdir) $(KRB4_RUNTESTFLAGS) $(RUNTESTFLAGS)
+ $(RUNTEST) --tool krb --srcdir $(srcdir) $(KRB4_RUNTESTFLAGS) PRIOCNTL_HACK=@PRIOCNTL_HACK@ $(RUNTESTFLAGS)
t_inetd:: t_inetd.o $(KRB5_BASE_DEPLIBS)
$(CC_LINK) -o t_inetd t_inetd.o $(KRB5_BASE_LIBS)
site.exp: runenv.vals
echo "set runvarlist [list `cat runenv.vals | tr '\n' ' '`]" | \
sed -e 's%=\.%='`pwd`'/.%g' > site.exp
+
# +++ Dependency line eater +++
#
# Makefile dependencies follow. This must be the last section in
+2004-02-12 Tom Yu <tlyu@mit.edu>
+
+ * default.exp (PRIOCNTL_HACK): Wrap "spawn" to do priocntl things
+ to work around Solaris 9 pty-close bug.
+
2003-12-13 Ken Raeburn <raeburn@mit.edu>
* default.exp (passes): Add an AES-only pass.
}
}
+# Hack around Solaris 9 kernel race condition that causes last output
+# from a pty to get dropped.
+if { $PRIOCNTL_HACK } {
+ catch {exec priocntl -s -c FX -m 30 -p 30 -i pid [getpid]}
+ rename spawn oldspawn
+ proc spawn { args } {
+ upvar 1 spawn_id spawn_id
+ set newargs {}
+ set inflags 1
+ set eatnext 0
+ foreach arg $args {
+ if { $arg eq "-ignore" ||
+ $arg eq "-open" ||
+ $arg eq "-leaveopen" } {
+ lappend newargs $arg
+ set eatnext 1
+ continue
+ }
+ if [string match "-*" $arg] {
+ lappend newargs $arg
+ continue
+ }
+ if { $eatnext } {
+ set eatnext 0
+ lappend newargs $arg
+ continue
+ }
+ if { $inflags } {
+ set inflags 0
+ set newargs [concat $newargs {priocntl -e -c FX -p 0}]
+ }
+ lappend newargs $arg
+ }
+ set pid [eval oldspawn $newargs]
+ return $pid
+ }
+}
+
# The des.des3-tgt.no-kdc-des3 pass will fail if the KDC doesn't
# constrain ticket key enctypes to those in permitted_enctypes. It
# does this by not putting des3 in the permitted_enctypes, while
2004-02-12 Tom Yu <tlyu@mit.edu>
+ * Makefile.in (all-recurse): Remove exitsleep.
+
* Makefile.in (all-unix, clean-unix): Add new rule to build fake
root directory for _RLD_ROOT hacks.
DL_COMPILE=@DL_COMPILE@
DL_COMPILE_TAIL=@DL_COMPILE_TAIL@
-all-recurse: libupdate makeshlib @EXITSLEEP_TARG@
+all-recurse: libupdate makeshlib
all-unix:: $(FAKEPREFIX)/lib
all-mac::
$(RM) $@ $@.tmp
$(SLIBSH) $(srcdir)/makeshlib.sh >$@.tmp&&chmod a+x $@.tmp&&mv $@.tmp $@
-exitsleep: $(srcdir)/exitsleep.c
- $(DL_COMPILE) -oexitsleep $(srcdir)/exitsleep.c $(DL_COMPILE_TAIL)
-
clean::
$(RM) libupdate makeshlib