projects
/
freeside.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
fix wa_tax_rate_update script to skip zero rates, #73226
[freeside.git]
/
bin
/
sqlradius.reimport
diff --git
a/bin/sqlradius.reimport
b/bin/sqlradius.reimport
index
89eb801
..
2218a3f
100755
(executable)
--- a/
bin/sqlradius.reimport
+++ b/
bin/sqlradius.reimport
@@
-107,7
+107,8
@@
while ( defined ( $row = $sth->fetchrow_arrayref ) ) {
}
}
}
}
- my( $password, $finger, $group ) = ( '', '', '' );
+ #my( $password, $finger, $group ) = ( '', '', '' );
+ my( $password, $group ) = ( '', '', '' );
my $rc_sth = $dbh->prepare(
'SELECT Attribute, Value, Name, GroupName'.
my $rc_sth = $dbh->prepare(
'SELECT Attribute, Value, Name, GroupName'.
@@
-118,9
+119,9
@@
while ( defined ( $row = $sth->fetchrow_arrayref ) ) {
foreach my $rc_row ( @{$rc_sth->fetchall_arrayref} ) {
my($attribute, $value, $name, $groupname) = @$rc_row;
foreach my $rc_row ( @{$rc_sth->fetchall_arrayref} ) {
my($attribute, $value, $name, $groupname) = @$rc_row;
- if ( $attribute =~ /^(
Crypt
-)?Password$/ ) {
+ if ( $attribute =~ /^(
(Crypt|User)
-)?Password$/ ) {
$password = $value;
$password = $value;
- $finger = $name;
+
#
$finger = $name;
$group = $groupname;
} else {
#handle other params!
$group = $groupname;
} else {
#handle other params!
@@
-131,7
+132,8
@@
while ( defined ( $row = $sth->fetchrow_arrayref ) ) {
qsearch('svc_acct', { 'username' => $username,
'domsvc' => $svc_domain->svcnum, } );
qsearch('svc_acct', { 'username' => $username,
'domsvc' => $svc_domain->svcnum, } );
- print "$r_username / $realm: $password / $finger: ";
+ #print "$r_username / $realm: $password / $finger: ";
+ print "$r_username / $realm: $password: ";
if ( scalar(@svc_acct) == 0 ) {
print "not found\n";
next;
if ( scalar(@svc_acct) == 0 ) {
print "not found\n";
next;
@@
-139,11
+141,13
@@
while ( defined ( $row = $sth->fetchrow_arrayref ) ) {
print "multiple matches found?!?!\n";
next;
} else {
print "multiple matches found?!?!\n";
next;
} else {
- print "correcting password and name\n";
+ #print "correcting password and name\n";
+ print "correcting password\n";
}
my $svc_acct = $svc_acct[0];
}
my $svc_acct = $svc_acct[0];
- my $new = new FS::svc_acct { $svc_acct->hash, '_password' => $password, 'finger' => $finger };
+ #my $new = new FS::svc_acct { $svc_acct->hash, '_password' => $password, 'finger' => $finger };
+ my $new = new FS::svc_acct { $svc_acct->hash, '_password' => $password };
my $error = $new->replace($svc_acct);
#my $error = $new->check;
die "$r_username / $realm: $error" if $error;
my $error = $new->replace($svc_acct);
#my $error = $new->check;
die "$r_username / $realm: $error" if $error;
@@
-151,6
+155,6
@@
while ( defined ( $row = $sth->fetchrow_arrayref ) ) {
}
sub usage {
}
sub usage {
- die "Usage:\n\n sqlradius.import user\n";
+ die "Usage:\n\n sqlradius.
re
import user\n";
}
}