summaryrefslogtreecommitdiff
path: root/Kernel/Process.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'Kernel/Process.cpp')
-rw-r--r--Kernel/Process.cpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/Kernel/Process.cpp b/Kernel/Process.cpp
index 252bed6945..e2e05805f6 100644
--- a/Kernel/Process.cpp
+++ b/Kernel/Process.cpp
@@ -72,6 +72,11 @@ Vector<Process*> Process::all_processes()
return processes;
}
+bool Process::in_group(gid_t gid) const
+{
+ return m_gids.contains(gid);
+}
+
Region* Process::allocate_region(LinearAddress laddr, size_t size, String&& name, bool is_readable, bool is_writable, bool commit)
{
size = PAGE_ROUND_UP(size);
@@ -2157,6 +2162,13 @@ int Process::sys$chmod(const char* pathname, mode_t mode)
return VFS::the().chmod(String(pathname), mode, cwd_inode());
}
+int Process::sys$chown(const char* pathname, uid_t uid, gid_t gid)
+{
+ if (!validate_read_str(pathname))
+ return -EFAULT;
+ return VFS::the().chown(String(pathname), uid, gid, cwd_inode());
+}
+
void Process::finalize()
{
ASSERT(current == g_finalizer);