mirror of
https://github.com/opnsense/src.git
synced 2026-06-03 22:02:58 -04:00
Allow '.' components in manifest paths. They are always the first
component of mtree -C and install -M output and are easily skipped. Reviewed by: marcel Sponsored by: DARPA, AFRL
This commit is contained in:
parent
e9a03238b0
commit
17b3e6f746
1 changed files with 6 additions and 6 deletions
|
|
@ -974,15 +974,15 @@ read_mtree_spec(FILE *fp)
|
|||
do {
|
||||
*cp++ = '\0';
|
||||
|
||||
/* Disallow '.' and '..' as components. */
|
||||
if (IS_DOT(pathspec) || IS_DOTDOT(pathspec)) {
|
||||
mtree_error("absolute path cannot contain . "
|
||||
"or .. components");
|
||||
/* Disallow '..' as a component. */
|
||||
if (IS_DOTDOT(pathspec)) {
|
||||
mtree_error("absolute path cannot contain "
|
||||
".. component");
|
||||
goto out;
|
||||
}
|
||||
|
||||
/* Ignore multiple adjacent slashes. */
|
||||
if (pathspec[0] != '\0')
|
||||
/* Ignore multiple adjacent slashes and '.'. */
|
||||
if (pathspec[0] != '\0' && !IS_DOT(pathspec))
|
||||
error = read_mtree_spec1(fp, false, pathspec);
|
||||
memmove(pathspec, cp, strlen(cp) + 1);
|
||||
cp = strchr(pathspec, '/');
|
||||
|
|
|
|||
Loading…
Reference in a new issue