Commit 14aab2c7 by qianfan Zhao

lxc-create: check absoule path for param '--dir'

Fix: #3123 Signed-off-by: 's avatarqianfan Zhao <qianfanguijin@163.com>
parent faec88e5
...@@ -235,6 +235,11 @@ int main(int argc, char *argv[]) ...@@ -235,6 +235,11 @@ int main(int argc, char *argv[])
exit(EXIT_FAILURE); exit(EXIT_FAILURE);
} }
if (my_args.dir && my_args.dir[0] != '/') {
ERROR("--dir should use absolute path");
exit(EXIT_FAILURE);
}
if (strncmp(my_args.template, "none", strlen(my_args.template)) == 0) if (strncmp(my_args.template, "none", strlen(my_args.template)) == 0)
my_args.template = NULL; my_args.template = NULL;
......
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