electron/atom/common
Juan Cruz Viotti 585ff9062c 🐛 Fix missing execution permission bit in execFile override
Consider an electron application that uses `execFile` to run a script
that lives within the application code base:

```coffee
child_process = require 'child_process'
child_process.execFile __dirname + '/script.sh', (error) ->
  throw error if error?
```

An application like this will fail when being packaged in an `asar` with
an following error:

```
Error: spawn EACCES
```

Electron overrides certain `fs` functions to make them work within an
`asar` package. In the case of `execFile`, the file to be executed is
extracted from the `asar` package into a temporary file and ran from
there.

The problem is that during the extraction, the original permissions of
the file are lost.

We workaround this by:

1. Extending `asar.stat` to return whether a file is executable or not,
  which is information that's already saved in the `asar` header.

2. Setting execution permissions on the extracted file if the above
  property holds true.

Fixes: https://github.com/atom/electron/issues/3512
2015-11-26 23:30:23 -04:00
..
api 🐛 Fix missing execution permission bit in execFile override 2015-11-26 23:30:23 -04:00
asar 🐛 Fix missing execution permission bit in execFile override 2015-11-26 23:30:23 -04:00
crash_reporter win: Guard against failure of RtlAddFunctionTable 2015-11-05 22:00:40 +08:00
lib 🐛 Fix missing execution permission bit in execFile override 2015-11-26 23:30:23 -04:00
linux Rename hard-coded application names in code 2015-04-14 15:55:41 +08:00
native_mate_converters Merge pull request #3344 from deepak1556/certificate_verifier_api_patch 2015-11-17 18:53:35 +08:00
resources/mac mac: Set CFBundleExecutable for Electron Framework 2015-10-14 11:54:59 +08:00
atom_command_line.cc Move headers to atom/common 2015-06-19 23:11:53 +08:00
atom_command_line.h Move headers to atom/common 2015-06-19 23:11:53 +08:00
atom_version.h Bump v0.35.1 2015-11-20 13:36:59 +08:00
chrome_version.h Upgrade to Chrome 45 2015-09-03 17:50:23 +09:00
common_message_generator.cc Remove All Rights Reserved after GitHub copyright 2014-10-31 11:17:05 -07:00
common_message_generator.h Remove All Rights Reserved after GitHub copyright 2014-10-31 11:17:05 -07:00
draggable_region.cc Switch to use MIT license. 2014-05-04 20:29:08 +08:00
draggable_region.h Fix ui/gfx/geometry headers 2015-03-18 09:57:38 +08:00
google_api_key.h Remove All Rights Reserved after GitHub copyright 2014-10-31 11:17:05 -07:00
id_weak_map.cc use webcontents id to identify callbacks 2015-10-30 19:51:19 +05:30
id_weak_map.h use webcontents id to identify callbacks 2015-10-30 19:51:19 +05:30
keyboad_util.cc Merging keyCode and keyIdentifier and adjusting the docs accordingly 2015-11-16 14:51:26 +01:00
keyboad_util.h Merging keyCode and keyIdentifier and adjusting the docs accordingly 2015-11-16 14:51:26 +01:00
node_bindings.cc win: Add ELECTRON_DEFAULT_ERROR_MODE env 2015-11-06 20:25:20 +08:00
node_bindings.h Remove some unused virtual functions 2015-01-23 21:05:32 -08:00
node_bindings_linux.cc Remove All Rights Reserved after GitHub copyright 2014-10-31 11:17:05 -07:00
node_bindings_linux.h Remove some unused virtual functions 2015-01-23 21:05:32 -08:00
node_bindings_mac.cc Remove All Rights Reserved after GitHub copyright 2014-10-31 11:17:05 -07:00
node_bindings_mac.h Remove some unused virtual functions 2015-01-23 21:05:32 -08:00
node_bindings_win.cc Fix for issue 1968: use uv_backend_timeout to determine timeout to match other platforms 2015-08-20 20:13:04 -06:00
node_bindings_win.h Remove some unused virtual functions 2015-01-23 21:05:32 -08:00
node_includes.h No longer needs to define node_includes.h at last 2015-09-07 16:41:49 +08:00
options_switches.cc Replace "Url" in API names with "URL" 2015-11-13 16:03:40 +08:00
options_switches.h Replace "Url" in API names with "URL" 2015-11-13 16:03:40 +08:00
platform_util.h return bool on shell.openExternal 2015-06-10 11:06:22 -04:00
platform_util_linux.cc return bool on shell.openExternal 2015-06-10 11:06:22 -04:00
platform_util_mac.mm NSWorkspace selectFile:inFileViewerRootedAtPath: requires a non-null second argument. 2015-10-08 11:25:05 -07:00
platform_util_win.cc Replace "Url" in API names with "URL" 2015-11-13 16:03:40 +08:00