unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Philipp Stephani <p.stephani2@gmail.com>
To: Aaron Jensen <aaronjensen@gmail.com>, 28483@debbugs.gnu.org
Subject: bug#28483: [PATCH] Fix copy-directory creating missing directory
Date: Sun, 17 Sep 2017 19:48:44 +0000	[thread overview]
Message-ID: <CAArVCkSkoZGzH5L-62Xc=svkffiqdXwovDgZLcT4EgiXSLVuMw@mail.gmail.com> (raw)
In-Reply-To: <CAHyO48zat6An2BbvCN-8KzUvCh9XzgjQuBEnRRUFhLKx7hX_NA@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 1074 bytes --]

Aaron Jensen <aaronjensen@gmail.com> schrieb am So., 17. Sep. 2017 um
21:16 Uhr:

> * lisp/files.el (copy-directory): Use file-directory-p instead of
> directory-name-p.
> ---
>  lisp/files.el | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/lisp/files.el b/lisp/files.el
> index c55c8097c1..b3a55af976 100644
> --- a/lisp/files.el
> +++ b/lisp/files.el
> @@ -5540,7 +5540,7 @@ copy-directory
>        (setq directory (directory-file-name (expand-file-name directory))
>             newname (expand-file-name newname))
>
> -      (cond ((not (directory-name-p newname))
> +      (cond ((not (file-directory-p newname))
>              ;; If NEWNAME is not a directory name, create it;
>              ;; that is where we will copy the files of DIRECTORY.
>              (make-directory newname parents))
>

This would reintroduce the security hole that
e22794867d878d53675fcc91d2ef1ad2494a2ff2 fixed.

Paul, maybe you want to add some comments to the places where you
introduced `directory-name-p' so that people don't attempt to revert these
changes?

[-- Attachment #2: Type: text/html, Size: 1489 bytes --]

  reply	other threads:[~2017-09-17 19:48 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-09-17 19:10 bug#28483: 26.0.50; copy-directory does not create directories Aaron Jensen
2017-09-17 19:15 ` bug#28483: [PATCH] Fix copy-directory creating missing directory Aaron Jensen
2017-09-17 19:48   ` Philipp Stephani [this message]
2017-09-17 20:19     ` Aaron Jensen
2017-09-18 17:40       ` Philipp Stephani
2017-09-17 19:20 ` bug#28483: 26.0.50; copy-directory does not create directories Aaron Jensen
2017-09-17 20:40   ` Paul Eggert
2017-09-17 23:12     ` Aaron Jensen
2017-09-17 23:52       ` Paul Eggert
2017-09-20 11:26     ` Eli Zaretskii
2017-09-20 18:59       ` bug#28520: " Paul Eggert
2017-09-20 19:54         ` Eli Zaretskii
2017-09-20 23:04           ` Adam Plaice

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAArVCkSkoZGzH5L-62Xc=svkffiqdXwovDgZLcT4EgiXSLVuMw@mail.gmail.com' \
    --to=p.stephani2@gmail.com \
    --cc=28483@debbugs.gnu.org \
    --cc=aaronjensen@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).