-
Notifications
You must be signed in to change notification settings - Fork 601
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
i/builtin: prohibit trailing '@' in common-files filepaths (#14696)
* i/builtin: prohibit trailing '@' in common-files filepaths For the `common-files` interface and those which use `commonFilesInterface` (such as `system-files` and `personal-files`), these append a trailing `{,/,/**}` to the end of each path. The `@` character is allowed in filepaths specified in these plugs, since filepaths like `/dev/foo@bar` may be required. However, if an `@` character occurs at the end of the filepath (e.g. `/foo/bar@`), then the resulting filepath in the rule is `/foo/bar@{,/,/**}`. AppArmor treats `@{FOO}` as a variable, so having `@{,/,/**}` in the final rule snippet is problematic. This commit adds a check to `common_files.go` to ensure that filepaths do not have a trailing `@`. Signed-off-by: Oliver Calder <[email protected]> * i/builtin: add comment explaining why common-files paths cannot end with @ Signed-off-by: Oliver Calder <[email protected]> --------- Signed-off-by: Oliver Calder <[email protected]>
- Loading branch information
1 parent
fbb8662
commit e323241
Showing
3 changed files
with
11 additions
and
1 deletion.
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
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