]> git.ipfire.org Git - thirdparty/lxc.git/commitdiff
parse: remove access() check
authorChristian Brauner <christian.brauner@ubuntu.com>
Sat, 6 Oct 2018 22:42:44 +0000 (00:42 +0200)
committerChristian Brauner <christian.brauner@ubuntu.com>
Sat, 6 Oct 2018 22:42:44 +0000 (00:42 +0200)
We can just fail on open() and not waste an additional syscall.

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
src/lxc/confile.c

index 8e13b123d95a9054ca4e5ebda0fba26a5045e37e..d49afae11cc2b45a3561f48d7e2d7497ac02f3ba 100644 (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);