On Sat, 2025-08-02 at 11:42 +0200, Jan Kiszka wrote:
>
> Can you please explain the code path where this is causing a regression?
> Are you calling probe_config_file() directly, or is it something
> happening within plain libebgenv as well?
>
Hi, thanx for the reply.
I am using the standard efibootguard v0.19 debian package (sid) or latest v0.20.
I does not happen with v0.13 (bookworm).
The Use/Test case is the following
- Config partions are mounted
- Call bg_printenv with none or any option (-c, -p 0)
- prints all fields set to 0, no error.
The issue:
'open_config_file_from_part' needs the mountpoint which gets freed before in
probe_config_file, so it returns NULL. Only if the partition is not mounted in
read_env,
mount_partition gets called which sets the mountpoint for the function.
bg_printenv
├── bgenv_init
│ ├── probe_config_partitions
│ │ ├── probe_config_file
│ │ │ └ sets _and_ frees mountpoint
│ │ └ returns true
│ ├── read_env
│ │ ├── open_config_file_from_part
│ │ │ └ returns NULL because mountpoint not set
│ │ └ returns false
│ └ returns true (but failed, because return value not checked)
├── dump_envs
│ ├── bgenv_open_by_index
│ │ └ returns handle
│ ├── dump_env dumps empty values
└── bgenv_finalize
└── free(...mountpoint)
Regards, INgo
> Jan
>
--
You received this message because you are subscribed to the Google Groups "EFI
Boot Guard" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion visit
https://groups.google.com/d/msgid/efibootguard-dev/ff7117803422c77e57ee87743cc9f04a91f4e7ab.camel%40linutronix.de.