[Libguestfs] [PATCH] customize: password: use SHA-512 on openSUSE >= 11.0
Richard W.M. Jones
rjones at redhat.com
Tue Sep 8 17:28:59 UTC 2015
On Tue, Sep 08, 2015 at 07:10:47PM +0200, Pino Toscano wrote:
> openSUSE 11.0 has glibc 2.8, which supports the SHA-512 method.
> Fallback to an explicit MD5 for older versions.
> ---
> customize/password.ml | 3 +++
> 1 file changed, 3 insertions(+)
>
> diff --git a/customize/password.ml b/customize/password.ml
> index 27ced67..258d726 100644
> --- a/customize/password.ml
> +++ b/customize/password.ml
> @@ -162,6 +162,9 @@ and default_crypto g root =
> | "ubuntu", v when v >= 10 -> `SHA512
> | "ubuntu", _ -> `MD5
>
> + | "opensuse", v when v >= 11 -> `SHA512
> + | "opensuse", _ -> `MD5
> +
> | _, _ ->
> let minor = g#inspect_get_minor_version root in
> warning (f_"password: using insecure md5 password encryption for guest of type %s version %d.%d.
> --
ACK.
Rich.
--
Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
Read my programming and virtualization blog: http://rwmj.wordpress.com
libguestfs lets you edit virtual machines. Supports shell scripting,
bindings from many languages. http://libguestfs.org
More information about the Libguestfs
mailing list