]> git.proxmox.com Git - pve-access-control.git/blobdiff - PVE/Auth/PAM.pm
d/control: bump version dependency to pve-cluster
[pve-access-control.git] / PVE / Auth / PAM.pm
index 93768053d80acb5bf0a8965b8bc6ef00190ae5c1..42feba8cae9092b81ca79a2b35c69675164f2257 100755 (executable)
@@ -1,6 +1,8 @@
 package PVE::Auth::PAM;
 
 use strict;
+use warnings;
+
 use PVE::Tools qw(run_command);
 use PVE::Auth::Plugin;
 use Authen::PAM qw(:constants);
@@ -15,6 +17,7 @@ sub options {
     return {
        default => { optional => 1 },
        comment => { optional => 1 },
+       tfa => { optional => 1 },
     };
 }
 
@@ -63,7 +66,7 @@ sub store_password {
 
     my $cmd = ['usermod'];
 
-    my $epw = PVE::Auth::Plugin::encrypt_pw($password);
+    my $epw = PVE::Tools::encrypt_pw($password);
 
     push @$cmd, '-p', $epw, $username;