netaudio: fix auth check, can have multiple auth servers!
This commit is contained in:
parent
43eb7eea62
commit
efd4d75082
1 changed files with 20 additions and 17 deletions
|
@ -134,23 +134,21 @@ fn checkauth {
|
||||||
echo ' no auth server'
|
echo ' no auth server'
|
||||||
exit fail
|
exit fail
|
||||||
}
|
}
|
||||||
if not if(~ $sys $auth){
|
|
||||||
echo ' we are the auth server'
|
|
||||||
authisus=1
|
|
||||||
}
|
|
||||||
if not if(~ $dom $auth){
|
|
||||||
echo ' we are the auth server'
|
|
||||||
authisus=1
|
|
||||||
}
|
|
||||||
if not if(~ $ip $auth){
|
|
||||||
echo ' we are the auth server'
|
|
||||||
authisus=1
|
|
||||||
}
|
|
||||||
if not {
|
if not {
|
||||||
echo ' we are not the auth server '^$auth
|
for(i in $auth){
|
||||||
echo ' if this is a mistake, set auth='$sysname 'or auth='$dom
|
if(~ $i $sys){
|
||||||
if(~ $authok 1)
|
echo ' we are the auth server '^$i
|
||||||
echo ' run auth/debug to test the auth server'
|
authisus=1
|
||||||
|
}
|
||||||
|
if not if(~ $i $dom){
|
||||||
|
echo ' we are the auth server '^$i
|
||||||
|
authisus=1
|
||||||
|
}
|
||||||
|
if not if(~ $i $ip){
|
||||||
|
echo ' we are the auth server '^$i
|
||||||
|
authisus=1
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if(~ $authisus 1){
|
if(~ $authisus 1){
|
||||||
if(! grep -s keyfs <{ps})
|
if(! grep -s keyfs <{ps})
|
||||||
|
@ -165,7 +163,12 @@ fn checkauth {
|
||||||
}
|
}
|
||||||
echo ' run auth/asaudit to verify auth server configuration'
|
echo ' run auth/asaudit to verify auth server configuration'
|
||||||
}
|
}
|
||||||
|
if not {
|
||||||
|
echo ' we are not the auth server(s):' $auth
|
||||||
|
echo ' if this is a mistake, set auth='$sys(1) 'or auth='^($sys(2-) $dom)
|
||||||
|
if(~ $authok 1)
|
||||||
|
echo ' run auth/debug to test the auth server'
|
||||||
|
}
|
||||||
}
|
}
|
||||||
fn checksec {
|
fn checksec {
|
||||||
echo 'checking basic security:'
|
echo 'checking basic security:'
|
||||||
|
|
Loading…
Reference in a new issue