mbox series

[0/5] Add openat2 support, update to version 1.9.4

Message ID 1776709829-2754-1-git-send-email-mark.hatle@kernel.crashing.org
Headers show
Series Add openat2 support, update to version 1.9.4 | expand

Message

Mark Hatle April 20, 2026, 6:30 p.m. UTC
Thanks to Richard, it looks like we have a working openat2 implementation.

There is a know issue where it appears to be able to escape the chroot,
I don't know if this is expected behavior for the call or not.  But for
our Yocto Project workflow this should be ok.  (Since we're only
emulating chroot semantics, escaping from the chroot is not a security
issue!  There a multiple ways to escape or by-pass the emulation and
pseudo should not be used for this type of security.)

I've also attempted to add test cases for the functionality, both
the function call and syscall versions of openat2.

Finally we're bumping the release version to 1.9.4 (assuming no issues
in the review of these changes.)


Mark Hatle (4):
  openat2: Implement openat2 wrapper
  test: Add openat2 test cases
  test: Add renameat2 test cases
  Makefile.in: Bump version to 1.9.4

Richard Purdie (1):
  makewrappers/openat2: Add preserve_path option

 Makefile.in                         |   2 +-
 makewrappers                        |  18 ++-
 ports/linux/openat2/guts/openat2.c  | 198 ++++++++++++++++++++++--
 ports/linux/openat2/wrapfuncs.in    |   2 +-
 ports/linux/pseudo_wrappers.c       |   3 +
 templates/wrapfuncs.c               |   1 +
 test/test-openat2-func-chroot.sh    |  18 +++
 test/test-openat2-func.c            | 274 +++++++++++++++++++++++++++++++++
 test/test-openat2-func.sh           |  18 +++
 test/test-openat2-syscall-chroot.sh |  18 +++
 test/test-openat2-syscall.c         | 299 ++++++++++++++++++++++++++++++++++++
 test/test-openat2-syscall.sh        |  18 +++
 test/test-renameat2-chroot.sh       |  11 ++
 test/test-renameat2.c               | 263 +++++++++++++++++++++++++++++++
 test/test-renameat2.sh              |  11 ++
 test/test-syscall.c                 |   9 +-
 16 files changed, 1146 insertions(+), 17 deletions(-)
 create mode 100755 test/test-openat2-func-chroot.sh
 create mode 100644 test/test-openat2-func.c
 create mode 100755 test/test-openat2-func.sh
 create mode 100755 test/test-openat2-syscall-chroot.sh
 create mode 100644 test/test-openat2-syscall.c
 create mode 100755 test/test-openat2-syscall.sh
 create mode 100755 test/test-renameat2-chroot.sh
 create mode 100644 test/test-renameat2.c
 create mode 100755 test/test-renameat2.sh