summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorivan <ivan>2002-10-09 13:07:52 +0000
committerivan <ivan>2002-10-09 13:07:52 +0000
commit0a452abbabbab4d1804e761c583c69e737defee8 (patch)
tree839f05ee61f54380449e62a7fee4d0f47bedb4dc
parentfc2253ab595e75d144b4bb1be2c0e289079ef8a1 (diff)
radius-password config value to set the attribute used for plaintext pw's
-rw-r--r--FS/FS/Conf.pm8
-rw-r--r--FS/FS/svc_acct.pm4
2 files changed, 11 insertions, 1 deletions
diff --git a/FS/FS/Conf.pm b/FS/FS/Conf.pm
index c0860404f..777fe1c5f 100644
--- a/FS/FS/Conf.pm
+++ b/FS/FS/Conf.pm
@@ -981,6 +981,14 @@ httemplate/docs/config.html
'type' => 'textarea',
},
+ {
+ 'key' => 'raidus-password',
+ 'section' => 'unclassified',
+ 'description' => 'RADIUS attribute for plain-text passwords.',
+ 'type' => 'select',
+ 'select_enum' => [ 'Password', 'User-Password' ],
+ },
+
);
1;
diff --git a/FS/FS/svc_acct.pm b/FS/FS/svc_acct.pm
index b8e9cfc4e..480549908 100644
--- a/FS/FS/svc_acct.pm
+++ b/FS/FS/svc_acct.pm
@@ -10,6 +10,7 @@ use vars qw( @ISA $noexport_hack $conf
$mydomain
$welcome_template $welcome_from $welcome_subject $welcome_mimetype
$smtpmachine
+ $radius_password
$dirhash
@saltset @pw_set );
use Carp;
@@ -64,6 +65,7 @@ $FS::UID::callback{'FS::svc_acct'} = sub {
$welcome_template = '';
}
$smtpmachine = $conf->config('smtpmachine');
+ $radius_password = $conf->config('radius-password') || 'Password';
};
@saltset = ( 'a'..'z' , 'A'..'Z' , '0'..'9' , '.' , '/' );
@@ -867,7 +869,7 @@ expected to change in the future.
sub radius_check {
my $self = shift;
my $password = $self->_password;
- my $pw_attrib = length($password) <= 12 ? 'Password' : 'Crypt-Password';
+ my $pw_attrib = length($password) <= 12 ? $radius_password : 'Crypt-Password';
( $pw_attrib => $self->_password,
map {
/^(rc_(.*))$/;