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 /doc | |
| 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 'doc')
| -rw-r--r-- | doc/lispref/ChangeLog | 5 | ||||
| -rw-r--r-- | doc/lispref/files.texi | 11 |
2 files changed, 10 insertions, 6 deletions
diff --git a/doc/lispref/ChangeLog b/doc/lispref/ChangeLog index 2ebab695514..3de4ae598fe 100644 --- a/doc/lispref/ChangeLog +++ b/doc/lispref/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 | * files.texi (Changing Files): Document this. | ||
| 5 | |||
| 1 | 2013-12-28 Chong Yidong <cyd@gnu.org> | 6 | 2013-12-28 Chong Yidong <cyd@gnu.org> |
| 2 | 7 | ||
| 3 | * modes.texi (Auto Major Mode): Document interpreter-mode-alist | 8 | * modes.texi (Auto Major Mode): Document interpreter-mode-alist |
diff --git a/doc/lispref/files.texi b/doc/lispref/files.texi index c1eae5eefa3..01eef350ddf 100644 --- a/doc/lispref/files.texi +++ b/doc/lispref/files.texi | |||
| @@ -1563,8 +1563,6 @@ some operating systems.) If setting the time gets an error, | |||
| 1563 | interactive call, a prefix argument specifies a non-@code{nil} value | 1563 | interactive call, a prefix argument specifies a non-@code{nil} value |
| 1564 | for @var{time}. | 1564 | for @var{time}. |
| 1565 | 1565 | ||
| 1566 | This function copies the file modes, too. | ||
| 1567 | |||
| 1568 | If argument @var{preserve-uid-gid} is @code{nil}, we let the operating | 1566 | If argument @var{preserve-uid-gid} is @code{nil}, we let the operating |
| 1569 | system decide the user and group ownership of the new file (this is | 1567 | system decide the user and group ownership of the new file (this is |
| 1570 | usually set to the user running Emacs). If @var{preserve-uid-gid} is | 1568 | usually set to the user running Emacs). If @var{preserve-uid-gid} is |
| @@ -1572,10 +1570,11 @@ non-@code{nil}, we attempt to copy the user and group ownership of the | |||
| 1572 | file. This works only on some operating systems, and only if you have | 1570 | file. This works only on some operating systems, and only if you have |
| 1573 | the correct permissions to do so. | 1571 | the correct permissions to do so. |
| 1574 | 1572 | ||
| 1575 | If the optional argument @var{preserve-extended-attributes} is | 1573 | If the optional argument @var{preserve-permissions} is non-@code{nil}, |
| 1576 | non-@code{nil}, and Emacs has been built with the appropriate support, | 1574 | this function copies the file's permissions, such as its file modes, |
| 1577 | this function attempts to copy the file's extended attributes, such as | 1575 | its SELinux context, and ACL entries (@pxref{File Attributes}). |
| 1578 | its SELinux context and ACL entries (@pxref{File Attributes}). | 1576 | Otherwise, if the destination is created its file permission bits are |
| 1577 | those of the source, masked by the default file permissions. | ||
| 1579 | @end deffn | 1578 | @end deffn |
| 1580 | 1579 | ||
| 1581 | @deffn Command make-symbolic-link filename newname &optional ok-if-exists | 1580 | @deffn Command make-symbolic-link filename newname &optional ok-if-exists |