From 3d270fcca62a6045b6525441d2f9c039c7a749ec Mon Sep 17 00:00:00 2001 From: Conor Scott Date: Tue, 15 Jan 2019 23:40:12 +0400 Subject: [PATCH] Skip README.md when reading in plugins dir --- lightningd/plugin.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/lightningd/plugin.c b/lightningd/plugin.c index e2b0d5bfc..bff54d8dc 100644 --- a/lightningd/plugin.c +++ b/lightningd/plugin.c @@ -884,6 +884,12 @@ static const char *plugin_fullpath(const tal_t *ctx, const char *dir, /* Must be executable by someone. */ if (!(st.st_mode & (S_IXUSR|S_IXGRP|S_IXOTH))) return tal_free(fullname); + + /* Someone actually runs this on NTFS, where everything apparently is + * executable! This prevents the most obvious damage. */ + if (streq(basename, "README.md")) + return tal_free(fullname); + return fullname; }