Commit Graph

98 Commits

Author SHA1 Message Date
Genevieve Helsel
c8402345af redirect PrivHelper stdin to /dev/null to fully daemonize
Summary: EdenFS doesnt daemonize correctly due to the privhelper not closing fd 0 (see http://www.faqs.org/faqs/unix-faq/programmer/faq/). This redirects stdin to /dev/null/ in order to do so.

Reviewed By: xavierd

Differential Revision: D21602545

fbshipit-source-id: 0aeb589efbf214ef22c0db039fbb6a436a71e360
2020-05-18 10:11:18 -07:00
Adam Simpkins
129d87fe23 use the normal PrivHelper.h header file on Windows
Summary:
While EdenFS does not use a separate privhelper process on Windows, it still
defines a stub PrivHelper class.  However, this class was previously defined
in a separate win/utils/Stub.h header file, which led to awkward `#ifdef`s to
include the correct platform-specific header file.

This diff moves the definition of the dummy PrivHelper class in Windows into
the same `PrivHelper.h` header file used on POSIX platforms.  This results in
a few more `ifdef`s in the PrivHelper files, but fewer `ifdef`s in the calling
code, and will make it easier to start unifying more of the `EdenMain` logic
on Windows and non-Windows platforms.

Reviewed By: xavierd

Differential Revision: D21332568

fbshipit-source-id: c63bf2b4a8b7e767d7db7dcda28675f735c23bf8
2020-05-01 14:01:40 -07:00
Adam Simpkins
c55781c666 move UserInfo to eden/fs/utils/
Summary:
Move the `UserInfo` code from `fuse/privhelper` to `utils`, and also unify the
POSIX and Windows implementations of this class.

This code was originally put in the `fuse/privhelper` directory since it was
written at the same time as the privhelper.  However, it's really a
lower-level library that doesn't depend on FUSE or any of the other code in
the `fuse/` subdirectory.

Reviewed By: wez

Differential Revision: D21296594

fbshipit-source-id: f58682f6ce86bba0328472c491bb4c0dc3370319
2020-04-29 17:21:12 -07:00
Adam Simpkins
2f114e25e7 build the fuse privhelper unit tests in CMake-based builds
Summary:
Build and run the fuse privhelper unit tests, as well as the `drop_privs`
helper program used by some of the integration tests.

Reviewed By: wez

Differential Revision: D21004425

fbshipit-source-id: 650e0729909f4753095e19fba4f01c02d516713b
2020-04-21 17:33:31 -07:00
Adam Simpkins
248d717b30 fix dependencies on CoreFoundation & IOKit on Mac OS
Summary:
The `eden_fuse_privhelper` library depends on CoreFoundation and IOKit.
Previously this dependency was specified for the `eden_service` library, which
doesn't use these frameworks directly, only indirectly through the
`eden_fuse_privhelper` library.

The fact that `eden_fuse_privhelper` was missing this dependency causes
problems when trying to build unit tests and tools that depend on
`eden_fuse_privhelper` without using the `eden_service` library.

Reviewed By: genevievehelsel

Differential Revision: D21057925

fbshipit-source-id: b846ebde0de158b70be462067c4412a655ad8036
2020-04-20 19:29:07 -07:00
Chad Austin
db73eb37fd make deleted default constructors explicit
Summary:
Some of our types were vulnerable to the issue described in
http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2018/p1008r0.pdf so
make all deleted default constructors explicit.

Reviewed By: simpkins

Differential Revision: D21008976

fbshipit-source-id: 5b21923f25121dabf4bb0ea55f94536fb3532e6b
2020-04-14 12:47:03 -07:00
Adam Simpkins
34275429fe remove all CLI code dealing with the old legacy bind-mounts config
Summary:
The bind-mounts configuration has been ignored by EdenFS since D17236366.
This removes all CLI code for dealing with this config section.

Reviewed By: wez

Differential Revision: D20876460

fbshipit-source-id: 6b3f3552de25ee28fc0418a6aaec14446520203c
2020-04-09 17:31:03 -07:00
Chad Austin
e9c0426e53 add read-only support on macOS
Summary:
Plumb the read-only mount flag into FUSE on macOS. This fixes a build
warning and enables the --read-only mount flag.

Reviewed By: wez

Differential Revision: D20634119

fbshipit-source-id: a5e68cd163e36ceb6d86fd753844718ee9a5727f
2020-03-24 18:58:29 -07:00
Ratnadeep Joshi
8e4b04107c Add an option to mount a checkout read-only
Summary: Added option to mount command

Reviewed By: chadaustin

Differential Revision: D20256352

fbshipit-source-id: e52fbd10f318221777b7e2d21ed9ba0a17ce1687
2020-03-11 21:38:48 -07:00
Lee Howes
f15fdeec84 collectX to collectUnsafe
Summary:
Migration from Future-returning executor-erasing collectX forms to
SemiFuture-returning forms, that are less risky in particular with coroutines.

Earlier diffs added SemiFuture and Unsafe versions. This codemod migrates
collect versions to the Unsafe versions to allow the basic collect versions to
be made safe.

Reviewed By: simpkins

Differential Revision: D20331206

fbshipit-source-id: efc8dff487d45f7d53ee55e8c4696bd3eed0e6da
2020-03-10 11:36:09 -07:00
Adam Simpkins
3d18d04475 change the process name for the privhelper to "edenfs_privhelp"
Summary:
Call `folly::setThreadName()` in the privhelper process when it starts.  This
changes the command name reported in `/proc/PID/comm` and in `ps`

The process name is limited to 15 bytes, so this shows up as `edenfs_privhelp`

Reviewed By: fanzeyi

Differential Revision: D20199409

fbshipit-source-id: a5349bfab9230174aaa99c87f0db73fe31659186
2020-03-02 15:35:21 -08:00
Chad Austin
e092f4ef1a fix warnings in the macOS build
Summary: Fix some warnings that only show up in the macOS build.

Reviewed By: fanzeyi

Differential Revision: D19053236

fbshipit-source-id: 81f7187b263e0db6a57582677088519f9b97f1d7
2019-12-20 16:14:17 -08:00
Chad Austin
cfaea9c9d0 warn on unused exception parameter
Summary:
The Windows build spews a great many warnings. Address some of them by
enabling the unused-exception-parameter warning on Clang/Linux too.

Reviewed By: yfeldblum

Differential Revision: D18178930

fbshipit-source-id: efecb605b84d4f06c8c8411a23d17904bbdff746
2019-10-28 17:49:23 -07:00
Chad Austin
8cac2bfe6a Remove dead includes in eden
Reviewed By: wez

Differential Revision: D17877514

fbshipit-source-id: e7f8ed8364bdb7a77f293cbdf4b48e8f15e64c30
2019-10-11 16:45:01 -07:00
Andres Suarez
fbdb46f5cb Tidy up license headers
Reviewed By: chadaustin

Differential Revision: D17872966

fbshipit-source-id: cd60a364a2146f0dadbeca693b1d4a5d7c97ff63
2019-10-11 05:28:23 -07:00
Wez Furlong
d58a3c96d8 eden: remove legacy bind mount code
Summary:
This diff removes the logic that consumes the legacy bind
mount list and mounts them on startup.  That functionality has been
replaced with the eden redirect command.

Instead of performing the bind mounts in the server, the server will
now run `eden redirect fixup` to apply that configuration.

This diff also changes the behavior of performBindMounts: previously, if the
bind mount setup failed, we would tear down the entire repo mount.  Since we're
now spawning an external process, it is much more likely that something might
fail and result in a bad experience, so we no longer bail out in that case:
we'll continue and leave the bind mounts as-is.  The user can then use `eden
doctor` or `eden redirect fixup` to sort things out.

Reviewed By: simpkins

Differential Revision: D17236366

fbshipit-source-id: 8b004551a076216f0e5448942f00b5195ee18803
2019-09-30 18:57:14 -07:00
Wez Furlong
b66f033f79 eden: allow for 10.15 as well as 10.15.0 in macOS kernel version string
Summary:
The Catalina beta reports `10.15` and we were throwing an
exception when we didn't match three version number components.

Allow for 2 or more components to match when scanning the string.

Reviewed By: fanzeyi

Differential Revision: D17490838

fbshipit-source-id: 240513f21c0f57e629a300a35a815e7a572e93ff
2019-09-19 16:43:31 -07:00
Wez Furlong
3dc580b35e eden: thread configuration through to fuse timeout handling
Summary:
This diff adds a fuse request timeout configuration setting
and threads it through to both the FuseChannel for our internal processing
and to the privhelper so that we can set an appropriate (slightly larger)
value for the kernel level daemon_timeout setting.

Reviewed By: chadaustin

Differential Revision: D16957552

fbshipit-source-id: a0fecc691d72914b5aebaed8a006dc0d6b0d7d12
2019-08-28 09:41:54 -07:00
Wez Furlong
f5d9a06dc9 eden: add thrift calls for adding/removing bind mounts
Summary:
These allow the cli to setup and tear down mounts and
have the eden server keep track of them.

Reviewed By: strager

Differential Revision: D15707318

fbshipit-source-id: abdb8eaa28c8c67c8211a8af1647efe3a083e998
2019-06-25 18:42:37 -07:00
Puneet Kaushik
452fbb6f58 Add --edenDir and other command line arguments support to Edenfs on Windows
Summary: We need --edenDir support to run muliple instance of Edenfs, which is required to run the integration tests.

Reviewed By: simpkins

Differential Revision: D15951483

fbshipit-source-id: a516159cdeb5f046f795fc28399a2af5fe8a9f95
2019-06-25 14:16:11 -07:00
Adam Simpkins
73509a87f8 restore the $USER environment variable when dropping privileges
Summary:
If edenfs was started using `sudo`, the `$USER` environment variable will be
set to `root` rather than the actual user.  When we drop privileges make sure
we restore the value of `$USER` as well.

The `$USER` variable isn't checked anywhere else in edenfs itself, but it
matters for subprocesses we spawn, like `hg debugedenimporthelper`.

I also changed the code to clear the `SUDO_*` variables as well, mostly
just for good measure.

Reviewed By: kulshrax

Differential Revision: D15929539

fbshipit-source-id: e022c7ae762e2a5e86d0227058bb476aff17cf55
2019-06-20 21:01:36 -07:00
Adam Simpkins
4bc8682391 update license headers in CMake files
Summary:
Update the copyright & license headers in CMake files to reflect the
relicensing to GPLv2

Reviewed By: wez

Differential Revision: D15487079

fbshipit-source-id: 715e559464c19a0070d6e55a095b3fc7d61ad2f8
2019-06-19 17:02:46 -07:00
Adam Simpkins
aa5e6c7295 update license headers in C++ files
Summary:
Update the copyright & license headers in C++ files to reflect the
relicensing to GPLv2

Reviewed By: wez

Differential Revision: D15487078

fbshipit-source-id: 19f24c933a64ecad0d3a692d0f8d2a38b4194b1d
2019-06-19 17:02:45 -07:00
Wez Furlong
3528f40c14 eden: report the paths in failed bind mount attempts
Summary: This helps with troubleshooting problems with bind mounts

Reviewed By: simpkins

Differential Revision: D15632617

fbshipit-source-id: 5fd6aca42b48c7797a91012e5857051a415ab725
2019-06-05 07:26:13 -07:00
Adam Simpkins
67cd4bbf45 add a TestServer class
Summary:
Add a helper class for creating an EdenServer in a unit test.

Most of our existing unit tests only create EdenMount objects, without a full
EdenServer.  This new class will make it easier to write tests for
functionality that does require a full EdenServer object.

Reviewed By: chadaustin

Differential Revision: D15492166

fbshipit-source-id: f8b1ce3b78a1160a5d55d305e6bf4b5305cca509
2019-05-28 21:39:39 -07:00
Chad Austin
42dcf78aad clang-format
Summary: Small parts of our code have diverged from our clang-format rules.

Reviewed By: strager

Differential Revision: D15380260

fbshipit-source-id: f668ac22d6c0c5f2468549f2a94dd1c9bb22ce3d
2019-05-17 10:19:02 -07:00
Wez Furlong
b5b76236e0 eden: adjust volume name on macos
Summary:
The Finder shows the volume name instead of the directory
name when it renders the directory containing a mount, and the default
name of `OSXFuse Volume X` makes it hard to distinguish between multiple
mounts in the same folder.

This changes the volume name to be the basename of the mounted path so
that the finder renders things more reasonably.

Reviewed By: chadaustin

Differential Revision: D14969807

fbshipit-source-id: de9d8469360712828598fed124ed02ee5d6dd44a
2019-04-17 12:54:51 -07:00
Wez Furlong
0f2d07002a eden: allow apple double
Summary:
Unfortunately, some node modules packages include `.DS_Store` files
and since we disable apple double, the kext refuses to allow them to be
unpacked in the repo.  Ideally they wouldn't be in the repo, but we need to
unblock that workflow.

Reviewed By: chadaustin

Differential Revision: D14969808

fbshipit-source-id: f9262294a223fd5cc7929a2b324f2401e1fed083
2019-04-17 12:54:51 -07:00
Yedidya Feldblum
92a8e3f59f Stop checking EventBase::runInEventBaseThread result
Summary:
[Folly] Stop checking `EventBase::runInEventBaseThread` result, as the function will soon be changed not to return any result.

It returned `false` when failing to enqueue a task. But it cannot really fail anyway besides allocation failure, unless in the `EventBase` destructor and while draining and the `AlwaysEnqueue` variant is called.

Reviewed By: andriigrynenko

Differential Revision: D14254969

fbshipit-source-id: a6a9199cbafa18b61488a240e4318ce946953f51
2019-02-28 02:36:15 -08:00
Chad Austin
015c45872b split privhelper and privhelper_base
Summary:
We're not that far from building privhelper on mode/mac but it does
require figuring out how to depend on osxfuse from the Buck build, so
bypass that by breaking the inodes target's dependency on privhelper's
<fuse_ioctl.h> include.

Reviewed By: strager

Differential Revision: D14218709

fbshipit-source-id: edbb2a21df06d6f2a4f860ef13718ad05d445e98
2019-02-27 19:06:00 -08:00
Chad Austin
b8dc8a80c3 only include selinux on linux
Summary: We should only attempt to include selinux on Linux, not macOS.

Reviewed By: strager

Differential Revision: D14181109

fbshipit-source-id: be47b7bdadc3409577fa114559e905214848ebd8
2019-02-22 16:14:48 -08:00
Michael Liu
b626f922ce Apply modernize-use-override (2nd iteration)
Summary:
Use C++11’s override and remove virtual where applicable.
Change are automatically generated.

Reviewed By: simpkins

Differential Revision: D14087291

fbshipit-source-id: 80e6a393c5ed8ea1656855da3832bcee10635004
2019-02-14 17:29:27 -08:00
Matt Glazar
0b151df7b3 Delete unused function declaration
Summary: PrivHelperServer::initLogging is declared in the .h file, but it's never defined. Remove the useless declaration.

Reviewed By: simpkins

Differential Revision: D13814416

fbshipit-source-id: 25cb47442a19947da08d13d9bed9b4631a1c9739
2019-01-28 11:32:56 -08:00
Jon Maltiel Swenson
79b7db4d91 Make EventBase destruction callbacks safely cancellable
Summary: Currently, `runOnDestruction` aims to be thread-safe; new callbacks are added to the `onDestructionCallbacks_` list while the associated mutex is held. However, the caller may own the `LoopCallback` and wish to destroy/cancel it before the `EventBase` destructor runs, and this callback cancellation is not thread-safe, since unlinking does not happen under the lock protecting `onDestructionCallbacks_`. The primary motivation of this diff is to make on-destruction callback cancellation thread-safe; in particular, it is safe to cancel an on-destruction callback concurrently with `~EventBase()`.

Reviewed By: spalamarchuk

Differential Revision: D13440552

fbshipit-source-id: 65cee1e361d37647920baaad4490dd26b791315d
2019-01-24 15:57:39 -08:00
Wez Furlong
2ba72dc18e eden: have priv helper load the fuse kext if needed
Summary:
This is something that is not needed on linux because
the kernel module is typically already loaded (at least on the systems
on which we run).

On macos, since fuse is not part of the kernel, libfuse has some code
that loads it when needed.

This diff performs the equivalent actions for eden.

Reviewed By: simpkins

Differential Revision: D13721489

fbshipit-source-id: 627bc90681141d0e7da3d5b5e06756a36839958c
2019-01-17 18:52:53 -08:00
Wez Furlong
4e596a944b eden: implement mount/unmount for osxfuse
Summary:
Note that the concept of bind mounts doesn't exist on macos, so that
portion of the server just throws.

Reviewed By: simpkins

Differential Revision: D13480147

fbshipit-source-id: 92225188c0af42574d090004490f3926d393747b
2019-01-17 18:52:53 -08:00
Wez Furlong
13c2d03331 eden: fixup compilation warning with clang
Summary:
Address this error with clang:

```
In file included from /Users/wez/fbsource/fbcode/eden/oss/eden/fs/service/main.cpp:25:
/Users/wez/fbsource/fbcode/eden/oss/eden/fs/fuse/privhelper/PrivHelper.h:22:1: warning: class 'Unit' was previously declared as a struct [-Wmismatched-tags]
class Unit;
^
/Users/wez/fbsource/fbcode/eden/oss/external/install/include/folly/Unit.h:36:8: note: previous use is here
struct Unit {
       ^
/Users/wez/fbsource/fbcode/eden/oss/eden/fs/fuse/privhelper/PrivHelper.h:22:1: note: did you mean struct here?
class Unit;
^~~~~
struct
```

Reviewed By: strager

Differential Revision: D13602383

fbshipit-source-id: 6e69716498680660181ab441c3c007b074ec1d40
2019-01-14 13:52:36 -08:00
Wez Furlong
0774b2c457 eden: pull in osxfuse kernel headers
Summary:
There's nothing nice about this; the full set of kernel headers are
not installed with the binary distribution, and since the kernel distribution
has to be signed to be loaded on osx, there's no benefit to us building it
for ourselves.

This diff adds a nop builder and tweaks the cmake to point into the osxfuse
repo.

The osxfuse repo aggregates a couple of related repos using the git
submodule feature, so trigger that from getdeps.py too.

Reviewed By: strager

Differential Revision: D13480148

fbshipit-source-id: 84e09a86f6a83f83ffd1e3fe113dc7b15b3ea208
2018-12-17 20:16:19 -08:00
Wez Furlong
b69536b6d4 eden: no SOCK_CLOEXEC on darwin
Summary:
handle this best-effort by setting this bit on each fd after
allocating them.

Reviewed By: strager

Differential Revision: D13475712

fbshipit-source-id: 46be80f025b21967f75822f983bc327c5e2d20af
2018-12-17 20:16:18 -08:00
Wez Furlong
ae390beb6e eden: prctl is linux specific
Summary: only include and use it on linux

Reviewed By: simpkins

Differential Revision: D13475715

fbshipit-source-id: 6b0b9da1b32088e01cbb932f9b3ed62532dfe00f
2018-12-15 13:43:31 -08:00
Wez Furlong
31eb2b1c8c eden: selinux is linux specific, adjust cmake accordingly
Summary: only add the selinux deps if we found selinux

Reviewed By: simpkins

Differential Revision: D13475711

fbshipit-source-id: c3375282b61881317f9a6c4c8e321ce717d1f9ab
2018-12-15 13:43:31 -08:00
Chad Austin
8cf1e44823 folly::Optional -> std::optional
Summary: Eden's on C++17 so fully cross the rubicon!

Reviewed By: strager

Differential Revision: D10498098

fbshipit-source-id: 33a885614d627399645b70a54092c1badd795fbe
2018-10-23 18:51:59 -07:00
Adam Simpkins
2904016208 cmake: fix the build when SELinux is available
Summary:
D9029272 (github commit fae2056037) accidentally broke the CMake-based
build of Eden when SELinux is available: it defined `PRIVHELPER_LIBS` but
later used `PRIVHELPER_LIBRARIES` (LIBS vs LIBRARIES).

This fixes that error by simply removing this intermediate variable.  We
can just use SELINUX_INCLUDE_DIR and SELINUX_LIBRARIES directly, as they
will simply be empty if SELinux is not available.

Reviewed By: quark-zju

Differential Revision: D10503905

fbshipit-source-id: 1c12bb1cad0351e4e0a77d0c7e8a83086209efee
2018-10-23 13:42:12 -07:00
Chad Austin
88b08e5b00 clang-format
Summary: We've diverged in a few places from clang-format, so run it across the entirety of Eden.

Reviewed By: wez

Differential Revision: D10137785

fbshipit-source-id: 9603c2eeddc7472c33041ae60e3e280065095eb7
2018-10-02 10:07:38 -07:00
Wez Furlong
8cc1170bf7 tolerate ECHILD when waiting on privhelper process
Summary:
Since the privhelper process is often not our direct child
we both cannot and do not need to wait for it, so treat ECHILD as
a successful exit status to prevent bubbling up an exception that
blocks graceful restart.

Reviewed By: simpkins

Differential Revision: D9581473

fbshipit-source-id: 6d53bbb6ee2043de76df9c6870028a1c15571dac
2018-08-30 17:28:10 -07:00
Lee Howes
c0a837ec7d Future<T>::then Future<T>::then(not-try-task) -> Future<T>::thenValue(task).
Summary:
Overall plan to modify Future<T>::then to be r-value qualified and use Future<T>::thenTry or Future<T>::thenValue.

The goal is to disambiguate folly::Future and to improve type and lifetime safety of Future and its methods.

Codemod:
 * future<T>.then(callable with operator()(not-a-try)) to future<T>.thenValue(callable with operator()(not-a-try)).
 * future<T>.then(callable with operator()()) to future<T>.thenValue(callable with operator()(auto&&)).
 * future<T>.then(callable with operator()(auto)) to future<T>.thenValue(callable with operator()(auto)).

Reviewed By: yfeldblum

Differential Revision: D9512177

fbshipit-source-id: daa3581611dcd9f32d9314bae1c5fa0f966613f3
2018-08-26 22:52:34 -07:00
Marshall Cline
dfac9dda4a use rvalue-qual Future::ensure(): pass 2
Summary:
This is part of "the great r-valuification of folly::Future":

* This is something we should do for safety in general.
* Several of folly::Future's methods are lvalue-qualified even though they act as though they are rvalue-qualified, that is, they provide a postcondition that says, in effect, callers should act as though the method invalidated its `this` object (regardless of whether that invalidation was actual or logical).
* This violates the C++ principle to "Express ideas directly in code" (see Core Guidelines), and generally makes it more confusing for callers as well as hiding the actual semantics from tools (linters, compilers, etc.).
* This dichotomy and confusion has manifested itself by some failures around D7840699 since lvalue-qualification hides that operation's move-out semantics - leads to some use of future operations that are really not correct, but are not obviously incorrect.
* The goal of rvalueification is to make sure methods that are logically rvalue-qualified are actually rvalue-qualified, which forces callsites to acknowledge that rvalueification, e.g., `std::move(f).ensure(...)` instead of `f.ensure(...)`. This syntactic change in the callsites forces callers to acknowledge the method's rvalue semantics.

This diff started as a Codemod, then required manual fixes. Here were the codemod steps:

* expr.ensure(...) ==> std::move(expr).ensure(...)  // if expr is not already an xvalue
* expr->ensure(...) ==> std::move(*expr).ensure(...)

Note: operator precedence of that last step is safe - no need to parenthesize `expr`. Reason: `->` binds more tightly than unary `*`.

Reviewed By: yfeldblum

Differential Revision: D9332070

fbshipit-source-id: 882121fe82c05fdb196ce676db686b6bc254974b
2018-08-16 20:37:45 -07:00
Chad Austin
a541b15818 hide setcon() failure messages at startup by default
Summary:
The setcon() failure is not actionable or interesting, so don't log it
to stdout at Eden startup.

Reviewed By: wez

Differential Revision: D9344467

fbshipit-source-id: 68435c8f22c228f2fbb86f37c2b1874723934169
2018-08-15 13:52:06 -07:00
Lee Howes
69d8203162 Future<T>::then 6/n: Future<T>::then() & -> Future<T>::then() &&.
Summary:
Overall plan to modify Future<T>::then to be r-value qualified and use Future<T>::thenTry or Future<T>::thenValue.

The goal is to disambiguate folly::Future and to improve type and lifetime safety of Future and its methods.

6/n: Codemod rvalue-future<T>.then(...) to rvalue-future<T>.then(...).

Reviewed By: yfeldblum

Differential Revision: D9152002

fbshipit-source-id: 166475c1dcafb29a11154cbfbdf7e2e1feaf745b
2018-08-03 23:36:16 -07:00
Jun Wu
fae2056037 do not require SELinux in GitHub build
Summary:
I tried to build eden using GitHub version and ran into SELinux issues.
This patch fixed related issues, namely:

- `set(X Y)` sets X to string literal Y. Change it to `set(X ${Y})`.
- `SELINUX_INCLUDE_DIR` could be undefined. Check before use it.
- `./eden/fs/eden-config.h` and `./build/eden/fs/eden-config.h` both exist and
  the former is used. Set include dirs so the latter gets used.

Reviewed By: bolinfest

Differential Revision: D9029272

fbshipit-source-id: 0c94bbe2f9e3fa90973802ddde16ad4d9ddfc0e8
2018-07-27 13:22:57 -07:00