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
8a9ea098
Commit
8a9ea098
authored
Jul 13, 2015
by
Ad Schellevis
Committed by
Franco Fichtner
Jul 20, 2015
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
(legacy) move some single used functions from unbound.inc
parent
5cae0a4d
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
20 additions
and
18 deletions
+20
-18
unbound.inc
src/etc/inc/unbound.inc
+0
-18
services_unbound_acls.php
src/www/services_unbound_acls.php
+20
-0
No files found.
src/etc/inc/unbound.inc
View file @
8a9ea098
...
@@ -382,24 +382,6 @@ function sync_unbound_service() {
...
@@ -382,24 +382,6 @@ function sync_unbound_service() {
}
}
function
unbound_acl_id_used
(
$id
)
{
global
$config
;
if
(
is_array
(
$config
[
'unbound'
][
'acls'
]))
foreach
(
$config
[
'unbound'
][
'acls'
]
as
&
$acls
)
if
(
$id
==
$acls
[
'aclid'
])
return
true
;
return
false
;
}
function
unbound_get_next_id
()
{
$aclid
=
0
;
while
(
unbound_acl_id_used
(
$aclid
))
$aclid
++
;
return
$aclid
;
}
// Execute commands as the user unbound
// Execute commands as the user unbound
function
do_as_unbound_user
(
$cmd
)
{
function
do_as_unbound_user
(
$cmd
)
{
global
$g
;
global
$g
;
...
...
src/www/services_unbound_acls.php
View file @
8a9ea098
...
@@ -29,6 +29,26 @@
...
@@ -29,6 +29,26 @@
require_once
(
"guiconfig.inc"
);
require_once
(
"guiconfig.inc"
);
require_once
(
"unbound.inc"
);
require_once
(
"unbound.inc"
);
function
unbound_acl_id_used
(
$id
)
{
global
$config
;
if
(
is_array
(
$config
[
'unbound'
][
'acls'
]))
foreach
(
$config
[
'unbound'
][
'acls'
]
as
&
$acls
)
if
(
$id
==
$acls
[
'aclid'
])
return
true
;
return
false
;
}
function
unbound_get_next_id
()
{
$aclid
=
0
;
while
(
unbound_acl_id_used
(
$aclid
))
$aclid
++
;
return
$aclid
;
}
$referer
=
(
isset
(
$_SERVER
[
'HTTP_REFERER'
])
?
$_SERVER
[
'HTTP_REFERER'
]
:
'/services_unbound_acls.php'
);
$referer
=
(
isset
(
$_SERVER
[
'HTTP_REFERER'
])
?
$_SERVER
[
'HTTP_REFERER'
]
:
'/services_unbound_acls.php'
);
if
(
!
is_array
(
$config
[
'unbound'
][
'acls'
]))
if
(
!
is_array
(
$config
[
'unbound'
][
'acls'
]))
...
...
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