Re: [PATCH BlueZ 8/8] adapter: Ensure that file exists on IRK write

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Simon,

On Tue, Jul 25, 2023 at 1:56 AM Simon Mikuda
<simon.mikuda@xxxxxxxxxxxxxxxxxxx> wrote:
>
> ---
>  src/adapter.c | 2 ++
>  1 file changed, 2 insertions(+)
>
> diff --git a/src/adapter.c b/src/adapter.c
> index 4c3bb091d..fe8ae7604 100644
> --- a/src/adapter.c
> +++ b/src/adapter.c
> @@ -8823,6 +8823,8 @@ static void store_irk(struct btd_adapter *adapter, const bdaddr_t *peer,
>
>         g_key_file_set_string(key_file, "IdentityResolvingKey", "Key", str);
>
> +       create_file(filename, 0600);
> +
>         store_data = g_key_file_to_data(key_file, &length, NULL);
>         if (!g_file_set_contents(filename, store_data, length, &gerr)) {
>                 error("Unable set contents for %s: (%s)", filename,
> --
> 2.34.1

This looks like a fix as well so reword it and send it separately,
also please add the runtime error in the description.


-- 
Luiz Augusto von Dentz




[Index of Archives]     [Bluez Devel]     [Linux Wireless Networking]     [Linux Wireless Personal Area Networking]     [Linux ATH6KL]     [Linux USB Devel]     [Linux Media Drivers]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Big List of Linux Books]

  Powered by Linux