Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
vfs: canonicalize create mode in build_open_flags()
Userspace can pass weird create mode in open(2) that we canonicalize to "(mode & S_IALLUGO) | S_IFREG" in vfs_create(). The problem is that we use the uncanonicalized mode before calling vfs_create() with unforseen consequences. So do the canonicalization early in build_open_flags(). Signed-off-by: Miklos Szeredi <[email protected]> Tested-by: Richard W.M. Jones <[email protected]> CC: [email protected]
- Loading branch information