X-Git-Url: https://git.proxmox.com/?p=pve-client.git;a=blobdiff_plain;f=PVE%2FAPIClient%2FPTY.pm;h=ee5010c6a737f472f1447b4ae2f8d3b598821536;hp=00010df705f1ba3b3ed804cf2dc5e02698da829e;hb=0cdec2275373c7ff44e4b44169ec1dc98004ae7d;hpb=c9138c03bcb92d01e8c7d9f195ac2f9b4d5458b3 diff --git a/PVE/APIClient/PTY.pm b/PVE/APIClient/PTY.pm index 00010df..ee5010c 100644 --- a/PVE/APIClient/PTY.pm +++ b/PVE/APIClient/PTY.pm @@ -228,6 +228,13 @@ sub read_password($;$$) { return $password; } +sub get_confirmed_password { + my $pw1 = read_password('Enter new password: '); + my $pw2 = read_password('Retype new password: '); + die "passwords do not match\n" if $pw1 ne $pw2; + return $pw1; +} + # Class functions sub new {