X-Git-Url: https://git.proxmox.com/?a=blobdiff_plain;f=test%2Fauth-test.pl;h=60429a98c36daf348a046c8a84f637fbbd366c97;hb=e842fec5e002c399e56222a447878597a0315845;hp=50a7f899caec9824adef943e54bc4a6e22784b45;hpb=2c3a6c0aaac7fbdaeb26bc5a596d21e897f3343a;p=pve-access-control.git diff --git a/test/auth-test.pl b/test/auth-test.pl index 50a7f89..60429a9 100644 --- a/test/auth-test.pl +++ b/test/auth-test.pl @@ -1,21 +1,13 @@ #!/usr/bin/perl -w use strict; -use Term::ReadLine; +use PVE::PTY; use PVE::AccessControl; my $username = shift; die "Username missing" if !$username; -sub read_password { - my $term = new Term::ReadLine ('pveum'); - my $attribs = $term->Attribs; - $attribs->{redisplay_function} = $attribs->{shadow_redisplay}; - my $input = $term->readline('password: '); - return $input; -} - -my $password = read_password(); +my $password = PVE::PTY::read_password('password: '); PVE::AccessControl::authenticate_user($username,$password); print "Authentication Successful!!\n";