mirror of
git://git.sv.gnu.org/emacs.git
synced 2026-03-09 08:21:30 -07:00
This avoids some race conditions (Bug#39683). E.g., if some other program changes a file to a symlink between the time Emacs creates the file and the time it changes the file’s permissions, using the new flag prevents Emacs from inadvertently changing the permissions of a victim in some completely unrelated directory. * admin/merge-gnulib (GNULIB_MODULES): Add fchmodat. * doc/lispref/files.texi (Testing Accessibility, Changing Files): * doc/lispref/os.texi (File Notifications): * etc/NEWS: Adjust documentation accordingly. * lib/chmodat.c, lib/fchmodat.c, lib/lchmod.c, m4/fchmodat.m4: * m4/lchmod.m4: New files, copied from Gnulib. * lib/gnulib.mk.in: Regenerate. * lisp/dired-aux.el (dired-do-chmod): * lisp/doc-view.el (doc-view-make-safe-dir): * lisp/emacs-lisp/autoload.el (autoload--save-buffer): * lisp/emacs-lisp/bytecomp.el (byte-compile-file): * lisp/eshell/em-pred.el (eshell-pred-file-mode): * lisp/files.el (backup-buffer-copy, copy-directory): * lisp/gnus/mail-source.el (mail-source-movemail): * lisp/gnus/mm-decode.el (mm-display-external): * lisp/gnus/nnmail.el (nnmail-write-region): * lisp/net/tramp-adb.el (tramp-adb-handle-file-local-copy) (tramp-adb-handle-write-region): * lisp/net/tramp-sh.el (tramp-do-copy-or-rename-file-directly): * lisp/net/tramp-sudoedit.el (tramp-sudoedit-handle-write-region): * lisp/net/tramp.el (tramp-handle-write-region) (tramp-make-tramp-temp-file): * lisp/server.el (server-ensure-safe-dir): * lisp/url/url-util.el (url-make-private-file): When getting or setting file modes, avoid following symbolic links when the file is not supposed to be a symbolic link. * lisp/doc-view.el (doc-view-make-safe-dir): Omit no-longer-needed separate symlink test. * lisp/gnus/gnus-util.el (gnus-set-file-modes): * lisp/net/tramp.el (tramp-handle-file-modes): * lisp/net/tramp-gvfs.el (tramp-gvfs-handle-set-file-modes): * src/fileio.c (symlink_nofollow_flag): New function. (Ffile_modes, Fset_file_modes): Support an optional FLAG arg. All C callers changed. * lisp/net/ange-ftp.el (ange-ftp-set-file-modes): * lisp/net/tramp-adb.el (tramp-adb-handle-set-file-modes): * lisp/net/tramp-sh.el (tramp-sh-handle-set-file-modes): * lisp/net/tramp-smb.el (tramp-smb-handle-set-file-modes): * lisp/net/tramp-sudoedit.el (tramp-sudoedit-handle-set-file-modes): Accept an optional FLAG arg that is currently ignored, and add a FIXME comment for it. * m4/gnulib-comp.m4: Regenerate. |
||
|---|---|---|
| .. | ||
| 00gnulib.m4 | ||
| __inline.m4 | ||
| absolute-header.m4 | ||
| acl.m4 | ||
| alloca.m4 | ||
| builtin-expect.m4 | ||
| byteswap.m4 | ||
| canonicalize.m4 | ||
| clock_time.m4 | ||
| close-stream.m4 | ||
| copy-file-range.m4 | ||
| d-type.m4 | ||
| dirent_h.m4 | ||
| dirfd.m4 | ||
| double-slash-root.m4 | ||
| dup2.m4 | ||
| eealloc.m4 | ||
| environ.m4 | ||
| errno_h.m4 | ||
| euidaccess.m4 | ||
| execinfo.m4 | ||
| explicit_bzero.m4 | ||
| extensions.m4 | ||
| extern-inline.m4 | ||
| faccessat.m4 | ||
| fchmodat.m4 | ||
| fcntl.m4 | ||
| fcntl_h.m4 | ||
| fdopendir.m4 | ||
| filemode.m4 | ||
| flexmember.m4 | ||
| fpending.m4 | ||
| fpieee.m4 | ||
| fstatat.m4 | ||
| fsusage.m4 | ||
| fsync.m4 | ||
| getdtablesize.m4 | ||
| getgroups.m4 | ||
| getloadavg.m4 | ||
| getopt.m4 | ||
| gettime.m4 | ||
| gettimeofday.m4 | ||
| glibc21.m4 | ||
| gnulib-common.m4 | ||
| gnulib-comp.m4 | ||
| group-member.m4 | ||
| ieee754-h.m4 | ||
| include_next.m4 | ||
| inttypes.m4 | ||
| largefile.m4 | ||
| lchmod.m4 | ||
| limits-h.m4 | ||
| localtime-buffer.m4 | ||
| lstat.m4 | ||
| malloca.m4 | ||
| manywarnings.m4 | ||
| mbstate_t.m4 | ||
| md5.m4 | ||
| memmem.m4 | ||
| mempcpy.m4 | ||
| memrchr.m4 | ||
| minmax.m4 | ||
| mkostemp.m4 | ||
| mktime.m4 | ||
| mode_t.m4 | ||
| multiarch.m4 | ||
| nocrash.m4 | ||
| nstrftime.m4 | ||
| off_t.m4 | ||
| open-cloexec.m4 | ||
| open-slash.m4 | ||
| open.m4 | ||
| pathmax.m4 | ||
| pipe2.m4 | ||
| pkg.m4 | ||
| pselect.m4 | ||
| pthread_sigmask.m4 | ||
| readlink.m4 | ||
| readlinkat.m4 | ||
| regex.m4 | ||
| sha1.m4 | ||
| sha256.m4 | ||
| sha512.m4 | ||
| sig2str.m4 | ||
| signal_h.m4 | ||
| socklen.m4 | ||
| ssize_t.m4 | ||
| st_dm_mode.m4 | ||
| stat-time.m4 | ||
| std-gnu11.m4 | ||
| stdalign.m4 | ||
| stddef_h.m4 | ||
| stdint.m4 | ||
| stdio_h.m4 | ||
| stdlib_h.m4 | ||
| stpcpy.m4 | ||
| string_h.m4 | ||
| strnlen.m4 | ||
| strtoimax.m4 | ||
| strtoll.m4 | ||
| symlink.m4 | ||
| sys_select_h.m4 | ||
| sys_socket_h.m4 | ||
| sys_stat_h.m4 | ||
| sys_time_h.m4 | ||
| sys_types_h.m4 | ||
| tempname.m4 | ||
| time_h.m4 | ||
| time_r.m4 | ||
| time_rz.m4 | ||
| timegm.m4 | ||
| timer_time.m4 | ||
| timespec.m4 | ||
| tm_gmtoff.m4 | ||
| unistd_h.m4 | ||
| unlocked-io.m4 | ||
| utimens.m4 | ||
| utimes.m4 | ||
| vararrays.m4 | ||
| warnings.m4 | ||
| wchar_t.m4 | ||
| zzgnulib.m4 | ||