[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[debbugs-tracker] bug#13125: closed (Fix permissions bugs with setgid di

From: GNU bug Tracking System
Subject: [debbugs-tracker] bug#13125: closed (Fix permissions bugs with setgid directories etc.)
Date: Fri, 14 Dec 2012 19:02:02 +0000

Your message dated Fri, 14 Dec 2012 11:00:09 -0800
with message-id <address@hidden>
and subject line Re: bug#13125: Fix permissions bugs with setgid directories 
has caused the debbugs.gnu.org bug report #13125,
regarding Fix permissions bugs with setgid directories etc.
to be marked as done.

(If you believe you have received this mail in error, please contact

13125: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=13125
GNU Bug Tracking System
Contact address@hidden with problems
--- Begin Message --- Subject: Fix permissions bugs with setgid directories etc. Date: Sat, 08 Dec 2012 17:13:50 -0800 User-agent: Mozilla/5.0 (X11; Linux i686; rv:17.0) Gecko/17.0 Thunderbird/17.0
Tags: patch security

Emacs sometimes mishandles the permissions of files: even if
backup-by-copying-when-mismatch is set, Emacs sometimes replaces a
rewritten file with a file that has the wrong user or group.

Here's some background.

In several places Emacs assumes that on 4.2BSD hosts, a newly created
file is given a group ID equal to its parent directory, and that on
non-4.2BSD hosts the new files are given Emacs's group ID.  Although
this was true long ago, it hasn't been true for many years.  Most
commonly, the old 4.2BSD behavior is now selected by the setgid bit on
directories.  But on some hosts, the behavior is selected as a mount
flag, or (as in 4.2BSD) it's a property of the operating system.  On
network file systems the behavior is sometimes selected by the file
server, sometimes by the client.

To add to the mess, on FreeBSD systems, the setuid bit of directories
can control whether there's a similar inheritance of file ownership.
Luckily this problem is a bit simpler, in that it's not a property
of the OS or a mount flag, as far as I know.

I'm attaching a patch, which changes file-attributes so that it now
outputs a placeholder value instead of the old 9th attribute member,
since the value is rarely needed and almost nobody seems to be using
it or caring that it's wrong.  Instead, the patch moves this
functionality to file-ownership-preserved-p via a new argument GROUP.
The patch also adds new functions group-gid and group-real-gid for use
with the backup-file heuristic.

This patch is relative to trunk bzr 111160.

Attachment: setgiddir.txt
Description: Text document

--- End Message ---
--- Begin Message --- Subject: Re: bug#13125: Fix permissions bugs with setgid directories etc. Date: Fri, 14 Dec 2012 11:00:09 -0800 User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/17.0 Thunderbird/17.0
No further comment, so I installed the patch as trunk bzr 111233
and am marking the bug as done.

--- End Message ---

reply via email to

[Prev in Thread] Current Thread [Next in Thread]