]> code.delx.au - gnu-emacs/blobdiff - src/unexelf.c
Update copyright year to 2015
[gnu-emacs] / src / unexelf.c
index 94c9c02f70d10b5ecbd754d4ff5af35990c16aa3..483da6eef0c57214f59ccb88fdda44736ca7d623 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (C) 1985-1988, 1990, 1992, 1999-2013 Free Software
+/* Copyright (C) 1985-1988, 1990, 1992, 1999-2015 Free Software
    Foundation, Inc.
 
 This file is part of GNU Emacs.
@@ -665,7 +665,6 @@ unexec (const char *new_name, const char *old_name)
 #endif
   struct stat stat_buf;
   off_t old_file_size;
-  int mask;
 
   /* Open the old file, allocate a buffer of the right size, and read
      in the file contents.  */
@@ -799,7 +798,7 @@ unexec (const char *new_name, const char *old_name)
      the image of the new file.  Set pointers to various interesting
      objects.  */
 
-  new_file = emacs_open (new_name, O_RDWR | O_CREAT, 0666);
+  new_file = emacs_open (new_name, O_RDWR | O_CREAT, 0777);
   if (new_file < 0)
     fatal ("Can't creat (%s): %s", new_name, strerror (errno));
 
@@ -1319,13 +1318,4 @@ temacs:
 
   if (emacs_close (new_file) != 0)
     fatal ("Can't close (%s): %s", new_name, strerror (errno));
-
-  if (stat (new_name, &stat_buf) != 0)
-    fatal ("Can't stat (%s): %s", new_name, strerror (errno));
-
-  mask = umask (777);
-  umask (mask);
-  stat_buf.st_mode |= 0111 & ~mask;
-  if (chmod (new_name, stat_buf.st_mode) != 0)
-    fatal ("Can't chmod (%s): %s", new_name, strerror (errno));
 }