From 8a5872ce96c73a95b1bea361e155b9d5dc2e4d7a Mon Sep 17 00:00:00 2001 From: Tom Yu Date: Mon, 16 Feb 2004 06:28:44 +0000 Subject: [PATCH] Add missing PRIOCNTL_HACK stuff here ticket: new target_version: 1.3.2 tags: pullup component: krb5-build git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@16085 dc483132-0cff-0310-8789-dd5450dbe970 --- src/kadmin/ChangeLog | 4 +++ src/kadmin/configure.in | 1 + src/kadmin/passwd/unit-test/ChangeLog | 6 ++++ src/kadmin/passwd/unit-test/Makefile.in | 3 +- src/kadmin/passwd/unit-test/config/unix.exp | 38 +++++++++++++++++++++ 5 files changed, 51 insertions(+), 1 deletion(-) diff --git a/src/kadmin/ChangeLog b/src/kadmin/ChangeLog index 1e05162d6..e08333731 100644 --- a/src/kadmin/ChangeLog +++ b/src/kadmin/ChangeLog @@ -1,3 +1,7 @@ +2004-02-16 Tom Yu + + * configure.in: Invoke KRB5_AC_PRIOCNTL_HACK. + 2003-12-27 Ken Raeburn * Makefile.in (LOCAL_SUBDIRS): Fix typo in last (undocumented) diff --git a/src/kadmin/configure.in b/src/kadmin/configure.in index 11f4a9e70..d9d587354 100644 --- a/src/kadmin/configure.in +++ b/src/kadmin/configure.in @@ -60,6 +60,7 @@ if test "$TCL_LIBS" != "" ; then fi AC_SUBST(DO_ALL) KRB5_BUILD_PROGRAM +KRB5_AC_PRIOCNTL_HACK dnl K5_GEN_FILE(testing/scripts/env-setup.sh:testing/scripts/env-setup.shin) V5_AC_OUTPUT_MAKEFILE(. cli dbutil passwd passwd/unit-test ktutil server testing testing/scripts testing/util) diff --git a/src/kadmin/passwd/unit-test/ChangeLog b/src/kadmin/passwd/unit-test/ChangeLog index 59b8db71f..a7b9083c6 100644 --- a/src/kadmin/passwd/unit-test/ChangeLog +++ b/src/kadmin/passwd/unit-test/ChangeLog @@ -1,3 +1,9 @@ +2004-02-16 Tom Yu + + * Makefile.in (unit-test-body): Add PRIOCNTL_HACK. + + * config/unix.exp: Add PRIOCNTL_HACK. + 2003-05-09 Tom Yu * kpasswd.0/changing.exp: Replace ovpasswd with kpasswd. diff --git a/src/kadmin/passwd/unit-test/Makefile.in b/src/kadmin/passwd/unit-test/Makefile.in index 2a9fbee7c..5445a2811 100644 --- a/src/kadmin/passwd/unit-test/Makefile.in +++ b/src/kadmin/passwd/unit-test/Makefile.in @@ -15,7 +15,8 @@ unit-test-ok:: unit-test-setup unit-test-body unit-test-cleanup unit-test-body:: $(ENV_SETUP) $(RUNTEST) --tool kpasswd KPASSWD=../kpasswd \ KINIT=$(BUILDTOP)/clients/kinit/kinit \ - KDESTROY=$(BUILDTOP)/clients/kdestroy/kdestroy + KDESTROY=$(BUILDTOP)/clients/kdestroy/kdestroy \ + PRIOCNTL_HACK=@PRIOCNTL_HACK@ unit-test-setup:: $(ENV_SETUP) $(START_SERVERS) diff --git a/src/kadmin/passwd/unit-test/config/unix.exp b/src/kadmin/passwd/unit-test/config/unix.exp index c77aa016a..bd8382e19 100644 --- a/src/kadmin/passwd/unit-test/config/unix.exp +++ b/src/kadmin/passwd/unit-test/config/unix.exp @@ -1,3 +1,41 @@ +# 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 == "-ignore" \ + || $arg == "-open" \ + || $arg == "-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 + } +} + # # kpasswd_version -- extract and print the version number of kpasswd # -- 2.26.2