~ubuntu-branches/ubuntu/maverick/krb5/maverick

« back to all changes in this revision

Viewing changes to src/lib/rpc/unit-test/config/unix.exp

  • Committer: Bazaar Package Importer
  • Author(s): Sam Hartman
  • Date: 2009-05-07 16:16:34 UTC
  • mfrom: (13.1.7 sid)
  • Revision ID: james.westby@ubuntu.com-20090507161634-xqyk0s9na0le4flj
Tags: 1.7dfsg~beta1-4
When  decrypting the TGS response fails with the subkey, try with the
session key to work around Heimdal bug, Closes: #527353 

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
#
2
 
# $Id: unix.exp 16071 2004-02-13 20:52:40Z tlyu $
 
2
# $Id: unix.exp 22022 2009-02-18 18:19:18Z tlyu $
3
3
#
4
4
 
5
5
set kill /bin/kill
47
47
    }
48
48
}
49
49
 
 
50
if { [string length $VALGRIND] } {
 
51
    rename spawn valgrind_aux_spawn
 
52
    proc spawn { args } {
 
53
        global VALGRIND
 
54
        upvar 1 spawn_id spawn_id
 
55
        set newargs {}
 
56
        set inflags 1
 
57
        set eatnext 0
 
58
        foreach arg $args {
 
59
            if { $arg == "-ignore" \
 
60
                     || $arg == "-open" \
 
61
                     || $arg == "-leaveopen" } {
 
62
                lappend newargs $arg
 
63
                set eatnext 1
 
64
                continue
 
65
            }
 
66
            if [string match "-*" $arg] {
 
67
                lappend newargs $arg
 
68
                continue
 
69
            }
 
70
            if { $eatnext } {
 
71
                set eatnext 0
 
72
                lappend newargs $arg
 
73
                continue
 
74
            }
 
75
            if { $inflags } {
 
76
                set inflags 0
 
77
                # Only run valgrind for local programs, not
 
78
                # system ones.
 
79
#&&![string match "/bin/sh" $arg] sh is used to start kadmind!
 
80
                if [string match "/" [string index $arg 0]]&&![string match "/bin/ls" $arg]&&![regexp {/kshd$} $arg] {
 
81
                    set newargs [concat $newargs $VALGRIND]
 
82
                } elseif [string match "." [string index $arg 0]] {
 
83
                    set newargs [concat $newargs $VALGRIND]
 
84
                }
 
85
            }
 
86
            lappend newargs $arg
 
87
        }
 
88
        set pid [eval valgrind_aux_spawn $newargs]
 
89
        return $pid
 
90
    }
 
91
}
 
92
 
50
93
# this will initialize the database and keytab
51
94
load_lib "helpers.exp"
52
95
 
69
112
        global server_started
70
113
        global kill
71
114
 
 
115
        if { [info exists server_started] && $server_started == 0 } { 
 
116
            return 
 
117
        }
 
118
 
72
119
        if {[catch {
73
120
                expect {
74
121
                        -i $server_id
100
147
        verbose "% $SERVER" 1
101
148
        set server_pid [spawn $SERVER $PROT]
102
149
        set server_id $spawn_id
 
150
        set server_started 1
103
151
 
104
152
        unset env(KRB5_KTNAME)
105
153
 
107
155
 
108
156
        expect {
109
157
                "running" { }
 
158
                "Cannot register service" {
 
159
                        send_error "Server cannot register with portmap/rpcbind!!\n"
 
160
                        note "+++"
 
161
                        note "+++ These tests require the ability to register with portmap/rpcbind"
 
162
                        note "+++ Either the server is not running or it does not"
 
163
                        note "+++  allow registration using a loopback connection"
 
164
                        note "+++"
 
165
                        verbose $expect_out(buffer) 1
 
166
                        set server_started 0
 
167
                        unsupported "Server registration"
 
168
                        return
 
169
                }
110
170
                eof { 
111
171
                        send_error "server exited!"
112
172
                        verbose $expect_out(buffer) 1