X-Git-Url: https://git.proxmox.com/?p=pve-common.git;a=blobdiff_plain;f=src%2FPVE%2FPTY.pm;h=e433c4ec442a6cfdd1fae24e242ce1432215b760;hp=23d76c0d02f9028d1b394ff32d5e8b6bb4fbf369;hb=e97f807c388c10250f442b1f16c5315df2ffc2af;hpb=c93778bca165e0b8bf11a3ea586491a360f22842;ds=sidebyside diff --git a/src/PVE/PTY.pm b/src/PVE/PTY.pm index 23d76c0..e433c4e 100644 --- a/src/PVE/PTY.pm +++ b/src/PVE/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 {