forked from containers/composefs
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
mkcomposefs: Add a hidden CFS_PARSE_STRICT
Right now in some cases we have "loose" semantics; a simple case I noticed earlier is we accepted whatever input size for a symlink but ignored it. I also noticed we accepted (and ignored) a nonzero rdev for a non-device. We have prior cases around missing trailing newline, etc. In preparation for a more official "mkcomposefs --strict" mode, add a hidden environment variable and use it to validate some of the above. There's other bits missing though - for example in strict mode I'd like to hard require that the xattrs are already in canonical form (sorted, no duplicates). This touches on a general topic that there's "strict" and then something even stronger around "normal form" where we disallow any ambiguous input such as duplicate `//` in filenames etc. That'd be a good bit more work. For now let's just lay the groundwork for stricter validation. Signed-off-by: Colin Walters <[email protected]>
- Loading branch information
Showing
2 changed files
with
42 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters