Skip to content

Commit

Permalink
deploy: Ensure boot directory is open before accessing it
Browse files Browse the repository at this point in the history
This fixes a bug in the (early) deployment pruning function which before
tried to access the boot directory without opening it first.

Signed-off-by: Rogerio Guerra Borin <[email protected]>
  • Loading branch information
rborn-tx committed Mar 12, 2024
1 parent 223a1af commit 4efb44f
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/libostree/ostree-sysroot-deploy.c
Original file line number Diff line number Diff line change
Expand Up @@ -2641,6 +2641,9 @@ auto_early_prune_old_deployments (OstreeSysroot *self, GPtrArray *new_deployment
if (self->booted_deployment == NULL)
return TRUE;

if (!_ostree_sysroot_ensure_boot_fd (self, error))
return FALSE;

{
struct stat stbuf;
if (!glnx_fstatat (self->boot_fd, ".", &stbuf, 0, error))
Expand Down

0 comments on commit 4efb44f

Please sign in to comment.