summaryrefslogtreecommitdiff
path: root/src/nspawn/nspawn.c
diff options
context:
space:
mode:
authorRichard Maw <richard.maw@codethink.co.uk>2015-06-19 15:24:38 +0000
committerRichard Maw <richard.maw@codethink.co.uk>2015-08-07 15:50:43 +0000
commit62f9f39a455204fac698f702a1369bd6fdbdbf9d (patch)
tree5713f00952949fa49f46c76cdfbf478d99a97bef /src/nspawn/nspawn.c
parent872d0dbdc335053ee94ae9158fb9637c3c904ade (diff)
nspawn: Allow : characters in overlay paths
: characters can be entered with the \: escape sequence.
Diffstat (limited to 'src/nspawn/nspawn.c')
-rw-r--r--src/nspawn/nspawn.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/nspawn/nspawn.c b/src/nspawn/nspawn.c
index 59e013d5c5..347260013a 100644
--- a/src/nspawn/nspawn.c
+++ b/src/nspawn/nspawn.c
@@ -739,9 +739,13 @@ static int parse_argv(int argc, char *argv[]) {
unsigned n = 0;
char **i;
- lower = strv_split(optarg, ":");
- if (!lower)
+ r = strv_split_extract(&lower, optarg, ":", EXTRACT_DONT_COALESCE_SEPARATORS);
+ if (r == -ENOMEM)
return log_oom();
+ else if (r < 0) {
+ log_error("Invalid overlay specification: %s", optarg);
+ return r;
+ }
STRV_FOREACH(i, lower) {
if (!path_is_absolute(*i)) {