[elbe-devel] [PATCH] rfs: Prevent binary string prefix on passwd

bage at linutronix.de bage at linutronix.de
Tue Oct 20 12:50:34 CEST 2020


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



More information about the elbe-devel mailing list