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
89169102
Commit
89169102
authored
Jun 12, 2016
by
Franco Fichtner
Committed by
GitHub
Jun 12, 2016
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #1010 from fabianfrz/fix_914
created a fix for 914 (openvpn-client-export.inc)
parents
39406886
bd20f935
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
5 deletions
+4
-5
Makefile
Makefile
+1
-2
openvpn-client-export.inc
src/etc/inc/openvpn-client-export.inc
+3
-3
No files found.
Makefile
View file @
89169102
...
@@ -134,8 +134,7 @@ CORE_DEPENDS?= apinger \
...
@@ -134,8 +134,7 @@ CORE_DEPENDS?= apinger \
suricata
\
suricata
\
syslogd
\
syslogd
\
unbound
\
unbound
\
wol
\
wol
zip
WRKDIR
?=
${
.CURDIR
}
/work
WRKDIR
?=
${
.CURDIR
}
/work
WRKSRC
=
${
WRKDIR
}
/src
WRKSRC
=
${
WRKDIR
}
/src
...
...
src/etc/inc/openvpn-client-export.inc
View file @
89169102
...
@@ -368,7 +368,7 @@ function openvpn_client_export_config($srvid, $usrid, $crtid, $useaddr, $verifys
...
@@ -368,7 +368,7 @@ function openvpn_client_export_config($srvid, $usrid, $crtid, $useaddr, $verifys
}
}
}
}
$command
=
"cd "
.
escapeshellarg
(
"
{
$tempdir
}
/.."
)
$command
=
"cd "
.
escapeshellarg
(
"
{
$tempdir
}
/.."
)
.
" && /usr/local/bin/
zip -r
"
.
" && /usr/local/bin/
7z -tzip -y -r a
"
.
escapeshellarg
(
"/tmp/
{
$prefix
}
-config.zip"
)
.
escapeshellarg
(
"/tmp/
{
$prefix
}
-config.zip"
)
.
" "
.
escapeshellarg
(
$prefix
);
.
" "
.
escapeshellarg
(
$prefix
);
exec
(
$command
);
exec
(
$command
);
...
@@ -678,7 +678,7 @@ EOF;
...
@@ -678,7 +678,7 @@ EOF;
}
}
// Zip Viscosity file
// Zip Viscosity file
exec
(
"cd
{
$tempdir
}
/.. && /usr/local/bin/
zip -r
{
$zipfile
}
Viscosity.visc"
);
exec
(
"cd
{
$tempdir
}
/.. && /usr/local/bin/
7z -tzip -y -r a
{
$zipfile
}
Viscosity.visc"
);
// Remove temporary directory
// Remove temporary directory
exec
(
"rm -rf
{
$tempdir
}
"
);
exec
(
"rm -rf
{
$tempdir
}
"
);
...
@@ -805,7 +805,7 @@ function openvpn_client_export_sharedkey_config($srvid, $useaddr, $proxy, $zipco
...
@@ -805,7 +805,7 @@ function openvpn_client_export_sharedkey_config($srvid, $useaddr, $proxy, $zipco
$shkeyfile
=
"
{
$tempdir
}
/
{
$shkeyfile
}
"
;
$shkeyfile
=
"
{
$tempdir
}
/
{
$shkeyfile
}
"
;
file_put_contents
(
"
{
$shkeyfile
}
"
,
base64_decode
(
$settings
[
'shared_key'
]));
file_put_contents
(
"
{
$shkeyfile
}
"
,
base64_decode
(
$settings
[
'shared_key'
]));
exec
(
"cd
{
$tempdir
}
/.. && /usr/local/bin/
zip -r
/tmp/
{
$prefix
}
-config.zip
{
$prefix
}
"
);
exec
(
"cd
{
$tempdir
}
/.. && /usr/local/bin/
7z -tzip -y -r a
/tmp/
{
$prefix
}
-config.zip
{
$prefix
}
"
);
// Remove temporary directory
// Remove temporary directory
exec
(
"rm -rf
{
$tempdir
}
"
);
exec
(
"rm -rf
{
$tempdir
}
"
);
...
...
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