allow RADIUS lines with "Auth-Type = Local" too
authorivan <ivan>
Wed, 28 Jun 2000 12:32:30 +0000 (12:32 +0000)
committerivan <ivan>
Wed, 28 Jun 2000 12:32:30 +0000 (12:32 +0000)
bin/svc_acct.import

index c2ef4fd..691798b 100755 (executable)
@@ -1,6 +1,6 @@
 #!/usr/bin/perl -Tw
 #
 #!/usr/bin/perl -Tw
 #
-# $Id: svc_acct.import,v 1.9 2000-06-28 12:03:53 ivan Exp $
+# $Id: svc_acct.import,v 1.10 2000-06-28 12:32:30 ivan Exp $
 #
 # ivan@sisd.com 98-mar-9
 #
 #
 # ivan@sisd.com 98-mar-9
 #
@@ -17,8 +17,8 @@
 # don't import /var/spool/freeside/conf/shells!  ivan@sisd.com 98-aug-13
 #
 # $Log: svc_acct.import,v $
 # don't import /var/spool/freeside/conf/shells!  ivan@sisd.com 98-aug-13
 #
 # $Log: svc_acct.import,v $
-# Revision 1.9  2000-06-28 12:03:53  ivan
-# make svc_acct more forgiving about RADIUS users files
+# Revision 1.10  2000-06-28 12:32:30  ivan
+# allow RADIUS lines with "Auth-Type = Local" too
 #
 # Revision 1.8  2000/02/03 05:16:52  ivan
 # beginning of DNS and Apache support
 #
 # Revision 1.8  2000/02/03 05:16:52  ivan
 # beginning of DNS and Apache support
@@ -151,10 +151,10 @@ while (<USERS>) {
   next if /^\s*$/;
   next if /^\s*#/;
   if ( /^\S/ ) {
   next if /^\s*$/;
   next if /^\s*#/;
   if ( /^\S/ ) {
-    /^(\w+)\s+Password\s+=\s+"([^"]+)"(,\s+Expiration\s+=\s+"([^"]*")\s*)?$/
+    /^(\w+)\s+(Auth-Type\s+=\s+Local,\s+)Password\s+=\s+"([^"]+)"(,\s+Expiration\s+=\s+"([^"]*")\s*)?$/
       or die "1Unexpected line in users.import: $_";
     my($password,$expiration);
       or die "1Unexpected line in users.import: $_";
     my($password,$expiration);
-    ($username,$password,$expiration)=(lc($1),$2,$4);
+    ($username,$password,$expiration)=(lc($1),$3,$5);
     $password = '' if $password eq 'UNIX';
     $upassword{$username}=$password;
     undef %param;
     $password = '' if $password eq 'UNIX';
     $upassword{$username}=$password;
     undef %param;