add srvtls and the corresponding tcp17020 service
This commit is contained in:
parent
83f8d59168
commit
bd50adc942
4 changed files with 76 additions and 2 deletions
2
rc/bin/service/tcp17020
Executable file
2
rc/bin/service/tcp17020
Executable file
|
@ -0,0 +1,2 @@
|
||||||
|
#!/bin/rc
|
||||||
|
exec tlssrv -A /bin/aux/trampoline 'net!$fs!9fs'
|
45
rc/bin/srvtls
Executable file
45
rc/bin/srvtls
Executable file
|
@ -0,0 +1,45 @@
|
||||||
|
#!/bin/rc
|
||||||
|
rfork e
|
||||||
|
|
||||||
|
fn usage {
|
||||||
|
echo 'usage: srvtls [ -abcCnq ] [ -k keyspec ] [net!]system[!service] [ srvname [ mtpt ] ]' >[1=2]
|
||||||
|
exit usage
|
||||||
|
}
|
||||||
|
|
||||||
|
mopt=()
|
||||||
|
mtpt=()
|
||||||
|
client=(/bin/tlsclient -a)
|
||||||
|
|
||||||
|
while(~ $1 -*){
|
||||||
|
switch($1){
|
||||||
|
case -[abcCnq]*; mopt=($mopt $1)
|
||||||
|
case *
|
||||||
|
~ $#* 1 && usage
|
||||||
|
switch($1){
|
||||||
|
case -k; client=($client $1 $2)
|
||||||
|
case *; usage
|
||||||
|
}
|
||||||
|
shift
|
||||||
|
}
|
||||||
|
shift
|
||||||
|
}
|
||||||
|
|
||||||
|
switch($#*){
|
||||||
|
case 1; srv=/srv/$1
|
||||||
|
case 2; srv=/srv/$2
|
||||||
|
case 3; srv=/srv/$2; mtpt=$3
|
||||||
|
case *; usage
|
||||||
|
}
|
||||||
|
|
||||||
|
switch($1){
|
||||||
|
case *!*!*; host=$1
|
||||||
|
case *!*; host=$1!t9fs
|
||||||
|
case *; host=net!$1!t9fs
|
||||||
|
}
|
||||||
|
|
||||||
|
fn post {
|
||||||
|
echo 0 >$srv
|
||||||
|
}
|
||||||
|
if(test -f $srv || $client $host /bin/rc -c post){
|
||||||
|
~ $#mtpt 0 || mount $mopt $srv $mtpt
|
||||||
|
}
|
2
sys/lib/dist/ndb/common
vendored
2
sys/lib/dist/ndb/common
vendored
|
@ -286,7 +286,7 @@ tcp=rexexec port=17009
|
||||||
tcp=ncpu port=17010
|
tcp=ncpu port=17010
|
||||||
tcp=cpu port=17013
|
tcp=cpu port=17013
|
||||||
tcp=rcpu port=17019
|
tcp=rcpu port=17019
|
||||||
tcp=glenglenda1 port=17020
|
tcp=t9fs port=17020
|
||||||
tcp=glenglenda2 port=17021
|
tcp=glenglenda2 port=17021
|
||||||
tcp=glenglenda3 port=17022
|
tcp=glenglenda3 port=17022
|
||||||
tcp=glenglenda4 port=17023
|
tcp=glenglenda4 port=17023
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
.TH SRV 4
|
.TH SRV 4
|
||||||
.SH NAME
|
.SH NAME
|
||||||
srv, srvssh, 9fs \- start network file service
|
srv, srvtls, srvssh, 9fs \- start network file service
|
||||||
.SH SYNOPSIS
|
.SH SYNOPSIS
|
||||||
.B srv
|
.B srv
|
||||||
[
|
[
|
||||||
|
@ -17,6 +17,21 @@ srv, srvssh, 9fs \- start network file service
|
||||||
.I mtpt
|
.I mtpt
|
||||||
] ]
|
] ]
|
||||||
.PP
|
.PP
|
||||||
|
.B srvtls
|
||||||
|
[
|
||||||
|
.B -abcCnq
|
||||||
|
] [
|
||||||
|
.B -k
|
||||||
|
.I keyspec
|
||||||
|
]
|
||||||
|
.RI [ net !] system\c
|
||||||
|
.RI [! service ]
|
||||||
|
[
|
||||||
|
.I srvname
|
||||||
|
[
|
||||||
|
.I mtpt
|
||||||
|
] ]
|
||||||
|
.PP
|
||||||
.B srvssh
|
.B srvssh
|
||||||
[
|
[
|
||||||
.B -r
|
.B -r
|
||||||
|
@ -155,6 +170,18 @@ is an
|
||||||
.IR rc (1)
|
.IR rc (1)
|
||||||
script; examine it to see what local conventions apply.
|
script; examine it to see what local conventions apply.
|
||||||
.PP
|
.PP
|
||||||
|
.I Srvtls
|
||||||
|
is an
|
||||||
|
.IR rc (1)
|
||||||
|
command that uses
|
||||||
|
.I tlsclient
|
||||||
|
(see
|
||||||
|
.IR tlssrv (8))
|
||||||
|
to establish an mutual authenticated and encrypted connection
|
||||||
|
to the
|
||||||
|
.I t9fs
|
||||||
|
service which by default listens on tcp port 17020.
|
||||||
|
.PP
|
||||||
.I Srvssh
|
.I Srvssh
|
||||||
is an
|
is an
|
||||||
.IR rc (1)
|
.IR rc (1)
|
||||||
|
|
Loading…
Reference in a new issue