mirror of
https://git.proxmox.com/git/fwupd
synced 2025-08-03 00:02:45 +00:00
Optionally disable Polkit check with an environment variable
When running in a confined snap, it is not possible to check whether a policies have been installed.
This commit is contained in:
parent
ff8b3d26a4
commit
25dfb547c3
@ -20,6 +20,7 @@ with a non-standard filesystem layout.
|
||||
* `FWUPD_DOWNLOAD_VERBOSE` can be used to show wget or curl output
|
||||
* `FWUPD_PROFILE` can be used to set the profile traceback threshold value in ms
|
||||
* `FWUPD_FUZZER_RUNNING` if the firmware format is being fuzzed
|
||||
* `FWUPD_POLKIT_NOCHECK` if we should not check for polkit policies to be installed
|
||||
* standard glibc variables like `LANG` are also honored for CLI tools that are translated
|
||||
* libcurl respects the session proxy, e.g. `http_proxy`, `all_proxy`, `sftp_proxy` and `no_proxy`
|
||||
|
||||
|
@ -3706,9 +3706,14 @@ static gboolean
|
||||
fu_util_check_polkit_actions(GError **error)
|
||||
{
|
||||
#ifdef HAVE_POLKIT
|
||||
g_autofree gchar *directory = fu_path_from_kind(FU_PATH_KIND_POLKIT_ACTIONS);
|
||||
g_autofree gchar *filename =
|
||||
g_build_filename(directory, "org.freedesktop.fwupd.policy", NULL);
|
||||
g_autofree gchar *directory = NULL;
|
||||
g_autofree gchar *filename = NULL;
|
||||
|
||||
if (g_getenv("FWUPD_POLKIT_NOCHECK") != NULL)
|
||||
return TRUE;
|
||||
|
||||
directory = fu_path_from_kind(FU_PATH_KIND_POLKIT_ACTIONS);
|
||||
filename = g_build_filename(directory, "org.freedesktop.fwupd.policy", NULL);
|
||||
if (!g_file_test(filename, G_FILE_TEST_IS_REGULAR)) {
|
||||
g_set_error_literal(
|
||||
error,
|
||||
|
Loading…
Reference in New Issue
Block a user