diff options
author | Armin Kuster <akuster808@gmail.com> | 2024-12-30 22:00:02 -0500 |
---|---|---|
committer | Armin Kuster <akuster808@gmail.com> | 2025-01-06 20:01:40 -0500 |
commit | f771f969b1c4aec08d0092502d60145667c17c6d (patch) | |
tree | e6ad13075e833723c4df49856f13a4a41e45b8ea | |
parent | b825133225fc6e8a283e8b97c503006a3bfc9900 (diff) | |
download | meta-security-f771f969b1c4aec08d0092502d60145667c17c6d.tar.gz |
parsec-service: fix build error
Fixes:
| error: unnecessary qualification
| --> src/front/domain_socket.rs:247:30
| |
| 247 | let ucred_size = mem::size_of::<ucred>();
| | ^^^^^^^^^^^^^^^^^^^^^
Signed-off-by: Armin Kuster <akuster808@gmail.com>
-rw-r--r-- | meta-parsec/recipes-parsec/parsec-service/files/0002-Fix-unnecessary-qualifications-error.patch | 50 | ||||
-rw-r--r-- | meta-parsec/recipes-parsec/parsec-service/parsec-service_1.4.1.bb | 2 |
2 files changed, 52 insertions, 0 deletions
diff --git a/meta-parsec/recipes-parsec/parsec-service/files/0002-Fix-unnecessary-qualifications-error.patch b/meta-parsec/recipes-parsec/parsec-service/files/0002-Fix-unnecessary-qualifications-error.patch new file mode 100644 index 0000000..cef6bd8 --- /dev/null +++ b/meta-parsec/recipes-parsec/parsec-service/files/0002-Fix-unnecessary-qualifications-error.patch | |||
@@ -0,0 +1,50 @@ | |||
1 | From 86d4d2ca2f1e873a29f9f4d4bba99fedee19a144 Mon Sep 17 00:00:00 2001 | ||
2 | From: Gowtham Suresh Kumar <gowtham.sureshkumar@arm.com> | ||
3 | Date: Thu, 29 Aug 2024 17:10:06 +0100 | ||
4 | Subject: [PATCH 2/4] Fix unnecessary qualifications error | ||
5 | |||
6 | Signed-off-by: Gowtham Suresh Kumar <gowtham.sureshkumar@arm.com> | ||
7 | |||
8 | Upstream-Status: Backport | ||
9 | Signed-off-by: Armin Kuster <akuster808@gmail.com> | ||
10 | |||
11 | --- | ||
12 | src/front/domain_socket.rs | 9 +++++---- | ||
13 | 1 file changed, 5 insertions(+), 4 deletions(-) | ||
14 | |||
15 | diff --git a/src/front/domain_socket.rs b/src/front/domain_socket.rs | ||
16 | index 9fb8a0c..a0effa5 100644 | ||
17 | --- a/src/front/domain_socket.rs | ||
18 | +++ b/src/front/domain_socket.rs | ||
19 | @@ -239,15 +239,16 @@ pub mod peer_credentials { | ||
20 | pub mod impl_linux { | ||
21 | use super::UCred; | ||
22 | use libc::{c_void, getsockopt, socklen_t, ucred, SOL_SOCKET, SO_PEERCRED}; | ||
23 | + use std::io; | ||
24 | + use std::mem::size_of; | ||
25 | use std::os::unix::io::AsRawFd; | ||
26 | use std::os::unix::net::UnixStream; | ||
27 | - use std::{io, mem}; | ||
28 | |||
29 | pub fn peer_cred(socket: &UnixStream) -> io::Result<UCred> { | ||
30 | - let ucred_size = mem::size_of::<ucred>(); | ||
31 | + let ucred_size = size_of::<ucred>(); | ||
32 | |||
33 | // Trivial sanity checks. | ||
34 | - assert!(mem::size_of::<u32>() <= mem::size_of::<usize>()); | ||
35 | + assert!(size_of::<u32>() <= size_of::<usize>()); | ||
36 | assert!(ucred_size <= u32::MAX as usize); | ||
37 | |||
38 | let mut ucred_size = ucred_size as socklen_t; | ||
39 | @@ -266,7 +267,7 @@ pub mod peer_credentials { | ||
40 | &mut ucred_size, | ||
41 | ); | ||
42 | |||
43 | - if ret == 0 && ucred_size as usize == mem::size_of::<ucred>() { | ||
44 | + if ret == 0 && ucred_size as usize == size_of::<ucred>() { | ||
45 | Ok(UCred { | ||
46 | uid: ucred.uid, | ||
47 | gid: ucred.gid, | ||
48 | -- | ||
49 | 2.43.0 | ||
50 | |||
diff --git a/meta-parsec/recipes-parsec/parsec-service/parsec-service_1.4.1.bb b/meta-parsec/recipes-parsec/parsec-service/parsec-service_1.4.1.bb index 3aa0b0a..1d7c6e8 100644 --- a/meta-parsec/recipes-parsec/parsec-service/parsec-service_1.4.1.bb +++ b/meta-parsec/recipes-parsec/parsec-service/parsec-service_1.4.1.bb | |||
@@ -11,6 +11,7 @@ SRC_URI += "crate://crates.io/parsec-service/${PV} \ | |||
11 | file://parsec_init \ | 11 | file://parsec_init \ |
12 | file://systemd.patch \ | 12 | file://systemd.patch \ |
13 | file://parsec-tmpfiles.conf \ | 13 | file://parsec-tmpfiles.conf \ |
14 | file://0002-Fix-unnecessary-qualifications-error.patch \ | ||
14 | " | 15 | " |
15 | SRC_URI[parsec-service-1.4.1.sha256sum] = "06ad906fb13d6844ad676d4203a1096ae4efc87fe1abcea0481c507df56d8c98" | 16 | SRC_URI[parsec-service-1.4.1.sha256sum] = "06ad906fb13d6844ad676d4203a1096ae4efc87fe1abcea0481c507df56d8c98" |
16 | 17 | ||
@@ -47,6 +48,7 @@ INITSCRIPT_NAME = "parsec" | |||
47 | # The file should also be included into SRC_URI then | 48 | # The file should also be included into SRC_URI then |
48 | PARSEC_CONFIG ?= "${S}/config.toml" | 49 | PARSEC_CONFIG ?= "${S}/config.toml" |
49 | 50 | ||
51 | |||
50 | do_install () { | 52 | do_install () { |
51 | # Binaries | 53 | # Binaries |
52 | install -d -m 700 -o parsec -g parsec "${D}${libexecdir}/parsec" | 54 | install -d -m 700 -o parsec -g parsec "${D}${libexecdir}/parsec" |