2023-07-28 05:09:52

by Simon Mikuda

[permalink] [raw]
Subject: [PATCH BlueZ] adapter: Fix generating IRK for adapter with privacy enabled

When root folder for adapter doesn't exist we will get this runtime error:
src/adapter.c:generate_and_write_irk() Unable set contents for /var/lib/bluetooth/00:00:00:00:00:00/identity: (Failed to create file “/var/lib/bluetooth/00:00:00:00:00:00/identity.EKQ581”: No such file or directory)
---
src/adapter.c | 1 +
1 file changed, 1 insertion(+)

diff --git a/src/adapter.c b/src/adapter.c
index 2679d4302..fda26fb93 100644
--- a/src/adapter.c
+++ b/src/adapter.c
@@ -4148,6 +4148,7 @@ static int generate_and_write_irk(uint8_t *irk, GKeyFile *key_file,

g_key_file_set_string(key_file, "General", "IdentityResolvingKey",
str_irk_out);
+ create_file(filename, S_IRUSR | S_IWUSR);
str = g_key_file_to_data(key_file, &length, NULL);
if (!g_file_set_contents(filename, str, length, &gerr)) {
error("Unable set contents for %s: (%s)", filename,
--
2.34.1



2023-07-28 06:35:27

by bluez.test.bot

[permalink] [raw]
Subject: RE: [BlueZ] adapter: Fix generating IRK for adapter with privacy enabled

This is automated email and please do not reply to this email!

Dear submitter,

Thank you for submitting the patches to the linux bluetooth mailing list.
This is a CI test results with your patch series:
PW Link:https://patchwork.kernel.org/project/bluetooth/list/?series=770390

---Test result---

Test Summary:
CheckPatch FAIL 0.67 seconds
GitLint FAIL 0.54 seconds
BuildEll PASS 34.98 seconds
BluezMake PASS 1061.37 seconds
MakeCheck PASS 13.91 seconds
MakeDistcheck PASS 198.62 seconds
CheckValgrind PASS 320.73 seconds
CheckSmatch PASS 423.57 seconds
bluezmakeextell PASS 132.24 seconds
IncrementalBuild PASS 860.86 seconds
ScanBuild PASS 1368.01 seconds

Details
##############################
Test: CheckPatch - FAIL
Desc: Run checkpatch.pl script
Output:
[BlueZ] adapter: Fix generating IRK for adapter with privacy enabled
WARNING:SYMBOLIC_PERMS: Symbolic permissions 'S_IRUSR | S_IWUSR' are not preferred. Consider using octal permissions '0600'.
#91: FILE: src/adapter.c:4151:
+ create_file(filename, S_IRUSR | S_IWUSR);

/github/workspace/src/src/13331180.patch total: 0 errors, 1 warnings, 7 lines checked

NOTE: For some of the reported defects, checkpatch may be able to
mechanically convert to the typical style using --fix or --fix-inplace.

/github/workspace/src/src/13331180.patch has style problems, please review.

NOTE: Ignored message types: COMMIT_MESSAGE COMPLEX_MACRO CONST_STRUCT FILE_PATH_CHANGES MISSING_SIGN_OFF PREFER_PACKED SPDX_LICENSE_TAG SPLIT_STRING SSCANF_TO_KSTRTO

NOTE: If any of the errors are false positives, please report
them to the maintainer, see CHECKPATCH in MAINTAINERS.


##############################
Test: GitLint - FAIL
Desc: Run gitlint
Output:
[BlueZ] adapter: Fix generating IRK for adapter with privacy enabled

WARNING: I3 - ignore-body-lines: gitlint will be switching from using Python regex 'match' (match beginning) to 'search' (match anywhere) semantics. Please review your ignore-body-lines.regex option accordingly. To remove this warning, set general.regex-style-search=True. More details: https://jorisroovers.github.io/gitlint/configuration/#regex-style-search
4: B1 Line exceeds max length (215>80): "src/adapter.c:generate_and_write_irk() Unable set contents for /var/lib/bluetooth/00:00:00:00:00:00/identity: (Failed to create file “/var/lib/bluetooth/00:00:00:00:00:00/identity.EKQ581”: No such file or directory)"


---
Regards,
Linux Bluetooth

2023-07-28 23:21:32

by patchwork-bot+bluetooth

[permalink] [raw]
Subject: Re: [PATCH BlueZ] adapter: Fix generating IRK for adapter with privacy enabled

Hello:

This patch was applied to bluetooth/bluez.git (master)
by Luiz Augusto von Dentz <[email protected]>:

On Fri, 28 Jul 2023 06:45:56 +0200 you wrote:
> When root folder for adapter doesn't exist we will get this runtime error:
> src/adapter.c:generate_and_write_irk() Unable set contents for /var/lib/bluetooth/00:00:00:00:00:00/identity: (Failed to create file “/var/lib/bluetooth/00:00:00:00:00:00/identity.EKQ581”: No such file or directory)
> ---
> src/adapter.c | 1 +
> 1 file changed, 1 insertion(+)

Here is the summary with links:
- [BlueZ] adapter: Fix generating IRK for adapter with privacy enabled
https://git.kernel.org/pub/scm/bluetooth/bluez.git/?id=16c1166d8737

You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html