From 365317dbd11d786ee36420b384d46659ef4a9b97 Mon Sep 17 00:00:00 2001 From: netblue30 Date: Sun, 29 Apr 2018 10:50:29 -0400 Subject: fix user database access --- src/firecfg/util.c | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/src/firecfg/util.c b/src/firecfg/util.c index f0446ca8d..7ed86c36e 100644 --- a/src/firecfg/util.c +++ b/src/firecfg/util.c @@ -58,9 +58,15 @@ int which(const char *program) { // use path2 to count the entries char *ptr = strtok(path2, ":"); while (ptr) { - if (find(program, ptr)) { - free(path2); - return 1; + // Ubuntu 18.04 is adding /snap/bin to PATH; + // they populate /snap/bin with simbolic links to /usr/bin/ programs; + // most simlinked programs are not installed by default. + // Removing /snap/bin from our search + if (strcmp(ptr, "/snap/bin") != 0) { + if (find(program, ptr)) { + free(path2); + return 1; + } } ptr = strtok(NULL, ":"); } -- cgit v1.2.3-70-g09d2