|
Lines 125-131
Link Here
|
| 125 |
# if no vt is specified add vtarg (which may be empty) |
125 |
# if no vt is specified add vtarg (which may be empty) |
| 126 |
have_vtarg="no" |
126 |
have_vtarg="no" |
| 127 |
for i in $serverargs; do |
127 |
for i in $serverargs; do |
| 128 |
if expr match "$i" '^vt[0-9]\+$' > /dev/null; then |
128 |
if expr "$i" : 'vt[0-9]\+$' > /dev/null; then |
| 129 |
have_vtarg="yes" |
129 |
have_vtarg="yes" |
| 130 |
fi |
130 |
fi |
| 131 |
done |
131 |
done |
|
Lines 179-184
Link Here
|
| 179 |
# create a file with auth information for the server. ':0' is a dummy. |
179 |
# create a file with auth information for the server. ':0' is a dummy. |
| 180 |
xserverauthfile=$HOME/.serverauth.$$ |
180 |
xserverauthfile=$HOME/.serverauth.$$ |
| 181 |
trap "rm -f '$xserverauthfile'" HUP INT QUIT ILL TRAP KILL BUS TERM |
181 |
trap "rm -f '$xserverauthfile'" HUP INT QUIT ILL TRAP KILL BUS TERM |
|
|
182 |
touch "$xserverauthfile" |
| 182 |
xauth -q -f "$xserverauthfile" << EOF |
183 |
xauth -q -f "$xserverauthfile" << EOF |
| 183 |
add :$dummy . $mcookie |
184 |
add :$dummy . $mcookie |
| 184 |
EOF |
185 |
EOF |
|
Lines 192-200
Link Here
|
| 192 |
# now add the same credentials to the client authority file |
193 |
# now add the same credentials to the client authority file |
| 193 |
# if '$displayname' already exists do not overwrite it as another |
194 |
# if '$displayname' already exists do not overwrite it as another |
| 194 |
# server man need it. Add them to the '$xserverauthfile' instead. |
195 |
# server man need it. Add them to the '$xserverauthfile' instead. |
| 195 |
for displayname in $authdisplay $hostname$authdisplay; do |
196 |
for displayname in $authdisplay $hostname/unix$authdisplay; do |
| 196 |
authcookie=`xauth list "$displayname" \ |
197 |
authcookie=`xauth list "$displayname" \ |
| 197 |
| sed -n "s/.*$displayname[[:space:]*].*[[:space:]*]//p"` 2>/dev/null; |
198 |
| sed -n "s|.*$displayname[[:space:]*].*[[:space:]*]||p"` 2>/dev/null; |
| 198 |
if [ "z${authcookie}" = "z" ] ; then |
199 |
if [ "z${authcookie}" = "z" ] ; then |
| 199 |
xauth -q << EOF |
200 |
xauth -q << EOF |
| 200 |
add $displayname . $mcookie |
201 |
add $displayname . $mcookie |