[freeside-commits] branch FREESIDE_3_BRANCH updated. d6c9e395caaf5a4547d7d480a15d264a57973914

Ivan Kohler ivan at freeside.biz
Fri Oct 16 12:18:39 PDT 2020


The branch, FREESIDE_3_BRANCH has been updated
       via  d6c9e395caaf5a4547d7d480a15d264a57973914 (commit)
       via  6857f437a10644e977ebe4157402ab9182af16b1 (commit)
      from  d5c36bbc9efd8dd9270a115c6d4ed376e8d91cff (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit d6c9e395caaf5a4547d7d480a15d264a57973914
Author: Ivan Kohler <ivan at freeside.biz>
Date:   Thu Nov 30 15:12:04 2017 -0800

    sha512 crypt() export

diff --git a/FS/FS/part_export/passwdfile.pm b/FS/FS/part_export/passwdfile.pm
index 6713c8d82..0ee721214 100644
--- a/FS/FS/part_export/passwdfile.pm
+++ b/FS/FS/part_export/passwdfile.pm
@@ -10,7 +10,7 @@ use FS::part_export::null;
 tie %options, 'Tie::IxHash',
   'crypt' => { label=>'Password encryption',
                type=>'select', options=>[qw(crypt md5 sha512)],
-               default=>'md5',
+               default=>'sha512',
              },
 ;
 
diff --git a/FS/FS/part_export/shellcommands.pm b/FS/FS/part_export/shellcommands.pm
index 7c280e5f8..09fa71b94 100644
--- a/FS/FS/part_export/shellcommands.pm
+++ b/FS/FS/part_export/shellcommands.pm
@@ -98,7 +98,7 @@ tie my %options, 'Tie::IxHash',
 
   'crypt' => { label   => 'Default password encryption',
                type=>'select', options=>[qw(crypt md5 sha512)],
-               default => 'md5',
+               default => 'sha512',
              },
   'groups_susp_reason' => { label =>
                              'Radius group mapping to reason (via template user)',
diff --git a/FS/FS/part_export/shellcommands_withdomain.pm b/FS/FS/part_export/shellcommands_withdomain.pm
index 2e12a39c1..1f6fac38b 100644
--- a/FS/FS/part_export/shellcommands_withdomain.pm
+++ b/FS/FS/part_export/shellcommands_withdomain.pm
@@ -64,7 +64,7 @@ tie my %options, 'Tie::IxHash',
            },
   'crypt' => { label   => 'Default password encryption',
                type=>'select', options=>[qw(crypt md5 sha512)],
-               default => 'md5',
+               default => 'sha512',
              },
   'fail_on_output' => {
       label => 'Treat any output from the command as an error',

commit 6857f437a10644e977ebe4157402ab9182af16b1
Author: Ivan Kohler <ivan at freeside.biz>
Date:   Thu Nov 30 15:11:34 2017 -0800

    sha512 crypt() export

diff --git a/FS/FS/part_export/passwdfile.pm b/FS/FS/part_export/passwdfile.pm
index 2978d2503..6713c8d82 100644
--- a/FS/FS/part_export/passwdfile.pm
+++ b/FS/FS/part_export/passwdfile.pm
@@ -9,8 +9,8 @@ use FS::part_export::null;
 
 tie %options, 'Tie::IxHash',
   'crypt' => { label=>'Password encryption',
-               type=>'select', options=>[qw(crypt md5)],
-               default=>'crypt',
+               type=>'select', options=>[qw(crypt md5 sha512)],
+               default=>'md5',
              },
 ;
 
diff --git a/FS/FS/part_export/shellcommands.pm b/FS/FS/part_export/shellcommands.pm
index 775af17ae..7c280e5f8 100644
--- a/FS/FS/part_export/shellcommands.pm
+++ b/FS/FS/part_export/shellcommands.pm
@@ -97,8 +97,8 @@ tie my %options, 'Tie::IxHash',
                         },
 
   'crypt' => { label   => 'Default password encryption',
-               type=>'select', options=>[qw(crypt md5)],
-               default => 'crypt',
+               type=>'select', options=>[qw(crypt md5 sha512)],
+               default => 'md5',
              },
   'groups_susp_reason' => { label =>
                              'Radius group mapping to reason (via template user)',
diff --git a/FS/FS/part_export/shellcommands_withdomain.pm b/FS/FS/part_export/shellcommands_withdomain.pm
index 1b59589bf..2e12a39c1 100644
--- a/FS/FS/part_export/shellcommands_withdomain.pm
+++ b/FS/FS/part_export/shellcommands_withdomain.pm
@@ -63,8 +63,8 @@ tie my %options, 'Tie::IxHash',
                  type  => 'checkbox',
            },
   'crypt' => { label   => 'Default password encryption',
-               type=>'select', options=>[qw(crypt md5)],
-               default => 'crypt',
+               type=>'select', options=>[qw(crypt md5 sha512)],
+               default => 'md5',
              },
   'fail_on_output' => {
       label => 'Treat any output from the command as an error',
diff --git a/FS/FS/svc_acct.pm b/FS/FS/svc_acct.pm
index efe6c73bb..d134adadd 100644
--- a/FS/FS/svc_acct.pm
+++ b/FS/FS/svc_acct.pm
@@ -2659,6 +2659,11 @@ sub crypt_password {
       );
     } elsif ( $encryption eq 'md5' ) {
       return unix_md5_crypt( $self->_password );
+    } elsif ( $encryption eq 'sha512' ) {
+      return crypt(
+        $self->_password,
+        '$6$rounds=15420$'. join('', map $saltset[int(rand(64))], (1..16) )
+      );
     } elsif ( $encryption eq 'sha1_base64' ) { #for acct_sql
       my $pass = sha1_base64( $self->_password );
       $pass .= '=' x (4 - length($pass) % 4); #properly padded base64

-----------------------------------------------------------------------

Summary of changes:
 FS/FS/part_export/passwdfile.pm               | 4 ++--
 FS/FS/part_export/shellcommands.pm            | 4 ++--
 FS/FS/part_export/shellcommands_withdomain.pm | 4 ++--
 FS/FS/svc_acct.pm                             | 5 +++++
 4 files changed, 11 insertions(+), 6 deletions(-)




More information about the freeside-commits mailing list