aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorGlenn Morris2014-04-10 23:43:20 -0700
committerGlenn Morris2014-04-10 23:43:20 -0700
commit536aa4668198bf4851356a8e3a57b7f8969014c3 (patch)
tree5d5a5854c8c615334262036975ab0c755cc93ac6 /src
parentc99ce7d8fa9f4af7ece6439c568987e5e7d82681 (diff)
parent9b1ac3be88fab32c29c1bd53a8d5eedd81a49cad (diff)
downloademacs-536aa4668198bf4851356a8e3a57b7f8969014c3.tar.gz
emacs-536aa4668198bf4851356a8e3a57b7f8969014c3.zip
Merge from emacs-24; up to 2014-04-04T23:31:02Z!joaotavora@gmail.com
Diffstat (limited to 'src')
-rw-r--r--src/ChangeLog8
-rw-r--r--src/Makefile.in2
-rw-r--r--src/keyboard.c13
3 files changed, 21 insertions, 2 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index 69bfc4ca074..927b0010347 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,11 @@
12014-04-11 Glenn Morris <rgm@gnu.org>
2
3 * keyboard.c (Fopen_dribble_file): Make file private. (Bug#17187)
4
52014-04-11 Ken Brown <kbrown@cornell.edu>
6
7 * Makefile.in (EMACS_MANIFEST): Revert last change.
8
12014-04-10 Daniel Colascione <dancol@dancol.org> 92014-04-10 Daniel Colascione <dancol@dancol.org>
2 10
3 * puresize.h (BASE_PURESIZE): Increase. 11 * puresize.h (BASE_PURESIZE): Increase.
diff --git a/src/Makefile.in b/src/Makefile.in
index 7e71d030279..388923596c9 100644
--- a/src/Makefile.in
+++ b/src/Makefile.in
@@ -259,7 +259,7 @@ W32_LIBS=@W32_LIBS@
259 259
260## emacs.res if HAVE_W32 260## emacs.res if HAVE_W32
261EMACSRES = @EMACSRES@ 261EMACSRES = @EMACSRES@
262## emacs-*.manifest if WINDOWSNT 262## emacs-*.manifest if HAVE_W32
263EMACS_MANIFEST = @EMACS_MANIFEST@ 263EMACS_MANIFEST = @EMACS_MANIFEST@
264## If HAVE_W32, compiler arguments for including 264## If HAVE_W32, compiler arguments for including
265## the resource file in the binary. 265## the resource file in the binary.
diff --git a/src/keyboard.c b/src/keyboard.c
index cdd48c340e5..ddfbc9a567b 100644
--- a/src/keyboard.c
+++ b/src/keyboard.c
@@ -20,6 +20,7 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
20#include <config.h> 20#include <config.h>
21 21
22#include "sysstdio.h" 22#include "sysstdio.h"
23#include <sys/stat.h>
23 24
24#include "lisp.h" 25#include "lisp.h"
25#include "termchar.h" 26#include "termchar.h"
@@ -10082,8 +10083,18 @@ This may include sensitive information such as passwords. */)
10082 } 10083 }
10083 if (!NILP (file)) 10084 if (!NILP (file))
10084 { 10085 {
10086 int fd;
10085 file = Fexpand_file_name (file, Qnil); 10087 file = Fexpand_file_name (file, Qnil);
10086 dribble = emacs_fopen (SSDATA (file), "w"); 10088 /* This isn't robust, since eg file could be created after we
10089 check whether it exists but before emacs_open.
10090 Feel free to improve it, but this is not critical. (Bug#17187) */
10091 if (! NILP (Ffile_exists_p (file)))
10092 {
10093 if (chmod (SSDATA (file), 0600) < 0)
10094 report_file_error ("Doing chmod", file);
10095 }
10096 fd = emacs_open (SSDATA (file), O_WRONLY | O_CREAT | O_TRUNC, 0600);
10097 dribble = fd < 0 ? 0 : fdopen (fd, "w");
10087 if (dribble == 0) 10098 if (dribble == 0)
10088 report_file_error ("Opening dribble", file); 10099 report_file_error ("Opening dribble", file);
10089 } 10100 }