projects
/
project
/
fstools.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
block: reject mount sections with relative targets
[project/fstools.git]
/
block.c
diff --git
a/block.c
b/block.c
index
aecf366
..
4c8dda9
100644
(file)
--- a/
block.c
+++ b/
block.c
@@
-274,6
+274,13
@@
static int mount_add(struct uci_section *s)
if (m->target && !strcmp(m->target, "/overlay"))
m->extroot = m->overlay = 1;
if (m->target && !strcmp(m->target, "/overlay"))
m->extroot = m->overlay = 1;
+ if (m->target && *m->target != '/') {
+ ULOG_WARN("ignoring mount section %s due to invalid target '%s'\n",
+ s->e.name, m->target);
+ free(m);
+ return -1;
+ }
+
if (m->uuid)
vlist_add(&mounts, &m->node, m->uuid);
else if (m->label)
if (m->uuid)
vlist_add(&mounts, &m->node, m->uuid);
else if (m->label)