mirror of
https://git.proxmox.com/git/fwupd
synced 2025-07-27 11:09:28 +00:00
redfish: Use secure helper to set file permissions when setting password
Instead of installing the conf file as locked down, set permissions when using it. This fixes a problem on snap first run: ``` cp: cannot open '/snap/fwupd/x1/etc/fwupd/redfish.conf' for reading: Permission denied ```
This commit is contained in:
parent
17db067d13
commit
22057f76cc
@ -272,10 +272,11 @@ fu_redfish_plugin_ipmi_create_user(FuPlugin *plugin, GError **error)
|
|||||||
fu_redfish_backend_set_password(data->backend, password_new);
|
fu_redfish_backend_set_password(data->backend, password_new);
|
||||||
|
|
||||||
/* success */
|
/* success */
|
||||||
if (!fu_plugin_set_config_value(plugin, "Username", username_fwupd, error))
|
if (!fu_plugin_set_secure_config_value(plugin, "Username", username_fwupd, error))
|
||||||
return FALSE;
|
return FALSE;
|
||||||
if (!fu_plugin_set_config_value(plugin, "Password", password_new, error))
|
if (!fu_plugin_set_secure_config_value(plugin, "Password", password_new, error))
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
@ -54,7 +54,6 @@ shared_module('fu_plugin_redfish',
|
|||||||
|
|
||||||
install_data(['redfish.conf'],
|
install_data(['redfish.conf'],
|
||||||
install_dir: join_paths(sysconfdir, 'fwupd'),
|
install_dir: join_paths(sysconfdir, 'fwupd'),
|
||||||
install_mode: 'rw-r-----',
|
|
||||||
)
|
)
|
||||||
|
|
||||||
if get_option('tests')
|
if get_option('tests')
|
||||||
|
Loading…
Reference in New Issue
Block a user