From 46ac8c5b35089048e35b87f4ebdffb23649aa4cb Mon Sep 17 00:00:00 2001 From: Christian Brauner Date: Sun, 7 Oct 2018 00:42:44 +0200 Subject: [PATCH] parse: remove access() check We can just fail on open() and not waste an additional syscall. Signed-off-by: Christian Brauner --- src/lxc/confile.c | 4 ---- 1 file changed, 4 deletions(-) diff --git a/src/lxc/confile.c b/src/lxc/confile.c index 8e13b123d..d49afae11 100644 --- a/src/lxc/confile.c +++ b/src/lxc/confile.c @@ -2499,10 +2499,6 @@ int lxc_config_read(const char *file, struct lxc_conf *conf, bool from_include) c.conf = conf; c.from_include = from_include; - ret = access(file, R_OK); - if (ret < 0) - return -1; - /* Catch only the top level config file name in the structure. */ if (!conf->rcfile) conf->rcfile = strdup(file);