GithubHelp home page GithubHelp logo

cross-boss's People

Contributors

chewi avatar t-lo avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Forkers

mjeveritt t-lo

cross-boss's Issues

Intermediate dirs created for bind mounts have a too restrictive umask

When binding a file from the host file system into the chroot, bubblewrap helpfully creates all intermediate directories that don't exist in the target. However, cross-boss uses a restrictive umask. As a result, those dirs get created with permission 700, owned by root:root.

Since the binds are typically executables, this causes them to only be executable by root โ€“ other users won't be able to read them even though the permissions of the file itself are fine. If the executable in question is an ELF interpreter such as qemu-user, it causes any execve of a target-arch ELF to fail with EACCES, with no other explanation, resulting in an issue that's difficult to diagnose. :-)

Is it possible to

  1. disallow creating intermediate directories and failing, forcing the user to create them manually with correct permissions, or
  2. change the umask to 755 or similar, or
  3. document the issue and add a record to the FAQ?

Allow (or maybe document) binding of arbitrary extra helper programs into `cb-bwrap` chroot

I'm using cross-boss to cross-compile a rootfs for a PowerPC platform in conjunction with QEMU-user. My platform requires me to specify the -cpu to qemu-ppc when chrooting, otherwise I get illegal instruction errors. To do that, I use a wrapper program that execves QEMU with the -cpu parameter added.

What is the best way of binding both the wrapper and QEMU binaries to the target? cb-bwrap automatically parses the binfmt_misc registry and binds the interpreter it finds there. In my case, it therefore binds the wrapper, but not the actual QEMU executable. As a hack, I added a dummy and otherwise unused entry to binfmt_misc containing qemu-ppc as the target.

Reading the source code, I see that passing --ro-bind "${qemu_path}" "${qemu_path}" as extra arguments to cb-bwrap would perhaps also work, but it's not documented. Is that a supported way, or just an implementation detail?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.