Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Marvin Scholz
Icecast-Server
Commits
7093e195
Commit
7093e195
authored
Dec 19, 2014
by
Philipp Schafft
🦁
Browse files
Feature: Added support to type="static" <role> to list user
This adds support to list the user for a static <role>.
parent
1c550b0c
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/auth_static.c
View file @
7093e195
...
...
@@ -57,6 +57,17 @@ static void clear_auth (auth_t *auth) {
auth
->
state
=
NULL
;
}
static
auth_result
static_userlist
(
auth_t
*
auth
,
xmlNodePtr
srcnode
)
{
auth_static_t
*
auth_info
=
auth
->
state
;
xmlNodePtr
newnode
;
newnode
=
xmlNewChild
(
srcnode
,
NULL
,
XMLSTR
(
"User"
),
NULL
);
xmlNewChild
(
newnode
,
NULL
,
XMLSTR
(
"username"
),
XMLSTR
(
auth_info
->
username
));
xmlNewChild
(
newnode
,
NULL
,
XMLSTR
(
"password"
),
XMLSTR
(
auth_info
->
password
));
return
AUTH_OK
;
}
int
auth_get_static_auth
(
auth_t
*
authenticator
,
config_options_t
*
options
)
{
auth_static_t
*
auth_info
;
int
need_user
;
...
...
@@ -75,6 +86,7 @@ int auth_get_static_auth (auth_t *authenticator, config_options_t *options) {
return
-
1
;
authenticator
->
authenticate_client
=
static_auth
;
authenticator
->
listuser
=
static_userlist
;
authenticator
->
free
=
clear_auth
;
authenticator
->
state
=
auth_info
;
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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