summaryrefslogtreecommitdiffstats
path: root/recipes-devtools
diff options
context:
space:
mode:
authorAnton Gerasimov <anton@advancedtelematic.com>2016-10-04 14:42:42 +0200
committerAnton Gerasimov <anton@advancedtelematic.com>2016-10-04 14:42:42 +0200
commit7bd3693b986e0a6e59016767ea6f075ba01ab68c (patch)
tree8cf3fc3f8a6a546ca1f734cd56e3d4e8fca58faf /recipes-devtools
parent844ddcf4496edfdb9b682f712ab1ae1cd16f1f97 (diff)
downloadmeta-updater-7bd3693b986e0a6e59016767ea6f075ba01ab68c.tar.gz
Tuned initrd image and pseudo environment to fix bugs with extended
security attributes. Bug-AGL: SPEC-259 Change-Id: I44499ce3f5f1924aecf63689a93d1f20e779225e Signed-off-by: Anton Gerasimov <anton@advancedtelematic.com>
Diffstat (limited to 'recipes-devtools')
-rw-r--r--recipes-devtools/pseudo/files/0001-Add-check-for-existence-of-old-file-to-renameat.patch40
-rw-r--r--recipes-devtools/pseudo/pseudo_1.7.5.bbappend3
2 files changed, 43 insertions, 0 deletions
diff --git a/recipes-devtools/pseudo/files/0001-Add-check-for-existence-of-old-file-to-renameat.patch b/recipes-devtools/pseudo/files/0001-Add-check-for-existence-of-old-file-to-renameat.patch
new file mode 100644
index 0000000..3da2ad7
--- /dev/null
+++ b/recipes-devtools/pseudo/files/0001-Add-check-for-existence-of-old-file-to-renameat.patch
@@ -0,0 +1,40 @@
1From 41bb6c818a7ec9eeb33b60302c55c9c5ee393c5f Mon Sep 17 00:00:00 2001
2From: Anton Gerasimov <anton@advancedtelematic.com>
3Date: Fri, 30 Sep 2016 17:12:19 +0200
4Subject: [PATCH 1/1] Add check for existence of old file to renameat
5
6---
7 ports/unix/guts/renameat.c | 7 ++++++-
8 1 file changed, 6 insertions(+), 1 deletion(-)
9
10diff --git a/ports/unix/guts/renameat.c b/ports/unix/guts/renameat.c
11index ade0509..d5e36fa 100644
12--- a/ports/unix/guts/renameat.c
13+++ b/ports/unix/guts/renameat.c
14@@ -11,6 +11,7 @@
15 int oldrc, newrc;
16 int save_errno;
17 int old_db_entry = 0;
18+ int may_unlinked = 0;
19
20 pseudo_debug(PDBGF_FILE, "renameat: %d,%s->%d,%s\n",
21 olddirfd, oldpath ? oldpath : "<nil>",
22@@ -44,10 +45,14 @@
23 /* as with unlink, we have to mark that the file may get deleted */
24 msg = pseudo_client_op(OP_MAY_UNLINK, 0, -1, newdirfd, newpath, newrc ? NULL : &newbuf);
25 if (msg && msg->result == RESULT_SUCCEED)
26+ may_unlinked = 1;
27+ msg = pseudo_client_op(OP_STAT, 0, -1, olddirfd, oldpath, oldrc ? NULL : &oldbuf);
28+ if (msg && msg->result == RESULT_SUCCEED)
29 old_db_entry = 1;
30+
31 rc = real_renameat(olddirfd, oldpath, newdirfd, newpath);
32 save_errno = errno;
33- if (old_db_entry) {
34+ if (may_unlinked) {
35 if (rc == -1) {
36 /* since we failed, that wasn't really unlinked -- put
37 * it back.
38--
392.9.3
40
diff --git a/recipes-devtools/pseudo/pseudo_1.7.5.bbappend b/recipes-devtools/pseudo/pseudo_1.7.5.bbappend
new file mode 100644
index 0000000..73b43df
--- /dev/null
+++ b/recipes-devtools/pseudo/pseudo_1.7.5.bbappend
@@ -0,0 +1,3 @@
1FILESEXTRAPATHS_prepend := "${THISDIR}/files:"
2
3SRC_URI += "file://0001-Add-check-for-existence-of-old-file-to-renameat.patch"