aboutsummaryrefslogtreecommitdiffstats
path: root/doc
diff options
context:
space:
mode:
authorPaul Eggert2013-12-29 10:18:45 -0800
committerPaul Eggert2013-12-29 10:18:45 -0800
commita560b856b15f57889eb10be984130c285e2cb43d (patch)
treef422337dcce0c3b4115aff096c35708ea7e587de /doc
parent830506d93af4c75edc487016c1711941e96faa04 (diff)
downloademacs-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/ChangeLog5
-rw-r--r--doc/lispref/files.texi11
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 @@
12013-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
12013-12-28 Chong Yidong <cyd@gnu.org> 62013-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,
1563interactive call, a prefix argument specifies a non-@code{nil} value 1563interactive call, a prefix argument specifies a non-@code{nil} value
1564for @var{time}. 1564for @var{time}.
1565 1565
1566This function copies the file modes, too.
1567
1568If argument @var{preserve-uid-gid} is @code{nil}, we let the operating 1566If argument @var{preserve-uid-gid} is @code{nil}, we let the operating
1569system decide the user and group ownership of the new file (this is 1567system decide the user and group ownership of the new file (this is
1570usually set to the user running Emacs). If @var{preserve-uid-gid} is 1568usually 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
1572file. This works only on some operating systems, and only if you have 1570file. This works only on some operating systems, and only if you have
1573the correct permissions to do so. 1571the correct permissions to do so.
1574 1572
1575If the optional argument @var{preserve-extended-attributes} is 1573If the optional argument @var{preserve-permissions} is non-@code{nil},
1576non-@code{nil}, and Emacs has been built with the appropriate support, 1574this function copies the file's permissions, such as its file modes,
1577this function attempts to copy the file's extended attributes, such as 1575its SELinux context, and ACL entries (@pxref{File Attributes}).
1578its SELinux context and ACL entries (@pxref{File Attributes}). 1576Otherwise, if the destination is created its file permission bits are
1577those 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