Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date: Wed, 01 Nov 2017 22:35:59 +0100
From: Florent Rougon <>
Subject: Re: Re: Fw: Security risk of vim swap files

Michael Orlitzky <> wrote:

> This is what I used to do in emacs before I disabled the backups
> completely. I was wondering if there were any problems with it. If there
> aren't, it seems like a better default to me, for both emacs and vim.

On Emacs, this has been possible for a loooong time, and in a way that
prevents collisions due to the same basename:

  (setq backup-directory-alist '(("." . "/some/path")))

This saves backup files in /some/path with names such as

It's also possible to programmatically disable the backup feature for
specific files:

  ;; For `some',
  ;; cf. <>.
  (require 'cl)
  (defun my-backup-enable-predicate (fullpath)
    (and (not (some #'(lambda (file)
                         (string-equal fullpath (expand-file-name file)))
         (normal-backup-enable-predicate fullpath)))

  (setq backup-enable-predicate 'my-backup-enable-predicate)

Finally, an easier but non-programmatic solution when you can afford to
write comments directly to the file: use “file variables”, e.g., with
this at the beginning of the file you want to never be backed up:

-*- make-backup-files: nil -*-



Powered by blists - more mailing lists

Please check out the Open Source Software Security Wiki, which is counterpart to this mailing list.

Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.