[Libguestfs] [PATCH] customize: password: use SHA-512 on openSUSE >= 11.0

Pino Toscano ptoscano at redhat.com
Tue Sep 8 17:10:47 UTC 2015


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.
-- 
2.1.0




More information about the Libguestfs mailing list