[elbe-devel] [PATCH v2 3/8] commands: check-build: move password to login value

Bastian Germann bage at linutronix.de
Fri Jun 24 12:11:52 CEST 2022


Am 16.06.22 um 12:10 schrieb Holger Dengler:
> The plain-text passwords in XML will be replaced by hashed variants, so
> that they are no longer usable for the login action. Use the value in
> the login element for storing the plain-text root password. If no
> password is set, the default password ("root") is used.
> 
> Signed-off-by: Holger Dengler <holger at hdengler.de>

Reviewed-by: Bastian Germann <bage at linutronix.de>

> ---
>   elbepack/commands/check-build.py | 5 ++---
>   schema/dbsfed.xsd                | 4 +++-
>   2 files changed, 5 insertions(+), 4 deletions(-)
> 
> diff --git a/elbepack/commands/check-build.py b/elbepack/commands/check-build.py
> index ce2fe6da2..e619f3139 100644
> --- a/elbepack/commands/check-build.py
> +++ b/elbepack/commands/check-build.py
> @@ -447,10 +447,9 @@ class CheckImage(CheckBase):
>   
>       def do_login(self, _element, img_name, qemu, opts):
>   
> -        # TODO - We might want to have encrypted password in source.xml
>           passwd = "root"
> -        if self.xml.has("./target/passwd"):
> -            passwd = self.xml.text("./target/passwd")
> +        if self.xml.find(".//action/login").text:
> +            passwd = self.xml.find(".//action/login").text
>   
>           comm = [
>               ("expect", ".*[Ll]ogin:.*"),
> diff --git a/schema/dbsfed.xsd b/schema/dbsfed.xsd
> index 38642e3ac..ed6423854 100644
> --- a/schema/dbsfed.xsd
> +++ b/schema/dbsfed.xsd
> @@ -606,7 +606,9 @@
>         <element name="login" type="rfs:string" minOccurs="0" maxOccurs="1">
>           <annotation>
>             <documentation>
> -            Try to login into root session and shutdown the machine
> +            Try to login into root session and shutdown the machine.  The
> +            element takes an (optional) plain-text password for root.
> +            Default password is "root".
>             </documentation>
>           </annotation>
>         </element>


More information about the elbe-devel mailing list