[elbe-devel] [PATCH] rfs: Prevent binary string prefix on passwd
Torben Hohn
torben.hohn at linutronix.de
Wed Oct 28 12:50:38 CET 2020
On Tue, Oct 20, 2020 at 12:50:34PM +0200, bage at linutronix.de wrote:
> From: Bastian Germann <bage at linutronix.de>
>
> The current use of encode on the passwd string leads to the binary string
> prefix b'...' ending up in the virtually entered password.
>
> Don't encode the string.
>
> Signed-off-by: Bastian Germann <bage at linutronix.de>
Reviewed-by: Torben Hohn <torben.hohn at linutronix.de>
> ---
> elbepack/rfs.py | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/elbepack/rfs.py b/elbepack/rfs.py
> index 76a6485f8..dffbf9963 100644
> --- a/elbepack/rfs.py
> +++ b/elbepack/rfs.py
> @@ -320,7 +320,7 @@ class BuildEnv (object):
>
>
> def seed_etc(self):
> - passwd = self.xml.text("target/passwd").encode(encoding='utf-8')
> + passwd = self.xml.text("target/passwd")
> stdin = "%s\n%s\n" % (passwd, passwd)
> chroot(self.rfs.path, "passwd", stdin=stdin)
>
> --
> 2.28.0
>
> _______________________________________________
> elbe-devel mailing list
> elbe-devel at linutronix.de
> https://lists.linutronix.de/mailman/listinfo/elbe-devel
--
Torben Hohn
Linutronix GmbH | Bahnhofstrasse 3 | D-88690 Uhldingen-Mühlhofen
Phone: +49 7556 25 999 18; Fax.: +49 7556 25 999 99
Hinweise zum Datenschutz finden Sie hier (Informations on data privacy
can be found here): https://linutronix.de/kontakt/Datenschutz.php
Linutronix GmbH | Firmensitz (Registered Office): Uhldingen-Mühlhofen |
Registergericht (Registration Court): Amtsgericht Freiburg i.Br., HRB700
806 | Geschäftsführer (Managing Directors): Heinz Egger, Thomas Gleixner
More information about the elbe-devel
mailing list