From 4f8e82d4709f4e5c50a617b36c2e680f30c5bb64 Mon Sep 17 00:00:00 2001 From: Josef Reidinger Date: Wed, 12 Jul 2023 22:25:08 +0200 Subject: [PATCH] lets hope for final fix --- rust/agama-dbus-server/src/questions.rs | 4 +++- service/lib/agama/dbus/clients/question.rb | 6 +++--- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/rust/agama-dbus-server/src/questions.rs b/rust/agama-dbus-server/src/questions.rs index 493501c388..9968359e11 100644 --- a/rust/agama-dbus-server/src/questions.rs +++ b/rust/agama-dbus-server/src/questions.rs @@ -1,7 +1,7 @@ use std::collections::HashMap; use crate::error::Error; -use log; +use log::{self, info}; use agama_lib::{connection_to,questions::{self, GenericQuestion, WithPassword}}; use anyhow::Context; use zbus::{dbus_interface, fdo::ObjectManager, zvariant::ObjectPath, Connection}; @@ -62,11 +62,13 @@ struct WithPasswordObject(questions::WithPassword); impl WithPasswordObject { #[dbus_interface(property)] pub fn password(&self) -> &str { + info!("Reading password {}", self.0.password.as_str()); self.0.password.as_str() } #[dbus_interface(property)] pub fn set_password(&mut self, value: &str) -> () { + info!("Setting password to {}", value); self.0.password = value.to_string(); } } diff --git a/service/lib/agama/dbus/clients/question.rb b/service/lib/agama/dbus/clients/question.rb index 5dacccd98f..b0399dc63d 100644 --- a/service/lib/agama/dbus/clients/question.rb +++ b/service/lib/agama/dbus/clients/question.rb @@ -59,11 +59,11 @@ def answer @dbus_iface["Answer"].to_sym end - # @return [String,nil] Password or nil if there is no LUKS interface + # @return [String,nil] Password or nil if there is no withPassword interface def password - return nil unless @luks_iface + return nil unless @password_iface - @luks_iface["Password"] + @password_iface["Password"] end # Whether the question is already answered