This is the mail archive of the
glibc-bugs@sourceware.org
mailing list for the glibc project.
[Bug locale/22089] New: [PATCH] locale: Call fchmod() before calling link()
- From: "walters at verbum dot org" <sourceware-bugzilla at sourceware dot org>
- To: glibc-bugs at sourceware dot org
- Date: Tue, 05 Sep 2017 21:33:46 +0000
- Subject: [Bug locale/22089] New: [PATCH] locale: Call fchmod() before calling link()
- Auto-submitted: auto-generated
https://sourceware.org/bugzilla/show_bug.cgi?id=22089
Bug ID: 22089
Summary: [PATCH] locale: Call fchmod() before calling link()
Product: glibc
Version: unspecified
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: locale
Assignee: unassigned at sourceware dot org
Reporter: walters at verbum dot org
Target Milestone: ---
Created attachment 10395
--> https://sourceware.org/bugzilla/attachment.cgi?id=10395&action=edit
[PATCH] locale: Call fchmod() before calling link()
From d25853801c2a3cb8357b75b750af12bc6b43f75f Mon Sep 17 00:00:00 2001
From: Colin Walters <walters@verbum.org>
Date: Tue, 5 Sep 2017 16:55:34 -0400
Subject: [PATCH] locale: Call fchmod() before calling link()
The [rpm-ostree](https://github.com/projectatomic/rpm-ostree)
project implements atomic, online system upgrades using
[libostree](https://github.com/ostreedev/ostree/), which
contains a `rofiles-fuse` program:
https://github.com/ostreedev/ostree/blob/master/man/rofiles-fuse.xml
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.
There's no reason not to call `fchmod()` beforehand in all cases, so let's do
so
and fix the `rofiles-fuse` case.
---
ChangeLog | 5 +++++
locale/programs/locarchive.c | 18 +++++++++---------
2 files changed, 14 insertions(+), 9 deletions(-)
--
You are receiving this mail because:
You are on the CC list for the bug.