[0/2] Introduce per-thread file system properties on Linux

Message ID cover.1665752531.git.fweimer@redhat.com
Headers
Series Introduce per-thread file system properties on Linux |

Message

Florian Weimer Oct. 14, 2022, 1:06 p.m. UTC
  This patch introduces per-thread chdir/chroot/umask, as used by some
file server software.

The interface can be generalized, I plan to use it for private
per-thread UID/GID, too.

Thanks,
Florian

Florian Weimer (2):
  support: Add the xfchdir function
  Linux: Implement per-thread file system attributes

 NEWS                                          |   5 +
 manual/threads.texi                           |  92 +++++
 nptl/Makefile                                 |   6 +-
 nptl/Versions                                 |   4 +
 nptl/pthread_attr_getperthreadfs_np.c         |  32 ++
 nptl/pthread_attr_setperthreadfs_np.c         |  39 +++
 nptl/pthread_create.c                         |  20 +-
 nptl/tst-pthread-perthreadfs-chroot.c         | 255 ++++++++++++++
 nptl/tst-pthread-perthreadfs.c                | 328 ++++++++++++++++++
 support/Makefile                              |   1 +
 support/xfchdir.c                             |  28 ++
 support/xunistd.h                             |   1 +
 sysdeps/nptl/internaltypes.h                  |  12 +
 sysdeps/nptl/pthread.h                        |  26 +-
 sysdeps/unix/sysv/linux/aarch64/libc.abilist  |   2 +
 sysdeps/unix/sysv/linux/alpha/libc.abilist    |   2 +
 sysdeps/unix/sysv/linux/arc/libc.abilist      |   2 +
 sysdeps/unix/sysv/linux/arm/be/libc.abilist   |   2 +
 sysdeps/unix/sysv/linux/arm/le/libc.abilist   |   2 +
 sysdeps/unix/sysv/linux/csky/libc.abilist     |   2 +
 sysdeps/unix/sysv/linux/hppa/libc.abilist     |   2 +
 sysdeps/unix/sysv/linux/i386/libc.abilist     |   2 +
 sysdeps/unix/sysv/linux/ia64/libc.abilist     |   2 +
 .../sysv/linux/loongarch/lp64/libc.abilist    |   2 +
 .../sysv/linux/m68k/coldfire/libc.abilist     |   2 +
 .../unix/sysv/linux/m68k/m680x0/libc.abilist  |   2 +
 .../sysv/linux/microblaze/be/libc.abilist     |   2 +
 .../sysv/linux/microblaze/le/libc.abilist     |   2 +
 .../sysv/linux/mips/mips32/fpu/libc.abilist   |   2 +
 .../sysv/linux/mips/mips32/nofpu/libc.abilist |   2 +
 .../sysv/linux/mips/mips64/n32/libc.abilist   |   2 +
 .../sysv/linux/mips/mips64/n64/libc.abilist   |   2 +
 sysdeps/unix/sysv/linux/nios2/libc.abilist    |   2 +
 sysdeps/unix/sysv/linux/or1k/libc.abilist     |   2 +
 .../linux/powerpc/powerpc32/fpu/libc.abilist  |   2 +
 .../powerpc/powerpc32/nofpu/libc.abilist      |   2 +
 .../linux/powerpc/powerpc64/be/libc.abilist   |   2 +
 .../linux/powerpc/powerpc64/le/libc.abilist   |   2 +
 .../unix/sysv/linux/riscv/rv32/libc.abilist   |   2 +
 .../unix/sysv/linux/riscv/rv64/libc.abilist   |   2 +
 .../unix/sysv/linux/s390/s390-32/libc.abilist |   2 +
 .../unix/sysv/linux/s390/s390-64/libc.abilist |   2 +
 sysdeps/unix/sysv/linux/sh/be/libc.abilist    |   2 +
 sysdeps/unix/sysv/linux/sh/le/libc.abilist    |   2 +
 .../sysv/linux/sparc/sparc32/libc.abilist     |   2 +
 .../sysv/linux/sparc/sparc64/libc.abilist     |   2 +
 .../unix/sysv/linux/x86_64/64/libc.abilist    |   2 +
 .../unix/sysv/linux/x86_64/x32/libc.abilist   |   2 +
 48 files changed, 907 insertions(+), 10 deletions(-)
 create mode 100644 nptl/pthread_attr_getperthreadfs_np.c
 create mode 100644 nptl/pthread_attr_setperthreadfs_np.c
 create mode 100644 nptl/tst-pthread-perthreadfs-chroot.c
 create mode 100644 nptl/tst-pthread-perthreadfs.c
 create mode 100644 support/xfchdir.c


base-commit: 2c42257314536b94cc8d52edede86e94e98c1436