mirror of
https://github.com/RGBCube/serenity
synced 2025-05-15 07:34:59 +00:00
Add chown() syscall and a simple /bin/chown program.
This commit is contained in:
parent
711e2b2651
commit
1d2529b4a1
19 changed files with 130 additions and 5 deletions
|
@ -1346,6 +1346,17 @@ KResult Ext2FSInode::chmod(mode_t mode)
|
|||
return KSuccess;
|
||||
}
|
||||
|
||||
KResult Ext2FSInode::chown(uid_t uid, gid_t gid)
|
||||
{
|
||||
LOCKER(m_lock);
|
||||
if (m_raw_inode.i_uid == uid && m_raw_inode.i_gid == gid)
|
||||
return KSuccess;
|
||||
m_raw_inode.i_uid = uid;
|
||||
m_raw_inode.i_gid = gid;
|
||||
set_metadata_dirty(true);
|
||||
return KSuccess;
|
||||
}
|
||||
|
||||
unsigned Ext2FS::total_block_count() const
|
||||
{
|
||||
LOCKER(m_lock);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue