summaryrefslogtreecommitdiffstats
path: root/src/tests/dejagnu/krb-standalone/gssftp.exp
diff options
context:
space:
mode:
Diffstat (limited to 'src/tests/dejagnu/krb-standalone/gssftp.exp')
-rw-r--r--src/tests/dejagnu/krb-standalone/gssftp.exp8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/tests/dejagnu/krb-standalone/gssftp.exp b/src/tests/dejagnu/krb-standalone/gssftp.exp
index c815821a51..2b04d609a1 100644
--- a/src/tests/dejagnu/krb-standalone/gssftp.exp
+++ b/src/tests/dejagnu/krb-standalone/gssftp.exp
@@ -36,16 +36,17 @@ proc start_ftp_daemon { } {
global tmppwd
global ftpd_spawn_id
global ftpd_pid
+ global portbase
# The -p argument tells it to accept a single connection, so we
- # don't need to use inetd. The 3021 is the port to listen at.
+ # don't need to use inetd. Portbase+8 is the port to listen at.
# We rely on KRB5_KTNAME being set to the proper keyfile as there is
# no way to cleanly set it with the gssapi API.
# The -U argument tells it to use an alternate ftpusers file (using
# /dev/null will allow root to login regardless of /etc/ftpusers).
# The -a argument requires authorization, to mitigate any
# vulnerability introduced by circumventing ftpusers.
- spawn $FTPD -p 3021 -a -U /dev/null -r $tmppwd/krb5.conf
+ spawn $FTPD -p [expr 8 + $portbase] -a -U /dev/null -r $tmppwd/krb5.conf
set ftpd_spawn_id $spawn_id
set ftpd_pid [exp_pid]
@@ -163,6 +164,7 @@ proc ftp_test { } {
global spawn_id
global tmppwd
global ftp_save_ktname
+ global portbase
# Start up the kerberos and kadmind daemons and get a srvtab and a
# ticket file.
@@ -196,7 +198,7 @@ proc ftp_test { } {
start_ftp_daemon
# Make an ftp client connection to it.
- spawn $FTP $hostname 3021
+ spawn $FTP $hostname [expr 8 + $portbase]
expect_after {
"GSSAPI authentication failed" {