diff options
author | ivan <ivan> | 2001-09-07 20:17:50 +0000 |
---|---|---|
committer | ivan <ivan> | 2001-09-07 20:17:50 +0000 |
commit | 3beb58199322355f8caa166000bb94e9419b4232 (patch) | |
tree | fd2ab49c213276b181e2d4bf49df4961b48f3e23 /bin/fs-radius-add-reply | |
parent | 34e22e18b050b9a507433d24eb7a896ce2182afd (diff) |
fix RADIUS attribute capitalization
Diffstat (limited to 'bin/fs-radius-add-reply')
-rwxr-xr-x | bin/fs-radius-add-reply | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/bin/fs-radius-add-reply b/bin/fs-radius-add-reply index 997a8eac7..d2f2e11f0 100755 --- a/bin/fs-radius-add-reply +++ b/bin/fs-radius-add-reply @@ -5,8 +5,13 @@ use strict; use DBI; use FS::UID qw(adminsuidsetup checkeuid getsecrets); +use FS::raddb; + die "Not running uid freeside!" unless checkeuid(); +my %attrib2db = + map { $FS::raddb::attrib{lc($_)} => $_ } keys %FS::raddb::attrib; + my $user = shift or die &usage; getsecrets($user); @@ -18,7 +23,8 @@ print "\n\n", <<END, ":"; Enter the additional RADIUS reply attributes you need to track for each user, separated by whitespace. END -my @attributes = map { s/\-/_/g; $_; } split(" ",&getvalue); +my @attributes = map { $attrib2db{lc($_)} or die "unknown attribute $_"; } + split(" ",&getvalue); sub getvalue { my($x)=scalar(<STDIN>); |