GNU bug report logs - #32796
please consider using renameat2 from glibc if available

Previous Next

Package: coreutils;

Reported by: Johannes Schauer <josch <at> debian.org>

Date: Fri, 21 Sep 2018 15:22:02 UTC

Severity: normal

Tags: fixed

Done: Assaf Gordon <assafgordon <at> gmail.com>

Bug is archived. No further changes may be made.

Full log


Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Johannes Schauer <josch <at> debian.org>
To: bug-coreutils <at> gnu.org
Subject: please consider using renameat2 from glibc if available
Date: Fri, 21 Sep 2018 08:44:09 +0200
[Message part 1 (text/plain, inline)]
Hi,

tools like `mv` currently perform a direct renameat2 syscall. This is
problematic for software like fakechroot which allows one to perform a fake
chroot call without being root by intercepting and overriding libc functions
using LD_PRELOAD. It is currently not possible to perform a `mv` with recent
versions of coreutils inside a fakechroot environment because coreutils uses
the renameat2 syscall directly instead of using a libc function.

This problem could be solved by coreutils using the glibc renameat2 function in
glibc version 2.28 and newer. If glibc is older, coreutils could fall back to
performing a plain syscall instead to keep backwards compatibility.

Thanks!

cheers, josch
[signature.asc (application/pgp-signature, inline)]

This bug report was last modified 6 years and 265 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.