rcpu: make sure not to leak /env/fn#server and /env/fn#aanserver for drawterm (thanks mischief)

This commit is contained in:
cinap_lenrek 2016-04-20 00:41:03 +02:00
parent ff47cbd464
commit 2763229c00
2 changed files with 2 additions and 1 deletions

View file

@ -60,9 +60,9 @@ if(~ $filter aan){
rfork n
fn server {
echo -n aanserver $netdir >/proc/$pid/args
rm -f /env/^('fn#server' 'fn#aanserver')
. <{n=`{read} && ! ~ $#n 0 && read -c $n} >[2=1]
}
rm -f /env/^'fn#aanserver'
exec tlssrv -A /bin/rc -c server
exit
}

View file

@ -3,6 +3,7 @@ netdir=$3
remote=$2!`{cat $3/remote}
fn server {
echo -n $netdir $remote >/proc/$pid/args
rm -f /env/'fn#server'
. <{n=`{read} && ! ~ $#n 0 && read -c $n} >[2=1]
}
exec tlssrv -a /bin/rc -c server