diff options
| author | Brooks Davis <brooks@FreeBSD.org> | 2013-02-20 15:28:40 +0000 |
|---|---|---|
| committer | Brooks Davis <brooks@FreeBSD.org> | 2013-02-20 15:28:40 +0000 |
| commit | 17b3e6f7469ea7f774c32bd8ef406ec1a7ade679 (patch) | |
| tree | 4d7455708f7b5e35948cb4ed0dc9a87f7c872862 /usr.sbin/makefs/mtree.c | |
| parent | e9a03238b07457697468a52a46c6f31b178a71bc (diff) | |
Notes
Diffstat (limited to 'usr.sbin/makefs/mtree.c')
| -rw-r--r-- | usr.sbin/makefs/mtree.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/usr.sbin/makefs/mtree.c b/usr.sbin/makefs/mtree.c index 12893df26cec..2f2400ab26ec 100644 --- a/usr.sbin/makefs/mtree.c +++ b/usr.sbin/makefs/mtree.c @@ -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, '/'); |
