All of lore.kernel.org
 help / color / mirror / Atom feed
From: Peter Seebach <peter.seebach@windriver.com>
To: openembedded-core <openembedded-core@lists.openembedded.org>
Subject: [PATCH 0/1] pseudo (1.4.5) -- this time for sure
Date: Wed, 13 Feb 2013 14:20:58 -0600	[thread overview]
Message-ID: <cover.1360786008.git.peter.seebach@windriver.com> (raw)

The question of how many copies of the chroot path should be prepended
to paths when calling link() is a challenging one, but after flirtations
with 2 (pseudo 1.4.3) and 0 (pseudo 1.4.4) I think I've settled on a
reasonable compromise at 1.

The underlying logic bug was an under-considered attempt to avoid
doing path expansions before calling a *at() function, which might help
with relative paths, but doesn't work with a chroot directory. In
fact, since we're fully expanding paths (including any fd-relative
paths), there's not even areason to use the linkat() syscall to implement
this.

Retested, and verified against the following trivial test case:

        #include <unistd.h>
        #include <stdio.h>
        #include <fcntl.h>
        #include <string.h>
        #include <errno.h>

        int
        main(void) {
                int rc;
                chdir("/home/seebs/pseudo/r");
                chroot("/home/seebs/pseudo/r");
                rc = link("/a", "/b");
                printf("%d: %d [%s]\n", rc, errno, strerror(errno));
                return 0;
        }

I am informed that pseudo 1.4.5.tar.bz2 is in the Yocto project download
area already.

Sorry for the trouble!

The following changes since commit bbcd8b344598850ea2c8d3ad375c519713581fde:
  Chen Qi (1):
        busybox: add config fragments

are available in the git repository at:

  git://git.yoctoproject.org/poky-contrib seebs/pseudo145
  http://git.yoctoproject.org/cgit.cgi/poky-contrib/log/?h=seebs/pseudo145

Peter Seebach (1):
  pseudo_1.4.5.bb: Finish fixing linkat()

 .../pseudo/{pseudo_1.4.4.bb => pseudo_1.4.5.bb}    |    4 ++--
 meta/recipes-devtools/pseudo/pseudo_git.bb         |    4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)
 rename meta/recipes-devtools/pseudo/{pseudo_1.4.4.bb => pseudo_1.4.5.bb} (43%)




             reply	other threads:[~2013-02-13 20:37 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-02-13 20:20 Peter Seebach [this message]
2013-02-13 20:20 ` [PATCH 1/1] pseudo_1.4.5.bb: Finish fixing linkat() Peter Seebach

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=cover.1360786008.git.peter.seebach@windriver.com \
    --to=peter.seebach@windriver.com \
    --cc=openembedded-core@lists.openembedded.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.