Jim Fehlig
4ed5ade753
security: Ensure file exists before attempting to restore label
...
When performing an install, it's common for tooling such as virt-install
to remove the install kernel/initrd once they are successfully booted and
the domain has been redefined to boot without them. After the installation
is complete and the domain is rebooted/shutdown, the DAC and selinux
security drivers attempt to restore labels on the now deleted files. It's
harmles wrt functionality, but results in error messages such as
Mar 08 12:40:37 virtqemud[5639]: internal error: child reported (status=125): unable to stat: /var/lib/libvirt/boot/vir>
Mar 08 12:40:37 virtqemud[5639]: unable to stat: /var/lib/libvirt/boot/virtinst-yvp19moo-linux: No such file or directo>
Mar 08 12:40:37 virtqemud[5639]: Unable to run security manager transaction
Add a check for file existence to the virSecurity*RestoreFileLabel functions,
and avoid relabeling if the file is no longer available. Skipping the restore
caused failures in qemusecuritytest, which mocks stat, chown, etc as part of
ensuring the security drivers properly restore labels. virFileExists is now
mocked in qemusecuritymock.c to return true when passed a file previously
seen by the mocked stat, chown, etc functions.
Signed-off-by: Jim Fehlig <jfehlig@suse.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2024-04-08 10:38:25 -06:00
..
2024-01-15 14:56:35 +01:00
2023-08-25 10:07:36 +02:00
2023-02-14 13:59:45 +01:00
2022-12-01 14:22:39 +01:00
2024-02-20 17:29:27 +01:00
2023-05-16 10:26:33 +02:00
2023-05-16 10:26:33 +02:00
2024-04-03 10:41:45 +02:00
2023-03-06 20:55:49 +01:00
2024-01-30 10:58:13 +01:00
2024-01-04 22:26:10 +01:00
2024-01-07 23:59:00 -05:00
2022-06-01 09:40:40 +02:00
2024-01-08 01:00:08 -05:00
2024-01-08 01:00:08 -05:00
2024-02-26 11:09:57 +01:00
2024-02-26 10:59:47 +01:00
2024-02-26 10:59:47 +01:00
2023-06-05 13:23:06 +02:00
2023-06-05 13:23:06 +02:00
2023-07-20 15:23:34 +02:00
2023-11-02 15:31:10 +01:00
2024-04-03 10:41:45 +02:00
2024-03-21 14:42:27 +01:00
2023-07-20 15:23:43 +02:00
2023-07-20 15:23:24 +02:00
2024-03-07 13:35:05 +01:00
2024-01-15 14:56:35 +01:00
2024-01-07 23:59:00 -05:00
2024-01-15 14:56:35 +01:00
2024-01-07 23:59:00 -05:00
2023-11-10 10:04:04 +01:00
2024-01-15 14:56:36 +01:00
2024-02-09 14:45:20 -06:00
2024-01-07 23:59:00 -05:00
2024-01-17 17:31:12 +01:00
2024-04-03 10:41:45 +02:00
2022-11-03 09:19:54 +01:00
2022-07-01 14:51:19 +02:00
2022-07-01 16:53:08 +02:00
2022-09-01 13:11:09 +02:00
2022-09-01 13:11:09 +02:00
2024-03-12 10:34:43 +01:00
2022-09-01 13:11:09 +02:00
2022-09-01 13:11:09 +02:00
2023-04-06 12:48:22 +02:00
2024-01-15 14:56:35 +01:00
2024-01-15 14:56:35 +01:00
2023-01-02 20:39:09 +01:00
2024-01-08 01:00:08 -05:00
2024-04-02 14:24:30 +02:00
2023-11-27 10:12:34 +01:00
2023-12-14 17:10:22 +01:00
2024-01-25 16:26:45 +01:00
2024-01-07 23:59:00 -05:00
2024-01-07 23:59:00 -05:00
2022-08-25 13:27:04 +02:00
2023-07-20 11:22:08 +02:00
2022-09-07 12:06:18 +02:00
2022-11-09 18:22:47 +01:00
2024-03-12 17:37:51 +01:00
2024-03-12 17:37:51 +01:00
2023-11-24 09:53:14 +01:00
2023-08-24 12:45:00 +02:00
2023-12-06 14:57:46 -06:00
2023-07-19 08:42:08 +02:00
2024-03-21 14:42:27 +01:00
2022-06-16 06:43:58 +02:00
2022-12-01 14:22:39 +01:00
2022-06-16 06:43:58 +02:00
2022-06-16 06:43:58 +02:00
2022-06-16 06:43:58 +02:00
2024-01-30 10:58:13 +01:00
2022-06-16 06:43:58 +02:00
2023-08-03 16:41:19 +02:00
2023-03-10 11:01:42 -07:00
2022-06-16 06:43:58 +02:00
2024-04-02 14:24:30 +02:00
2023-08-25 12:36:37 +02:00
2022-11-09 18:22:47 +01:00
2022-10-06 10:54:25 +02:00
2024-01-08 01:00:08 -05:00
2022-10-06 10:54:25 +02:00
2024-02-26 14:35:52 +01:00
2024-02-26 10:59:47 +01:00
2024-03-14 15:17:48 +01:00
2023-08-03 16:41:19 +02:00
2022-12-01 14:22:39 +01:00
2023-08-03 16:41:19 +02:00
2023-06-05 13:23:06 +02:00
2022-06-16 06:43:58 +02:00
2022-12-01 14:22:39 +01:00
2022-05-24 12:19:18 +02:00
2023-07-20 15:23:34 +02:00
2023-11-02 15:32:43 +01:00
2023-04-03 09:19:06 +02:00
2023-04-03 09:19:07 +02:00
2024-02-01 10:39:40 +01:00
2022-06-16 06:43:58 +02:00
2022-06-16 06:43:58 +02:00
2023-07-20 15:23:43 +02:00
2023-07-20 15:23:24 +02:00
2024-03-21 14:42:20 +01:00
2023-09-12 11:06:41 -05:00
2024-02-02 16:03:08 +01:00
2023-07-20 15:23:16 +02:00
2022-07-01 11:28:34 +02:00
2023-11-10 10:04:04 +01:00
2024-01-15 14:56:36 +01:00
2024-02-01 10:39:40 +01:00
2024-02-01 10:39:40 +01:00
2024-02-09 14:45:20 -06:00
2024-04-08 10:38:25 -06:00
2024-01-24 09:19:28 +01:00
2024-01-04 22:26:10 +01:00
2024-01-24 09:19:28 +01:00
2024-04-03 10:40:32 +02:00
2023-03-03 13:52:37 +01:00
2022-06-16 06:43:58 +02:00
2022-10-06 10:54:24 +02:00
2022-12-12 10:36:13 +00:00
2023-09-06 14:09:42 +02:00
2022-06-16 06:43:58 +02:00
2023-08-03 16:41:19 +02:00
2022-10-06 10:54:24 +02:00
2022-10-06 10:54:24 +02:00
2022-10-06 10:54:24 +02:00
2022-10-06 10:54:24 +02:00
2022-06-16 06:43:58 +02:00
2024-01-17 16:39:06 +01:00
2024-01-04 22:26:10 +01:00
2024-03-21 14:42:27 +01:00
2022-06-16 06:43:58 +02:00
2022-06-16 06:43:58 +02:00
2024-01-17 17:31:12 +01:00
2024-01-17 17:31:12 +01:00
2023-06-05 13:20:13 +02:00
2023-04-03 09:19:07 +02:00
2023-12-14 17:10:22 +01:00
2022-12-01 14:22:39 +01:00
2023-04-06 12:48:22 +02:00
2022-06-16 06:43:58 +02:00
2023-03-13 13:29:07 +01:00
2022-12-01 14:22:39 +01:00
2024-01-15 14:56:35 +01:00
2024-03-14 15:17:48 +01:00
2023-03-03 13:52:37 +01:00
2022-06-16 06:43:58 +02:00
2023-04-03 08:21:27 +02:00
2022-06-16 06:43:58 +02:00
2022-06-16 06:43:58 +02:00
2023-04-01 11:40:35 +02:00
2022-12-12 10:36:13 +00:00
2022-06-16 06:43:58 +02:00
2024-03-14 15:17:48 +01:00
2023-05-10 14:44:22 +02:00
2023-04-04 10:52:15 +02:00
2022-09-30 15:38:47 +02:00
2024-01-15 14:56:35 +01:00
2024-01-07 23:57:09 -05:00
2022-06-16 06:43:58 +02:00
2023-08-24 13:47:41 +02:00
2022-06-16 06:43:58 +02:00
2022-12-01 14:22:39 +01:00
2022-06-16 06:43:58 +02:00
2022-06-16 06:43:58 +02:00
2024-03-14 15:17:48 +01:00
2023-05-16 08:48:17 +02:00
2024-01-04 17:05:34 +01:00
2022-12-01 14:22:39 +01:00
2022-06-16 06:43:58 +02:00
2022-12-01 14:22:39 +01:00
2023-03-13 13:29:07 +01:00
2023-08-03 16:41:19 +02:00
2023-08-03 16:35:11 +02:00
2022-11-21 15:36:08 +01:00
2022-11-21 15:36:08 +01:00
2024-01-04 22:26:10 +01:00
2023-03-15 12:46:21 +01:00
2022-10-06 10:54:24 +02:00
2024-03-14 15:17:48 +01:00
2024-01-31 17:24:07 +01:00
2024-01-31 17:24:07 +01:00
2022-06-16 06:43:58 +02:00
2023-07-19 13:09:11 +02:00
2024-01-24 09:19:28 +01:00
2023-06-29 11:51:27 +02:00
2024-04-02 14:24:30 +02:00
2023-11-27 10:12:34 +01:00
2022-06-16 06:43:58 +02:00
2023-11-24 09:53:14 +01:00
2024-02-07 14:19:42 +01:00
2024-02-19 10:29:24 +01:00
2024-03-14 15:17:48 +01:00
2022-06-16 06:43:58 +02:00
2023-02-08 16:50:45 +01:00
2024-03-14 15:17:48 +01:00
2022-06-16 06:43:58 +02:00
2024-01-25 16:26:45 +01:00
2022-06-16 06:43:58 +02:00
2022-06-16 06:43:58 +02:00
2022-06-16 06:43:58 +02:00
2022-08-25 13:27:04 +02:00