Unverified Commit 9fc6fd21 by Christian Brauner Committed by GitHub

Merge pull request #2817 from Rachid-Koucha/patch-5

More accurate error msg for template file
parents dea31fe2 b275efe3
......@@ -910,9 +910,13 @@ char *get_template_path(const char *t)
int ret, len;
char *tpath;
if (t[0] == '/' && access(t, X_OK) == 0) {
tpath = strdup(t);
return tpath;
if (t[0] == '/') {
if (access(t, X_OK) == 0) {
return strdup(t);
} else {
SYSERROR("Bad template pathname: %s", t);
return NULL;
}
}
len = strlen(LXCTEMPLATEDIR) + strlen(t) + strlen("/lxc-") + 1;
......
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