mirror of
https://github.com/lucaspalomodevelop/core.git
synced 2026-03-15 17:14:46 +00:00
(ipsec) cleanup, unused "allusers"
This commit is contained in:
parent
73a227842e
commit
3a44d73283
@ -808,9 +808,8 @@ EOD;
|
||||
}
|
||||
|
||||
$myid = isset($ph1ent['mobile']) ? trim($myid_data) . " " : "";
|
||||
$peerid = ($peerid_data != "allusers") ? trim($peerid_data) : "";
|
||||
if (!empty($ph1ent['pre-shared-key'])) {
|
||||
$pskconf .= $myid . $peerid . " : PSK \"" . trim($ph1ent['pre-shared-key']) . "\"\n";
|
||||
$pskconf .= $myid . trim($peerid_data) . " : PSK \"" . trim($ph1ent['pre-shared-key']) . "\"\n";
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -828,9 +827,6 @@ EOD;
|
||||
/* add PSKs for mobile clients */
|
||||
if (isset($ipseccfg['mobilekey'])) {
|
||||
foreach ($ipseccfg['mobilekey'] as $key) {
|
||||
if ($key['ident'] == "allusers") {
|
||||
$key['ident'] = '';
|
||||
}
|
||||
$pskconf .= "{$key['ident']} : PSK \"{$key['pre-shared-key']}\"\n";
|
||||
}
|
||||
unset($key);
|
||||
|
||||
@ -132,14 +132,13 @@ if (is_subsystem_dirty('ipsec')) {
|
||||
foreach ($config['system']['user'] as $id => $user) {
|
||||
if (!empty($user['ipsecpsk'])) {
|
||||
$userkeys[] = array('ident' => $user['name'], 'pre-shared-key' => $user['ipsecpsk'], 'id' => $id);
|
||||
;
|
||||
}
|
||||
}
|
||||
foreach ($userkeys as $secretent) :
|
||||
?>
|
||||
<tr>
|
||||
<td>
|
||||
<?=$secretent['ident'] == 'allusers' ? gettext("ANY USER") : htmlspecialchars($secretent['ident']) ;?>
|
||||
<?=htmlspecialchars($secretent['ident']) ;?>
|
||||
</td>
|
||||
<td>
|
||||
<?=htmlspecialchars($secretent['pre-shared-key']);?>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user