Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
O
OpnSense
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Kulya
OpnSense
Commits
c5215538
Commit
c5215538
authored
Feb 22, 2016
by
Ad Schellevis
Committed by
Franco Fichtner
Feb 25, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
small changes related to
https://github.com/opnsense/core/pull/788
(cherry picked from commit
8594ccea
)
parent
a670d1be
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
248 additions
and
285 deletions
+248
-285
legacy.inc
src/etc/inc/xmlrpc/legacy.inc
+1
-0
diag_logs_vpn.inc
src/www/diag_logs_vpn.inc
+97
-104
vpn_ipsec.php
src/www/vpn_ipsec.php
+2
-6
vpn_l2tp_users.php
src/www/vpn_l2tp_users.php
+71
-86
vpn_l2tp_users_edit.php
src/www/vpn_l2tp_users_edit.php
+77
-89
No files found.
src/etc/inc/xmlrpc/legacy.inc
View file @
c5215538
...
...
@@ -157,6 +157,7 @@ function restore_config_section_xmlrpc($new_config)
require_once
(
"interfaces.inc"
);
require_once
(
"filter.inc"
);
require_once
(
"ipsec.inc"
);
// save old config
$old_config
=
$config
;
...
...
src/www/diag_logs_vpn.inc
View file @
c5215538
<?php
/*
Copyright (C) 2014
Deciso B.V.
Copyright (C) 2014-2016
Deciso B.V.
Copyright (C) 2003-2006 Manuel Kasper <mk@neon1.net>
All rights reserved.
...
...
@@ -63,10 +63,11 @@ function dump_clog_vpn($logfile, $tail, $logtype)
echo
"<tr>
\n
"
;
echo
"<td class=
\"
listlr nowrap
\"
>"
.
htmlspecialchars
(
join
(
" "
,
array_slice
(
$logent
,
0
,
3
)))
.
"</td>
\n
"
;
if
(
$llent
[
0
]
==
"login"
)
if
(
$llent
[
0
]
==
"login"
)
{
echo
"<td class=
\"
listr
\"
><span class=
\"
glyphicon glyphicon-arrow-right
\"
aria-hidden=
\"
true
\"
alt=
\"
in
\"
></span></td>
\n
"
;
else
}
else
{
echo
"<td class=
\"
listr
\"
><span class=
\"
glyphicon glyphicon-arrow-left
\"
aria-hidden=
\"
true
\"
alt=
\"
out
\"
></span></td>
\n
"
;
}
echo
"<td class=
\"
listr
\"
>"
.
htmlspecialchars
(
$llent
[
3
])
.
"</td>
\n
"
;
echo
"<td class=
\"
listr
\"
>"
.
htmlspecialchars
(
$llent
[
2
])
.
" </td>
\n
"
;
...
...
@@ -75,34 +76,27 @@ function dump_clog_vpn($logfile, $tail, $logtype)
}
include
(
"head.inc"
);
?>
<body>
<?php
include
(
"fbegin.inc"
);
?>
<section
class=
"page-content-main"
>
<section
class=
"page-content-main"
>
<div
class=
"container-fluid"
>
<div
class=
"row"
>
<?php
if
(
isset
(
$input_errors
)
&&
count
(
$input_errors
)
>
0
)
print_input_errors
(
$input_errors
);
?>
<section
class=
"col-xs-12"
>
<div
class=
"tab-content content-box col-xs-12"
>
<div
class=
"table-responsive"
>
<table
class=
"table table-striped table-sort"
>
<tr><td
colspan=
"4"
>
<tr>
<td
colspan=
"4"
>
<ul
class=
"nav nav-pills"
role=
"tablist"
>
<?php
foreach
(
$tab_array
as
$tab
)
:
?>
<li
role=
"presentation"
<?php
if
(
str_replace
(
'amp;'
,
''
,
$tab
[
2
])
==
$_SERVER
[
'REQUEST_URI'
])
:?>
class
="
active
"<?php endif; ?>><a href="
<?=
$tab
[
2
];
?>
"
>
<?=
$tab
[
0
];
?>
</a></li>
<?php
endforeach
;
?>
</ul>
</td></tr>
</td>
</tr>
<?php
if
(
$mode
!=
"raw"
)
:
?>
<tr>
<td
class=
"listhdrr"
>
<?=
gettext
(
"Time"
);
?>
</td>
...
...
@@ -114,20 +108,19 @@ include("head.inc");
<?php
else
:
dump_clog
(
$logfile
,
$nentries
);
endif
;
?>
<tr><td
colspan=
"4"
>
<form
action=
"
<?
$_SERVER
[
'REQUEST_URI'
]
?>
"
method=
"post"
>
<tr>
<td
colspan=
"4"
>
<form
method=
"post"
>
<input
type=
"hidden"
name=
"mode"
id=
"mode"
value=
"
<?=
$mode
;
?>
"
/>
<input
name=
"clear"
type=
"submit"
class=
"btn"
value=
"
<?=
gettext
(
"Clear log"
);
?>
"
/>
</form>
</td></tr>
</td>
</tr>
</table>
</div>
</div>
</section>
</div>
</div>
</section>
</section>
<?php
include
(
"foot.inc"
);
?>
src/www/vpn_ipsec.php
View file @
c5215538
...
...
@@ -78,15 +78,11 @@ if ($_SERVER['REQUEST_METHOD'] === 'POST') {
$a_phase1
=
&
$config
[
'ipsec'
][
'phase1'
];
$a_phase2
=
&
$config
[
'ipsec'
][
'phase2'
];
if
(
isset
(
$_POST
[
'apply'
]))
{
$retval
=
ipsec_configure
();
ipsec_configure
();
/* reload the filter in the background */
filter_configure
();
$savemsg
=
get_std_save_message
();
if
(
$retval
>=
0
)
{
if
(
is_subsystem_dirty
(
'ipsec'
))
{
clear_subsystem_dirty
(
'ipsec'
);
}
}
}
elseif
(
isset
(
$_POST
[
'save'
]))
{
$config
[
'ipsec'
][
'enable'
]
=
!
empty
(
$_POST
[
'enable'
])
?
true
:
false
;
write_config
();
...
...
src/www/vpn_l2tp_users.php
View file @
c5215538
<?php
/*
Copyright (C) 2014-2015
Deciso B.V.
Copyright (C) 2014-2016
Deciso B.V.
Copyright (C) 2005 Scott Ullrich (sullrich@gmail.com)
All rights reserved.
...
...
@@ -60,21 +60,16 @@ if ($_GET['act'] == "del") {
$service_hook
=
'l2tpd'
;
include
(
"head.inc"
);
$main_buttons
=
array
(
array
(
'label'
=>
gettext
(
"add user"
),
'href'
=>
'vpn_l2tp_users_edit.php'
),
);
?>
<body>
<?php
include
(
"fbegin.inc"
);
?>
<section
class=
"page-content-main"
>
<div
class=
"container-fluid"
>
<div
class=
"row"
>
<?php
if
(
isset
(
$savemsg
))
{
print_info_box
(
$savemsg
);
}
?>
...
...
@@ -86,16 +81,9 @@ $main_buttons = array(
<?php
print_info_box_apply
(
gettext
(
"The l2tp user list has been modified"
)
.
".<br />"
.
gettext
(
"You must apply the changes in order for them to take effect"
)
.
".<br /><b>"
.
gettext
(
"Warning: this will terminate all current l2tp sessions!"
)
.
"</b>"
);
?>
<?php
endif
;
?>
<div
id=
"inputerrors"
></div>
<section
class=
"col-xs-12"
>
<div
class=
"tab-content content-box col-xs-12"
>
<form
action=
"vpn_l2tp_users.php"
method=
"post"
name=
"iform"
id=
"iform"
>
<form
method=
"post"
name=
"iform"
id=
"iform"
>
<div
class=
"table-responsive"
>
<table
class=
"table table-striped table-sort"
>
<tr>
...
...
@@ -117,20 +105,17 @@ endif; ?>
</td>
<td
class=
"list nowrap"
width=
"150"
>
<a
href=
"vpn_l2tp_users_edit.php?id=
<?=
$i
;
?>
"
class=
"btn btn-default"
><span
class=
"glyphicon glyphicon-edit"
></span></a>
<a
href=
"vpn_l2tp_users.php?act=del&id=
<?=
$i
;
?>
"
class=
"btn btn-default"
onclick=
"return confirm('
<?=
gettext
(
"Do you really want to delete this user?"
);
?>
')"
title=
"
<?=
gettext
(
"delete user"
);
?>
"
><span
class=
"fa fa-trash text-muted"
></span></a>
<a
href=
"vpn_l2tp_users.php?act=del&id=
<?=
$i
;
?>
"
class=
"btn btn-default"
onclick=
"return confirm('
<?=
gettext
(
"Do you really want to delete this user?"
);
?>
')"
title=
"
<?=
gettext
(
"delete user"
);
?>
"
><span
class=
"fa fa-trash text-muted"
></span>
</a>
</td>
</tr>
<?php
$i
++
;
endforeach
;
?>
<?php
$i
++
;
endforeach
;
?>
</table>
</div>
</form>
</div>
</section>
...
...
src/www/vpn_l2tp_users_edit.php
View file @
c5215538
<?php
/*
Copyright (C) 2014-2015
Deciso B.V.
Copyright (C) 2014-2016
Deciso B.V.
Copyright (C) 2006 Scott Ullrich (sullrich@gmail.com)
All rights reserved.
...
...
@@ -50,7 +50,7 @@ require_once("plugins.inc.d/vpn.inc");
$referer
=
(
isset
(
$_SERVER
[
'HTTP_REFERER'
])
?
$_SERVER
[
'HTTP_REFERER'
]
:
'/vpn_l2tp_users.php'
);
if
(
!
is_array
(
$config
[
'l2tp'
][
'user'
]))
{
if
(
empty
(
$config
[
'l2tp'
][
'user'
])
||
!
is_array
(
$config
[
'l2tp'
][
'user'
]))
{
$config
[
'l2tp'
][
'user'
]
=
array
();
}
$a_secret
=
&
$config
[
'l2tp'
][
'user'
];
...
...
@@ -150,15 +150,9 @@ include("head.inc");
print_input_errors
(
$input_errors
);
}
?>
<div
id=
"inputerrors"
></div>
<section
class=
"col-xs-12"
>
<div
class=
"tab-content content-box col-xs-12"
>
<form
action=
"vpn_l2tp_users_edit.php"
method=
"post"
name=
"iform"
id=
"iform"
>
<form
method=
"post"
name=
"iform"
id=
"iform"
>
<div
class=
"table-responsive"
>
<table
class=
"table table-striped table-sort"
>
<tr>
...
...
@@ -172,11 +166,10 @@ include("head.inc");
<td
width=
"78%"
class=
"vtable"
>
<input
name=
"passwordfld"
type=
"password"
class=
"form-control pwd"
id=
"passwordfld"
size=
"20"
/>
<br
/><input
name=
"password2"
type=
"password"
class=
"form-control pwd"
id=
"password2"
size=
"20"
/>
(
<?=
gettext
(
"confirmation"
);
?>
)
<?php
if
(
isset
(
$id
)
&&
$a_secret
[
$id
])
:
?>
<br
/>
(
<?=
gettext
(
"confirmation"
);
?>
)
<?php
if
(
isset
(
$id
)
&&
$a_secret
[
$id
])
:?><
br
/>
<
p
class
="
text
-
muted
"><em><small><?=gettext("
If
you
want
to
change
the
users
password
,
enter
it
here
twice
.
");?></small></em></p>
<?php
endif
;
?>
</td>
<?php endif; ?>
</td>
</tr>
<tr>
<td width="
22
%
" valign="
top
" class="
vncell
"><?=gettext("
IP
address
");?></td>
...
...
@@ -188,23 +181,18 @@ endif; ?></td>
<td
width=
"22%"
valign=
"top"
>
</td>
<td
width=
"78%"
>
<input
id=
"submit"
name=
"Submit"
type=
"submit"
class=
"btn btn-primary"
value=
"
<?=
gettext
(
'Save'
);
?>
"
/>
<input
type=
"button"
class=
"btn btn-default"
value=
"
<?=
gettext
(
"Cancel"
);
?>
"
onclick=
"window.location.href='
<?=
$referer
;
?>
'"
/>
<?php
if
(
isset
(
$id
)
&&
$a_secret
[
$id
])
:
?>
<input
type=
"button"
class=
"btn btn-default"
value=
"
<?=
gettext
(
"Cancel"
);
?>
"
onclick=
"window.location.href='
<?=
$referer
;
?>
'"
/>
<?php
if
(
isset
(
$id
)
&&
$a_secret
[
$id
])
:?>
<
input
name
=
"id"
type
=
"hidden"
value
=
"<?=htmlspecialchars(
$id
);?>"
/>
<?php
endif
;
?>
<?
php
endif
;
?>
</td>
</tr>
</table>
</div>
</form>
</div>
</section>
</div>
</div>
</section>
<?php
include
(
"foot.inc"
);
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment