mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 07:08:10 +00:00
Kernel: Strip SUID+SGID bits from file when written to or chowned
Fixes #1624.
This commit is contained in:
parent
040ba77d44
commit
53d0ca2ad8
6 changed files with 36 additions and 0 deletions
|
@ -1435,6 +1435,10 @@ void ProcFSInode::flush_metadata()
|
|||
|
||||
ssize_t ProcFSInode::write_bytes(off_t offset, ssize_t size, const u8* buffer, FileDescription*)
|
||||
{
|
||||
auto result = prepare_to_write_data();
|
||||
if (result.is_error())
|
||||
return result;
|
||||
|
||||
auto* directory_entry = fs().get_directory_entry(identifier());
|
||||
|
||||
Function<ssize_t(InodeIdentifier, const ByteBuffer&)> callback_tmp;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue