Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
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
smradius
smradius
Commits
dbb53f4f
Commit
dbb53f4f
authored
8 years ago
by
Nigel Kukard
Browse files
Options
Downloads
Patches
Plain Diff
Fixed support for blank realms
parent
dceb683c
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!410
Ci db tests
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
lib/smradius/modules/system/mod_config_sql.pm
+7
-5
7 additions, 5 deletions
lib/smradius/modules/system/mod_config_sql.pm
with
7 additions
and
5 deletions
lib/smradius/modules/system/mod_config_sql.pm
+
7
−
5
View file @
dbb53f4f
...
...
@@ -197,14 +197,14 @@ sub getConfig
}
# Extract realm from username
if
(
defined
(
$user
->
{'
Username
'})
&&
$user
->
{'
Username
'}
=~
/^\S+@(\S+)$/
)
{
$realmName
=
$
1
;
if
(
defined
(
$user
->
{'
Username
'})
&&
$user
->
{'
Username
'}
=~
/^\S+
(?:
@(\S+)
)?
$/
)
{
$realmName
=
$
1
//
""
;
$server
->
log
(
LOG_DEBUG
,"
Processing
realm
attributes for '
$realmName
'
");
$server
->
log
(
LOG_DEBUG
,"
Processing attributes for
realm
'
$realmName
'
");
$sth
=
DBSelect
(
$config
->
{'
get_config_realm_id_query
'},
$realmName
);
if
(
!
$sth
)
{
$server
->
log
(
LOG_ERR
,"
Failed to get
user
realm config attributes:
"
.
AWITPT::DB::DBLayer::
Error
());
$server
->
log
(
LOG_ERR
,"
Failed to get realm config attributes:
"
.
AWITPT::DB::DBLayer::
Error
());
return
MOD_RES_NACK
;
}
# Fetch realm ID
...
...
@@ -216,7 +216,7 @@ sub getConfig
# User realm attributes
$sth
=
DBSelect
(
$config
->
{'
get_config_realm_attributes_query
'},
$realmID
);
if
(
!
$sth
)
{
$server
->
log
(
LOG_ERR
,"
Failed to get
user
realm config attributes:
"
.
AWITPT::DB::DBLayer::
Error
());
$server
->
log
(
LOG_ERR
,"
Failed to get realm config attributes:
"
.
AWITPT::DB::DBLayer::
Error
());
return
MOD_RES_NACK
;
}
# Add any realm attributes to config attributes
...
...
@@ -233,6 +233,8 @@ sub getConfig
return
MOD_RES_NACK
;
}
$server
->
log
(
LOG_DEBUG
,"
Realm '
$realmName
' has ID '
$realmID
'
");
# Get client name
my
$clientID
;
...
...
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