HomeFreeBSD

Implement secpolicy_vnode_setid_retain()

Description

Implement secpolicy_vnode_setid_retain()

Don't unconditionally return 0 (i.e. retain SUID/SGID).
Test CAP_FSETID capability.

https://github.com/pjd/pjdfstest/blob/master/tests/chmod/12.t
which expects SUID/SGID to be dropped on write(2) by non-owner fails
without this. Most filesystems make this decision within VFS by using
a generic file write for fops.

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Tomohiro Kusumi <kusumi.tomohiro@gmail.com>
Closes #9035
Closes #9043

Details

Provenance
kusumi.tomohiro_gmail.comAuthored on Jul 26 2019, 8:52 PM
Brian Behlendorf <behlendorf1@llnl.gov>Committed on Jul 26 2019, 8:52 PM
Parents
rG4b5c9d9f9763: zed crashes when devid not present
Branches
Unknown
Tags
Unknown

Event Timeline

Brian Behlendorf <behlendorf1@llnl.gov> committed rG9fb6abe5addf: Implement secpolicy_vnode_setid_retain() (authored by Tomohiro Kusumi <kusumi.tomohiro@gmail.com>).Jul 26 2019, 8:52 PM