- ###
- # ICRADIUS export
- if ( $icradiusmachines ) {
-
- my $sth = $icradius_dbh->prepare(
- "INSERT INTO radcheck ( id, UserName, Attribute, Value ) VALUES ( ".
- join(", ", map { $icradius_dbh->quote( $_ ) } (
- '',
- $username,
- "Password",
- $svc_acct->_password,
- ) ). " )"
- );
- $sth->execute or die "Can't insert into radcheck table: ". $sth->errstr;
-
- foreach my $attribute ( keys %radcheck ) {
- my $sth = $icradius_dbh->prepare(
- "INSERT INTO radcheck ( id, UserName, Attribute, Value ) VALUES ( ".
- join(", ", map { $icradius_dbh->quote( $_ ) } (
- '',
- $username,
- $attribute,
- $radcheck{$attribute},
- ) ). " )"
- );
- $sth->execute or die "Can't insert into radcheck table: ". $sth->errstr; }
-
- foreach my $attribute ( keys %radreply ) {
- my $sth = $icradius_dbh->prepare(
- "INSERT INTO radreply (id, UserName, Attribute, Value) VALUES ( ".
- join(", ", map { $icradius_dbh->quote( $_ ) } (
- '',
- $username,
- $attribute,
- $radreply{$attribute},
- ) ). " )"
- );
- $sth->execute or die "Can't insert into radreply table: ". $sth->errstr; }
-
- if ( $ip && $ip ne '0e0' ) {
- my $sth = $icradius_dbh->prepare(
- "INSERT INTO radreply (id, UserName, Attribute, Value) VALUES ( ".
- join(", ", map { $icradius_dbh->quote( $_ ) } (
- '',
- $username,
- 'Framed-IP-Address',
- $ip,
- ) ). " )"
- );
- $sth->execute or die "Can't insert into radreply table: ". $sth->errstr; }
- }