Openembedded Core Discussions
 help / color / mirror / Atom feed
* [PATCH v2] pseudo: Upgrade to latest to fix openat() with a directory symlink
@ 2019-08-01 20:03 Jason Wessel
  2019-08-01 21:37 ` [PATCH v2] pseudo: Upgrade to latest to fix openat() with a directory symlink [NAK] Jason Wessel
  0 siblings, 1 reply; 15+ messages in thread
From: Jason Wessel @ 2019-08-01 20:03 UTC (permalink / raw)
  To: openembedded-core

While working with ostree disk generation in conjunction with wic, I
found a problem with pseudo where it tried to resolve a symlink when
it shouldn't, based on openat() flags.  I narrowed down the problem to
a simple c program to reproduce the issue:

int main()
{
    /* Tested with: gcc -Wall -o app app.c ; echo "no pseudo" ; ./app ; echo "pseudo"; pseudo ./app */
    system("rm -rf tdir tlink");
    system("mkdir tdir");
    system("ln -s tdir tlink");
    DIR *dir = opendir(".");
    int dfd = dirfd(dir);

    int target_dfd = openat (dfd, "tlink", O_RDONLY | O_NONBLOCK | O_DIRECTORY | O_CLOEXEC | O_NOFOLLOW);
    if (target_dfd == -1) {
        printf("This is right\n");
    } else {
        printf("This is broken\n");
    }
    return 0;
}

Many thanks to Peter Seebach for fixing the problem in the pseudo code
to use the same logic which was already there for the
AT_SYMLINK_NOFOLLOW.

Also updated is the license MD5 checksum since the master branch of
pseudo has had teh SPDX data updated.

Signed-off-by: Jason Wessel <jason.wessel@windriver.com>
---
 meta/recipes-devtools/pseudo/pseudo.inc    | 2 +-
 meta/recipes-devtools/pseudo/pseudo_git.bb | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/meta/recipes-devtools/pseudo/pseudo.inc b/meta/recipes-devtools/pseudo/pseudo.inc
index 8b05735bb1..8b34909726 100644
--- a/meta/recipes-devtools/pseudo/pseudo.inc
+++ b/meta/recipes-devtools/pseudo/pseudo.inc
@@ -4,7 +4,7 @@
 
 SUMMARY = "Pseudo gives fake root capabilities to a normal user"
 HOMEPAGE = "http://git.yoctoproject.org/cgit/cgit.cgi/pseudo"
-LIC_FILES_CHKSUM = "file://COPYING;md5=243b725d71bb5df4a1e5920b344b86ad"
+LIC_FILES_CHKSUM = "file://COPYING;md5=a1d8023a6f953ac6ea4af765ff62d574"
 SECTION = "base"
 LICENSE = "LGPL2.1"
 DEPENDS = "sqlite3 attr"
diff --git a/meta/recipes-devtools/pseudo/pseudo_git.bb b/meta/recipes-devtools/pseudo/pseudo_git.bb
index 51db84c4d4..3350c3fabd 100644
--- a/meta/recipes-devtools/pseudo/pseudo_git.bb
+++ b/meta/recipes-devtools/pseudo/pseudo_git.bb
@@ -8,7 +8,7 @@ SRC_URI = "git://git.yoctoproject.org/pseudo \
            file://toomanyfiles.patch \
            "
 
-SRCREV = "3fa7c853e0bcd6fe23f7524c2a3c9e3af90901c3"
+SRCREV = "097ca3e245200c4a4333964af59a106c42ff3bca"
 S = "${WORKDIR}/git"
 PV = "1.9.0+git${SRCPV}"
 
-- 
2.21.0



^ permalink raw reply related	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2019-08-14 17:09 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-08-01 20:03 [PATCH v2] pseudo: Upgrade to latest to fix openat() with a directory symlink Jason Wessel
2019-08-01 21:37 ` [PATCH v2] pseudo: Upgrade to latest to fix openat() with a directory symlink [NAK] Jason Wessel
2019-08-01 23:57   ` Seebs
2019-08-02 16:27     ` Jason Wessel
2019-08-02 17:07       ` Seebs
2019-08-02 17:42         ` Seebs
2019-08-03 12:33           ` Khem Raj
2019-08-03 14:23             ` Seebs
2019-08-03 14:57               ` Khem Raj
2019-08-04 16:13                 ` Mark Hatle
2019-08-05 14:23                 ` Jason Wessel
2019-08-05 22:42               ` Bystricky, Juro
2019-08-06  6:51                 ` Martin Jansa
2019-08-14 16:02                   ` Randy MacLeod
2019-08-14 17:09                     ` Martin Jansa

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox