parse: remove access() check

We can just fail on open() and not waste an additional syscall.

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
This commit is contained in:
Christian Brauner 2018-10-07 00:42:44 +02:00
parent 8b013632c6
commit 46ac8c5b35
No known key found for this signature in database
GPG Key ID: 8EB056D53EECB12D

View File

@ -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);