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
e22afc54
Commit
e22afc54
authored
Apr 20, 2015
by
AdSchellevis
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
remove ipsec roadwarrior php-fpm hacks
parent
2258cb90
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
23 additions
and
32 deletions
+23
-32
ipsec.auth-user.php
src/etc/inc/ipsec.auth-user.php
+23
-32
No files found.
src/etc/inc/ipsec.auth-user.php
View file @
e22afc54
...
...
@@ -46,15 +46,16 @@ require_once("interfaces.inc");
* We will use our local hostname to make up the nas_id
*/
if
(
!
function_exists
(
"getNasID"
))
{
function
getNasID
()
{
global
$g
;
$nasId
=
gethostname
();
if
(
empty
(
$nasId
))
$nasId
=
$g
[
'product_name'
];
return
$nasId
;
}
function
getNasID
()
{
global
$g
;
$nasId
=
gethostname
();
if
(
empty
(
$nasId
))
{
$nasId
=
$g
[
'product_name'
];
}
return
$nasId
;
}
}
/**
...
...
@@ -64,29 +65,22 @@ function getNasID()
*
*/
if
(
!
function_exists
(
"getNasIP"
))
{
function
getNasIP
()
{
$nasIp
=
get_interface_ip
();
if
(
!
$nasIp
)
$nasIp
=
"0.0.0.0"
;
return
$nasIp
;
}
function
getNasIP
()
{
$nasIp
=
get_interface_ip
();
if
(
!
$nasIp
)
$nasIp
=
"0.0.0.0"
;
return
$nasIp
;
}
}
/* setup syslog logging */
openlog
(
"charon"
,
LOG_ODELAY
,
LOG_AUTH
);
if
(
isset
(
$_GET
[
'username'
]))
{
$authmodes
=
explode
(
","
,
$_GET
[
'authcfg'
]);
$username
=
$_GET
[
'username'
];
$password
=
$_GET
[
'password'
];
$common_name
=
$_GET
[
'cn'
];
}
else
{
/* read data from environment */
$username
=
getenv
(
"username"
);
$password
=
getenv
(
"password"
);
$common_name
=
getenv
(
"common_name"
);
$authmodes
=
explode
(
","
,
getenv
(
"authcfg"
));
}
/* read data from environment */
$username
=
getenv
(
"username"
);
$password
=
getenv
(
"password"
);
$common_name
=
getenv
(
"common_name"
);
$authmodes
=
explode
(
","
,
getenv
(
"authcfg"
));
if
(
!
$username
||
!
$password
)
{
syslog
(
LOG_ERR
,
"invalid user authentication environment"
);
...
...
@@ -151,7 +145,4 @@ if ($authenticated == false) {
syslog
(
LOG_NOTICE
,
"user '
{
$username
}
' authenticated
\n
"
);
closelog
();
if
(
isset
(
$_GET
[
'username'
]))
echo
"OK"
;
else
exit
(
0
);
exit
(
0
);
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