Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
S
smradius
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
shail
smradius
Commits
30b4c403
Commit
30b4c403
authored
15 years ago
by
Nigel Kukard
Browse files
Options
Downloads
Patches
Plain Diff
* Fixed configuration for mod_userdb_sql
* Use request. and not authentication. as macros
parent
6bdd91fd
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
smradius/modules/userdb/mod_userdb_sql.pm
+3
-3
3 additions, 3 deletions
smradius/modules/userdb/mod_userdb_sql.pm
smradiusd.conf
+23
-16
23 additions, 16 deletions
smradiusd.conf
with
26 additions
and
19 deletions
smradius/modules/userdb/mod_userdb_sql.pm
+
3
−
3
View file @
30b4c403
...
@@ -72,7 +72,7 @@ sub init
...
@@ -72,7 +72,7 @@ sub init
FROM
FROM
@TP@users
@TP@users
WHERE
WHERE
UserName = %{
authentication
.User-Name}
UserName = %{
requet
.User-Name}
';
';
$config
->
{'
userdb_get_group_attributes_query
'}
=
'
$config
->
{'
userdb_get_group_attributes_query
'}
=
'
...
@@ -121,7 +121,7 @@ sub find
...
@@ -121,7 +121,7 @@ sub find
# Build template
# Build template
my
$template
;
my
$template
;
foreach
my
$attr
(
$packet
->
attributes
)
{
foreach
my
$attr
(
$packet
->
attributes
)
{
$template
->
{'
authentication
'}
->
{
$attr
}
=
$packet
->
rawattr
(
$attr
)
$template
->
{'
request
'}
->
{
$attr
}
=
$packet
->
rawattr
(
$attr
)
}
}
$template
->
{'
user
'}
=
$user
;
$template
->
{'
user
'}
=
$user
;
...
@@ -168,7 +168,7 @@ sub get
...
@@ -168,7 +168,7 @@ sub get
# Build template
# Build template
my
$template
;
my
$template
;
foreach
my
$attr
(
$packet
->
attributes
)
{
foreach
my
$attr
(
$packet
->
attributes
)
{
$template
->
{'
authentication
'}
->
{
$attr
}
=
$packet
->
rawattr
(
$attr
)
$template
->
{'
request
'}
->
{
$attr
}
=
$packet
->
rawattr
(
$attr
)
}
}
$template
->
{'
user
'}
->
{'
Username
'}
=
$user
->
{'
Username
'};
$template
->
{'
user
'}
->
{'
Username
'}
=
$user
->
{'
Username
'};
$template
->
{'
user
'}
->
{'
ID
'}
=
$user
->
{'
_UserDB_Data
'}
->
{'
id
'};
$template
->
{'
user
'}
->
{'
ID
'}
=
$user
->
{'
_UserDB_Data
'}
->
{'
id
'};
...
...
This diff is collapsed.
Click to expand it.
smradiusd.conf
+
23
−
16
View file @
30b4c403
...
@@ -146,27 +146,34 @@ EOT
...
@@ -146,27 +146,34 @@ EOT
[
mod_userdb_sql
]
[
mod_userdb_sql
]
sql_password_query
=<<
EOT
userdb_find_query
=<<
EOT
SELECT
ID
,
Password
FROM
users
WHERE
Username
= %
u
SELECT
ID
FROM
@
TP
@
users
WHERE
UserName
= %{
request
.
User
-
Name
}
EOT
EOT
sql_failure_query
=<<
EOT
userdb_get_group_attributes_query
=<<
EOT
INSERT
INTO
AuthFail
(
Username
)
VALUES
(%
u
)
SELECT
group_attributes
.
Name
,
group_attributes
.
Operator
,
group_attributes
.
Value
FROM
@
TP
@
group_attributes
, @
TP
@
users_to_groups
WHERE
users_to_groups
.
UserID
= %{
user
.
ID
}
AND
group_attributes
.
GroupID
=
users_to_groups
.
GroupID
EOT
EOT
sql_user_attribute_query
=<<
EOT
userdb_get_user_attributes_query
=<<
EOT
SELECT
Attribute
,
Operator
,
Value
FROM
user_attributes
WHERE
UserID
= ${
user
.
id
}
SELECT
EOT
Name
,
Operator
,
Value
FROM
sql_group_query
=<<
EOT
@
TP
@
user_attributes
SELECT
GroupID
FROM
users_to_groups
WHERE
UserID
= ${
user
.
id
}
WHERE
UserID
= %{
user
.
ID
}
EOT
EOT
sql_group_attribute_query
=<<
EOT
SELECT
Attribute
,
Operator
,
Value
FROM
group_attributes
WHERE
GroupID
= ${
group
.
id
}
EOT
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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!
Save comment
Cancel
Please
register
or
sign in
to comment