+##
+## Allow systemd-logind to interact with the bootloader (read which one is
+## installed on fixed disks, enumerate entries for dbus property
+## BootLoaderEntries, etc.)
+##
+##
+gen_tunable(systemd_logind_get_bootloader, false)
+
attribute systemd_log_parse_env_type;
attribute systemd_tmpfiles_conf_type;
attribute systemd_user_session_type;
@@ -558,6 +567,15 @@ ifdef(`distro_redhat',`
userdom_user_runtime_root_filetrans_user_runtime(systemd_logind_t, dir)
')
+tunable_policy(`systemd_logind_get_bootloader',`
+ fs_getattr_dos_fs(systemd_logind_t)
+ fs_list_dos(systemd_logind_t)
+ fs_read_dos_files(systemd_logind_t)
+')
+# systemd-logind uses util-linux's blkid in order to find the ESP (EFI System Partition).
+# This reads the first sectors of fixed disk devices.
+storage_raw_read_fixed_disk_cond(systemd_logind_t, systemd_logind_get_bootloader)
+
optional_policy(`
dbus_connect_system_bus(systemd_logind_t)
dbus_system_bus_client(systemd_logind_t)