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
a446e73a
Commit
a446e73a
authored
16 years ago
by
Nigel Kukard
Browse files
Options
Downloads
Patches
Plain Diff
* Added SQL userdb framework
parent
5d41d053
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
smradius/modules/userdb/mod_userdb_sql.pm
+98
-0
98 additions, 0 deletions
smradius/modules/userdb/mod_userdb_sql.pm
with
98 additions
and
0 deletions
smradius/modules/userdb/mod_userdb_sql.pm
0 → 100644
+
98
−
0
View file @
a446e73a
# SQL user database support
#
# Copyright (C) 2008, AllWorldIT
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License along
# with this program; if not, write to the Free Software Foundation, Inc.,
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
package
mod_sql_test
;
use
strict
;
use
warnings
;
# Modules we need
use
smradius::
constants
;
# Exporter stuff
require
Exporter
;
our
(
@ISA
,
@EXPORT
,
@EXPORT_OK
);
@ISA
=
qw(Exporter)
;
@EXPORT
=
qw(
)
;
@EXPORT_OK
=
qw(
)
;
# Plugin info
our
$pluginInfo
=
{
Name
=>
"
SQL User Database
",
Init
=>
\
&init
,
# User database
User_find
=>
\
&find
,
User_get
=>
\
&get
,
};
## @internal
# Initialize module
sub
init
{
my
$server
=
shift
;
}
## @find
# Try find a user
#
# @param server Server object
# @param user User
# @param packet Radius packet
#
# @return Result
sub
find
{
my
(
$server
,
$user
,
$packet
)
=
@_
;
# TODO: Query database and see if this user exists
return
MOD_RES_SKIP
;
}
## @get
# Try to get a user
#
# @param server Server object
# @param user User
# @param packet Radius packet
#
# @return Result
sub
get
{
my
(
$server
,
$user
,
$packet
)
=
@_
;
# TODO: Query user and get attributes, return in $userDetails hash
return
$userDetails
;
}
1
;
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