summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/pseudo/files/mayunlink.patch
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2020-10-08 15:08:59 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2020-10-09 12:03:31 +0100
commit78b2a07710183f267a2b1412429170135764474a (patch)
tree363cbdd4dfc056186f3152f973fef75c5d55ad84 /meta/recipes-devtools/pseudo/files/mayunlink.patch
parent49bc76ec33dfe4d7261a430288c5276e195d70a0 (diff)
downloadpoky-78b2a07710183f267a2b1412429170135764474a.tar.gz
pseudo: Update to account for patches merged on branch
(From OE-Core rev: ea22fb3aa1c5dd3edcd1d8b415a0843a9ee4677c) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-devtools/pseudo/files/mayunlink.patch')
-rw-r--r--meta/recipes-devtools/pseudo/files/mayunlink.patch37
1 files changed, 0 insertions, 37 deletions
diff --git a/meta/recipes-devtools/pseudo/files/mayunlink.patch b/meta/recipes-devtools/pseudo/files/mayunlink.patch
deleted file mode 100644
index 9d54e40dd9..0000000000
--- a/meta/recipes-devtools/pseudo/files/mayunlink.patch
+++ /dev/null
@@ -1,37 +0,0 @@
1Some operations may call unlink() on an open fd, then call fchown/fchmod/fstat
2on that fd. This would currently readd its entry to the database, which
3is necessary to preserve its permissions information however since that
4file will be lost when it is closed, we don't want the DB entry to persist.
5Marking it as may_unlink means the code will know its likely been deleted
6and ignore the entry later, giving improved behaviour that simple path
7mismatch warnings. We can use an nlink of zero to detect this.
8
9Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
10Upstream-Status: Pending
11
12Index: git/pseudo.c
13===================================================================
14--- git.orig/pseudo.c
15+++ git/pseudo.c
16@@ -1100,6 +1100,21 @@ pseudo_op(pseudo_msg_t *msg, const char
17 break;
18 }
19
20+ switch (msg->op) {
21+ case OP_FCHOWN: /* FALLTHROUGH */
22+ case OP_FCHMOD: /* FALLTHROUGH */
23+ case OP_FSTAT:
24+ if (!found_path && !found_ino && (msg->nlink == 0)) {
25+ /* If nlink is 0 for an fchown/fchmod/fstat, we probably have an fd which is
26+ * unlinked and we don't want to do inode/path matching against it. Marking it
27+ * as may unlink gives the right hints in the database to ensure we
28+ * handle correctly whilst maintaining the permissions whilst the
29+ * file exists for the fd. */
30+ pdb_may_unlink_file(msg, msg->client);
31+ }
32+ break;
33+ }
34+
35 op_exit:
36 /* in the case of an exact match, we just used the pointer
37 * rather than allocating space.