This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH 0/5] Linux: lchmod and AT_SYMLINK_NOFOLLOW support for fchmodat


These patches use the O_PATH hack to implement a fairly close
approximation of fchmodat in AT_SYMLINK_NOFOLLOW mode.

musl has an implementation of fchmodat which works on paths which do not
refer to symbolic links, so this addresses a portability hazard.

Thanks,
Florian

Florian Weimer (5):
  support: Add the xlstat function
  io: Implement lchmod using fchmodat [BZ #14578]
  Linux: Emulate fchmodat with AT_SYMLINK_NOFOLLOW using O_PATH [BZ
    #14578]
  io: Add io/tst-lchmod covering lchmod and fchmodat
  Linux: Add op/tst-o_path-locks

 include/sys/stat.h                         |   1 +
 io/Makefile                                |   2 +-
 io/fchmodat.c                              |   1 +
 io/lchmod.c                                |  10 +-
 io/tst-lchmod.c                            | 309 +++++++++++++++++++++
 support/Makefile                           |   1 +
 support/xlstat.c                           |  28 ++
 support/xunistd.h                          |   1 +
 sysdeps/mach/hurd/fchmodat.c               |   1 +
 sysdeps/unix/sysv/linux/Makefile           |   2 +-
 sysdeps/unix/sysv/linux/fchmodat.c         |  62 ++++-
 sysdeps/unix/sysv/linux/tst-o_path-locks.c | 100 +++++++
 12 files changed, 500 insertions(+), 18 deletions(-)
 create mode 100644 io/tst-lchmod.c
 create mode 100644 support/xlstat.c
 create mode 100644 sysdeps/unix/sysv/linux/tst-o_path-locks.c

-- 
2.24.1


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]