This is the mail archive of the
glibc-bugs@sourceware.org
mailing list for the glibc project.
[Bug locale/22089] [PATCH] locale: Call fchmod() before calling link()
- From: "ldv at sourceware dot org" <sourceware-bugzilla at sourceware dot org>
- To: glibc-bugs at sourceware dot org
- Date: Fri, 08 Dec 2017 21:10:14 +0000
- Subject: [Bug locale/22089] [PATCH] locale: Call fchmod() before calling link()
- Auto-submitted: auto-generated
- References: <bug-22089-131@http.sourceware.org/bugzilla/>
https://sourceware.org/bugzilla/show_bug.cgi?id=22089
--- Comment #3 from Dmitry V. Levin <ldv at sourceware dot org> ---
(In reply to Colin from comment #0)
> Currently rpm-ostree will run all scripts, such as glibc's
> `build-locale-archive` with an rofiles-fuse mount active. This fails
> because we call `fchmod()` *after* calling `link()`, and `rofiles-fuse`
> rejects writes to files with multiple links.
What the current code does is essentially the following:
fd = mkstemp (fname);
link (fname, archivefname);
unlink (fname);
fchmod (fd, S_IRUSR|S_IWUSR|S_IRGRP|S_IROTH);
How could this lead to creation of a file with multiple links?
--
You are receiving this mail because:
You are on the CC list for the bug.