1
0
mirror of synced 2026-01-13 23:26:10 +00:00

--password overrides --genpass

Closes: #764143

Based on patch by Santiago Vila.
This commit is contained in:
Axel Beckert 2014-10-08 13:23:11 +02:00
parent 0a7ec4f855
commit 5d7e059668
2 changed files with 10 additions and 3 deletions

View File

@ -164,6 +164,7 @@ and EVMS EXAMPLE.
--password=passphrase
Set the root password for the new guest.
Note: This overrides --genpass
--(no)passwd (Don't) ask for a root password interactively during
setup. NOTE: This overrides --genpass --password.
@ -1287,7 +1288,7 @@ sub setupDefaultOptions
#
$CONFIG{ 'genpass' } = 1;
$CONFIG{ 'genpass_len' } = 8;
$CONFIG{ 'password' } = '';
$CONFIG{ 'password' } = undef;
$CONFIG{ 'hash_method' } = 'sha256';
#
@ -3886,13 +3887,17 @@ sub setupRootPassword
#
# Generate a password, salt and use that to generating a hash
#
if ( $CONFIG{ 'genpass' } )
if ( defined( $CONFIG{ 'password' } ) )
{
$PASSWORD = $CONFIG { 'password' };
}
elsif ( $CONFIG{ 'genpass' } )
{
$PASSWORD = generatePassword( $CONFIG{ 'genpass_len' } );
}
else
{
$PASSWORD = $CONFIG { 'password' };
fail("oops... neither passwd nor password nor genpass are set, should not happen!");
}
my $salt = generatePassword(8);

2
debian/changelog vendored
View File

@ -20,6 +20,8 @@ xen-tools (4.4+dev-1) UNRELEASED; urgency=low
+ Fix missing quoting in shell function "assert" in hooks/common.sh.
+ Fix initial configuration summary in cases where pygrub is used.
+ Fix corner cases where not the latest kernel would have been checked.
+ --password overrides --genpass. (Closes: #764143) Based on patch by
Santiago Vila.
[ Santiago Vila ]
+ Fix unaligned maxmem output of xen-create-image. (Closes: #764126)