parse: remove access() check

We can just fail on open() and not waste an additional syscall. Signed-off-by: 's avatarChristian Brauner <christian.brauner@ubuntu.com>
parent 05ed3250
...@@ -2325,10 +2325,6 @@ int lxc_config_read(const char *file, struct lxc_conf *conf, bool from_include) ...@@ -2325,10 +2325,6 @@ int lxc_config_read(const char *file, struct lxc_conf *conf, bool from_include)
c.conf = conf; c.conf = conf;
c.from_include = from_include; 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. */ /* Catch only the top level config file name in the structure. */
if (!conf->rcfile) if (!conf->rcfile)
conf->rcfile = strdup(file); conf->rcfile = strdup(file);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment