Skip to content

Commit

Permalink
lets hope for final fix
Browse files Browse the repository at this point in the history
  • Loading branch information
jreidinger committed Jul 12, 2023
1 parent 521d726 commit 4f8e82d
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
4 changes: 3 additions & 1 deletion rust/agama-dbus-server/src/questions.rs
Original file line number Diff line number Diff line change
@@ -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};
Expand Down Expand Up @@ -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();
}
}
Expand Down
6 changes: 3 additions & 3 deletions service/lib/agama/dbus/clients/question.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 4f8e82d

Please sign in to comment.