diff options
| author | Paul Eggert | 2013-12-29 10:18:45 -0800 |
|---|---|---|
| committer | Paul Eggert | 2013-12-29 10:18:45 -0800 |
| commit | a560b856b15f57889eb10be984130c285e2cb43d (patch) | |
| tree | f422337dcce0c3b4115aff096c35708ea7e587de /etc | |
| parent | 830506d93af4c75edc487016c1711941e96faa04 (diff) | |
| download | emacs-a560b856b15f57889eb10be984130c285e2cb43d.tar.gz emacs-a560b856b15f57889eb10be984130c285e2cb43d.zip | |
Plain copy-file no longer chmods an existing destination.
* doc/lispref/files.texi (Changing Files): Document this.
* etc/NEWS: Document this.
* src/fileio.c (realmask): Now a static var, not a local.
(barf_or_query_if_file_exists): New arg KNOWN_TO_EXIST.
Remove arg STATPTR. All uses changed.
(Fcopy_file): Do not alter permissions of existing destinations,
unless PRESERVE-PERMISSIONS (renamed from
PRESERVE-EXTENDED-ATTRIBUTES) is non-nil.
Avoid race when testing for existing destinations and for
when input and output files are the same.
If changing the group fails, adjust both default and
preserved permissions so that access is not granted to the
wrong group.
(Fset_default_file_modes, init_fileio): Update realmask.
(Fdefault_file_modes): Use realmask instead of calling umask.
Fixes: debbugs:16133
Diffstat (limited to 'etc')
| -rw-r--r-- | etc/ChangeLog | 5 | ||||
| -rw-r--r-- | etc/NEWS | 10 |
2 files changed, 13 insertions, 2 deletions
diff --git a/etc/ChangeLog b/etc/ChangeLog index 8a4b8fb774c..bde366da14f 100644 --- a/etc/ChangeLog +++ b/etc/ChangeLog | |||
| @@ -1,3 +1,8 @@ | |||
| 1 | 2013-12-29 Paul Eggert <eggert@cs.ucla.edu> | ||
| 2 | |||
| 3 | Plain copy-file no longer chmods an existing destination (Bug#16133). | ||
| 4 | * NEWS: Document this. | ||
| 5 | |||
| 1 | 2013-12-26 João Távora <joaotavora@gmail.com> | 6 | 2013-12-26 João Távora <joaotavora@gmail.com> |
| 2 | 7 | ||
| 3 | * NEWS: Describe new features of Electric Pair mode. | 8 | * NEWS: Describe new features of Electric Pair mode. |
| @@ -952,6 +952,12 @@ alist of extended attributes as returned by the new function | |||
| 952 | `file-extended-attributes'. The attributes can be applied to another | 952 | `file-extended-attributes'. The attributes can be applied to another |
| 953 | file using `set-file-extended-attributes'. | 953 | file using `set-file-extended-attributes'. |
| 954 | 954 | ||
| 955 | ** By default `copy-file' no longer copies file permission bits to an | ||
| 956 | existing destination; and it sets the file permission bits of a newly | ||
| 957 | created destination to those of the source, masked by the default file | ||
| 958 | permissions. To copy the file permission bits, pass t as the | ||
| 959 | PRESERVE-PERMISSIONS argument of `copy-file'. | ||
| 960 | |||
| 955 | +++ | 961 | +++ |
| 956 | ** `visited-file-modtime' now returns -1 for nonexistent files. | 962 | ** `visited-file-modtime' now returns -1 for nonexistent files. |
| 957 | Formerly it returned a list (-1 LOW USEC PSEC), but this was ambiguous | 963 | Formerly it returned a list (-1 LOW USEC PSEC), but this was ambiguous |
| @@ -1100,8 +1106,8 @@ platforms, and nobody seems to have noticed or cared. | |||
| 1100 | 1106 | ||
| 1101 | +++ | 1107 | +++ |
| 1102 | *** The 6th argument to `copy-file' has been renamed to | 1108 | *** The 6th argument to `copy-file' has been renamed to |
| 1103 | PRESERVE-EXTENDED-ATTRIBUTES as it now handles both SELinux context | 1109 | PRESERVE-PERMISSIONS as it now handles ACL entries and the traditional |
| 1104 | and ACL entries. | 1110 | Unix file permission bits as well as SELinux context. |
| 1105 | 1111 | ||
| 1106 | +++ | 1112 | +++ |
| 1107 | *** The function `file-ownership-preserved-p' now has an optional | 1113 | *** The function `file-ownership-preserved-p' now has an optional |