Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Icecast-Server
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
93
Issues
93
List
Boards
Labels
Service Desk
Milestones
Merge Requests
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
External Wiki
External Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Xiph.Org
Icecast-Server
Commits
dd967ad1
Commit
dd967ad1
authored
Sep 28, 2018
by
Philipp Schafft
🦁
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update: Init method matching depending on what parameters we have.
parent
29680ec6
Pipeline
#324
failed with stage
in 14 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
22 additions
and
6 deletions
+22
-6
src/auth.c
src/auth.c
+22
-6
No files found.
src/auth.c
View file @
dd967ad1
...
...
@@ -611,13 +611,28 @@ static inline void auth_get_authenticator__filter_admin(auth_t *auth, xmlNodePtr
}
}
static
inline
int
auth_get_authenticator__filter_method
(
auth_t
*
auth
,
xmlNodePtr
node
,
const
char
*
name
,
auth_matchtype_t
matchtype
)
static
inline
void
auth_get_authenticator__init_method
(
auth_t
*
auth
,
int
*
method_inited
,
auth_matchtype_t
init_with
)
{
size_t
i
;
if
(
*
method_inited
)
return
;
for
(
i
=
0
;
i
<
(
sizeof
(
auth
->
filter_method
)
/
sizeof
(
*
auth
->
filter_method
));
i
++
)
auth
->
filter_method
[
i
]
=
init_with
;
*
method_inited
=
1
;
}
static
inline
int
auth_get_authenticator__filter_method
(
auth_t
*
auth
,
xmlNodePtr
node
,
const
char
*
name
,
auth_matchtype_t
matchtype
,
int
*
method_inited
,
auth_matchtype_t
init_with
)
{
char
*
tmp
=
(
char
*
)
xmlGetProp
(
node
,
XMLSTR
(
name
));
if
(
tmp
)
{
char
*
cur
=
tmp
;
auth_get_authenticator__init_method
(
auth
,
method_inited
,
init_with
);
while
(
cur
)
{
char
*
next
=
strstr
(
cur
,
","
);
httpp_request_type_e
idx
;
...
...
@@ -706,6 +721,7 @@ auth_t *auth_get_authenticator(xmlNodePtr node)
char
*
tmp
;
size_t
i
;
size_t
filter_admin_index
=
0
;
int
method_inited
=
0
;
if
(
auth
==
NULL
)
return
NULL
;
...
...
@@ -739,6 +755,7 @@ auth_t *auth_get_authenticator(xmlNodePtr node)
for
(
i
=
0
;
i
<
(
sizeof
(
auth
->
filter_method
)
/
sizeof
(
*
auth
->
filter_method
));
i
++
)
auth
->
filter_method
[
i
]
=
AUTH_MATCHTYPE_NOMATCH
;
method_inited
=
1
;
while
(
cur
)
{
httpp_request_type_e
idx
;
...
...
@@ -767,13 +784,12 @@ auth_t *auth_get_authenticator(xmlNodePtr node)
}
xmlFree
(
method
);
}
else
{
for
(
i
=
0
;
i
<
(
sizeof
(
auth
->
filter_method
)
/
sizeof
(
*
auth
->
filter_method
));
i
++
)
auth
->
filter_method
[
i
]
=
AUTH_MATCHTYPE_MATCH
;
}
auth_get_authenticator__filter_method
(
auth
,
node
,
"match-method"
,
AUTH_MATCHTYPE_MATCH
);
auth_get_authenticator__filter_method
(
auth
,
node
,
"nomatch-method"
,
AUTH_MATCHTYPE_NOMATCH
);
auth_get_authenticator__filter_method
(
auth
,
node
,
"match-method"
,
AUTH_MATCHTYPE_MATCH
,
&
method_inited
,
AUTH_MATCHTYPE_NOMATCH
);
auth_get_authenticator__filter_method
(
auth
,
node
,
"nomatch-method"
,
AUTH_MATCHTYPE_NOMATCH
,
&
method_inited
,
AUTH_MATCHTYPE_MATCH
);
auth_get_authenticator__init_method
(
auth
,
&
method_inited
,
AUTH_MATCHTYPE_MATCH
);
tmp
=
(
char
*
)
xmlGetProp
(
node
,
XMLSTR
(
"match-web"
));
if
(
tmp
)
{
...
...
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