-
Notifications
You must be signed in to change notification settings - Fork 42
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
meta-webos-smack: refresh patches to apply cleanly on systemd version…
… 241 :Release Notes: systemd: refresh patches to apply cleanly on 244.3 :Detailed Notes: ERROR: systemd-1_241+AUTOINC+d1cc09a6ea-r0 do_patch: Fuzz detected: Applying patch 0001-meson-add-smack-default-process-label-option.patch patching file meson.build Hunk #1 succeeded at 929 (offset 94 lines). patching file meson_options.txt Hunk #1 succeeded at 234 with fuzz 2 (offset 14 lines). The context lines in the patches can be updated with devtool: devtool modify systemd devtool finish --force-patch-refresh systemd <layer_path> Don't forget to review changes done by devtool! ERROR: systemd-1_241+AUTOINC+d1cc09a6ea-r0 do_patch: QA Issue: Patch log indicates that patches do not apply cleanly. [patch-fuzz] :Testing Performed: Build tested. :QA Notes: None. :Issues Addressed: [PLAT-77937] Create GPVB with Yocto 2.7 [PLAT-115142] CCC: Upgrade to Yocto 2.7 Warrior Change-Id: I8f09fc82462e48007921768b92a2ff810b5d9bbb
- Loading branch information
Minjae Kim
authored and
Hyunjae Shin
committed
Sep 26, 2020
1 parent
b5e6812
commit 80a81f3
Showing
2 changed files
with
34 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,28 @@ | ||
From b1ea9128df06f43864defe8aa3d7293c6eef2de8 Mon Sep 17 00:00:00 2001 | ||
From f211d3b2903dbf697ae6a8694c872caae05bf55c Mon Sep 17 00:00:00 2001 | ||
From: "eugene.todoruk" <[email protected]> | ||
Date: Thu, 28 Mar 2019 17:35:24 +0300 | ||
Subject: [PATCH] SMACK: add loading unconfined label | ||
|
||
drop FOREACH_LINE() in systemd version 244, it is replaced. | ||
|
||
| ../git/src/core/smack-setup.c: In function 'write_unconfined': | ||
| ../git/src/core/smack-setup.c:41:9: error: implicit declaration of function 'FOREACH_LINE'; did you mean 'FOREACH_WORD'? [-Werror=implicit-function-declaration] | ||
| 41 | FOREACH_LINE(unconfined, f,log_error_errno(errno, "Failed to read line from '%s': %m", "/etc/smack/unconfined")) { | ||
| | ^~~~~~~~~~~~ | ||
| | FOREACH_WORD | ||
| ../git/src/core/smack-setup.c:41:9: warning: nested extern declaration of 'FOREACH_LINE' [-Wnested-externs] | ||
| ../git/src/core/smack-setup.c:41:121: error: expected ';' before '{' token | ||
| 41 | FOREACH_LINE(unconfined, f,log_error_errno(errno, "Failed to read line from '%s': %m", "/etc/smack/unconfined")) { | ||
| | | ||
--- | ||
src/core/smack-setup.c | 61 ++++++++++++++++++++++++++++++++++++++++++++++++++ | ||
1 file changed, 61 insertions(+) | ||
src/core/smack-setup.c | 68 ++++++++++++++++++++++++++++++++++++++++++ | ||
1 file changed, 68 insertions(+) | ||
|
||
diff --git a/src/core/smack-setup.c b/src/core/smack-setup.c | ||
index 50115c0..2ac11d5 100644 | ||
index 49b37aefc7..41563b0c45 100644 | ||
--- a/src/core/smack-setup.c | ||
+++ b/src/core/smack-setup.c | ||
@@ -25,6 +25,50 @@ | ||
@@ -25,6 +25,57 @@ | ||
|
||
#if ENABLE_SMACK | ||
|
||
|
@@ -30,9 +41,16 @@ index 50115c0..2ac11d5 100644 | |
+ return errno == ENOENT ? ENOENT : -errno; | ||
+ } | ||
+ | ||
+ FOREACH_LINE(unconfined, f, | ||
+ log_error_errno(errno, "Failed to read line from '%s': %m", | ||
+ "/etc/smack/unconfined")) { | ||
+ for(;;) { | ||
+ _cleanup_free_ char *line = NULL; | ||
+ bool invalid_line = false; | ||
+ int k; | ||
+ | ||
+ k = read_line(f, LONG_LINE_MAX, &line); | ||
+ if (k < 0) | ||
+ return log_error_errno(k, "Failed to read line from '%s': %m", "/etc/smack/unconfined"); | ||
+ if (k == 0) | ||
+ break; | ||
+ | ||
+ if (isempty(truncate_nl(unconfined))) | ||
+ continue; | ||
|
@@ -62,7 +80,7 @@ index 50115c0..2ac11d5 100644 | |
static int write_access2_rules(const char* srcdir) { | ||
_cleanup_close_ int load2_fd = -1, change_fd = -1; | ||
_cleanup_closedir_ DIR *dir = NULL; | ||
@@ -394,6 +438,23 @@ int mac_smack_setup(bool *loaded_policy) { | ||
@@ -413,6 +464,23 @@ int mac_smack_setup(bool *loaded_policy) { | ||
return r; | ||
} | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,18 @@ | ||
From 468c2dc9ba429dd1cff17975aeb52c9b31217fb4 Mon Sep 17 00:00:00 2001 | ||
From 35e78acc1346856e18e36d8414c21c48d136d164 Mon Sep 17 00:00:00 2001 | ||
From: "eugene.todoruk" <[email protected]> | ||
Date: Wed, 29 May 2019 12:32:32 +0300 | ||
Subject: [PATCH] meson: add smack-default-process-label option | ||
Subject: [PATCH] meson: add smack-default-process-label option | ||
|
||
--- | ||
meson.build | 5 +++++ | ||
meson_options.txt | 2 ++ | ||
2 files changed, 7 insertions(+) | ||
|
||
diff --git a/meson.build b/meson.build | ||
index 04331dd41a..6acff3ad39 100644 | ||
index e3f2a2aee7..772524a3d0 100644 | ||
--- a/meson.build | ||
+++ b/meson.build | ||
@@ -835,6 +835,11 @@ if smack_run_label != '' | ||
@@ -929,6 +929,11 @@ if smack_run_label != '' | ||
conf.set_quoted('SMACK_RUN_LABEL', smack_run_label) | ||
endif | ||
|
||
|
@@ -25,18 +25,15 @@ index 04331dd41a..6acff3ad39 100644 | |
install_polkit = false | ||
install_polkit_pkla = false | ||
diff --git a/meson_options.txt b/meson_options.txt | ||
index 16c1f2b2fa..596a7f3e65 100644 | ||
index 044bb792b5..48d04ca0f3 100644 | ||
--- a/meson_options.txt | ||
+++ b/meson_options.txt | ||
@@ -220,6 +220,8 @@ option('smack', type : 'boolean', | ||
@@ -234,6 +234,8 @@ option('smack', type : 'boolean', | ||
description : 'SMACK support') | ||
option('smack-run-label', type : 'string', | ||
description : 'run systemd --system itself with a specific SMACK label') | ||
+option('smack-default-process-label', type : 'string', | ||
+ description : 'run systemd services with a specific SMACK label') | ||
option('polkit', type : 'combo', choices : ['auto', 'true', 'false'], | ||
description : 'PolicyKit support') | ||
description : 'polkit support') | ||
option('ima', type : 'boolean', | ||
-- | ||
2.11.0 | ||
|