diff options
| author | Richard Purdie <richard.purdie@linuxfoundation.org> | 2020-10-03 17:27:10 +0100 |
|---|---|---|
| committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2021-02-03 14:13:53 +0000 |
| commit | 74e91462754d459c23ad40b4867a82e2b6529de1 (patch) | |
| tree | 3e0438ba0d3483206977f165891ab37adc1936db | |
| parent | 3ed2af928b17d33d3667f87616da0182d29f72cc (diff) | |
| download | poky-74e91462754d459c23ad40b4867a82e2b6529de1.tar.gz | |
pseudo: Add pathfix patch
Add a path to fix up handling of dirfd being passed as a full file
and with path="".
(From OE-Core rev: 07ca0b87e0fa3f783ecce7f09f8800b1a6eb668e)
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
(cherry picked from commit 3006bbe7768e4efe33d3d2d3f5786a561ecbe96f)
Signed-off-by: Steve Sakoman <steve@sakoman.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
| -rw-r--r-- | meta/recipes-devtools/pseudo/files/pathfix.patch | 25 | ||||
| -rw-r--r-- | meta/recipes-devtools/pseudo/pseudo_git.bb | 1 |
2 files changed, 26 insertions, 0 deletions
diff --git a/meta/recipes-devtools/pseudo/files/pathfix.patch b/meta/recipes-devtools/pseudo/files/pathfix.patch new file mode 100644 index 0000000000..b3e63fa28f --- /dev/null +++ b/meta/recipes-devtools/pseudo/files/pathfix.patch | |||
| @@ -0,0 +1,25 @@ | |||
| 1 | We're seeing systems in the wild (e.g. ubuntu 20.04) which call | ||
| 2 | with a dirfd set to the full filename and path set to "". Since | ||
| 3 | this seems to be expected to work, handle it accordingly. | ||
| 4 | |||
| 5 | Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> | ||
| 6 | Upstream-Status: Pending | ||
| 7 | |||
| 8 | Index: git/pseudo_client.c | ||
| 9 | =================================================================== | ||
| 10 | --- git.orig/pseudo_client.c | ||
| 11 | +++ git/pseudo_client.c | ||
| 12 | @@ -1549,8 +1549,12 @@ base_path(int dirfd, const char *path, i | ||
| 13 | |||
| 14 | if (!path) | ||
| 15 | return NULL; | ||
| 16 | - if (!*path) | ||
| 17 | + | ||
| 18 | + if (!*path) { | ||
| 19 | + if (dirfd != -1 && dirfd != AT_FDCWD) | ||
| 20 | + return fd_path(dirfd); | ||
| 21 | return ""; | ||
| 22 | + } | ||
| 23 | |||
| 24 | if (path[0] != '/') { | ||
| 25 | if (dirfd != -1 && dirfd != AT_FDCWD) { | ||
diff --git a/meta/recipes-devtools/pseudo/pseudo_git.bb b/meta/recipes-devtools/pseudo/pseudo_git.bb index c5040f5f7f..bc20a2f134 100644 --- a/meta/recipes-devtools/pseudo/pseudo_git.bb +++ b/meta/recipes-devtools/pseudo/pseudo_git.bb | |||
| @@ -8,6 +8,7 @@ SRC_URI = "git://git.yoctoproject.org/pseudo;branch=oe-core \ | |||
| 8 | file://track_link_fds.patch \ | 8 | file://track_link_fds.patch \ |
| 9 | file://xattr_fix.patch \ | 9 | file://xattr_fix.patch \ |
| 10 | file://mayunlink.patch \ | 10 | file://mayunlink.patch \ |
| 11 | file://pathfix.patch \ | ||
| 11 | file://fallback-passwd \ | 12 | file://fallback-passwd \ |
| 12 | file://fallback-group \ | 13 | file://fallback-group \ |
| 13 | " | 14 | " |
