]> Projects (at) Tadryanom (dot) Me - AdrOS.git/commit
vfs: add vfs_check_permission_real for POSIX strict access()
authorTulio A M Mendes <[email protected]>
Thu, 11 Jun 2026 02:09:53 +0000 (23:09 -0300)
committerTulio A M Mendes <[email protected]>
Thu, 11 Jun 2026 02:09:53 +0000 (23:09 -0300)
commit182f9849cb897838cd184a32405acd9df2258ede
tree9edd55f89a417fdf4fe9d04f28afab63e5a4559d
parent40ec7883cbddc38bf1703c39234470a8d3b6f248
vfs: add vfs_check_permission_real for POSIX strict access()

Implement M2: POSIX access() with real IDs instead of effective IDs.

Added vfs_check_permission_real() function that uses current_process->uid
and current_process->gid instead of euid/egid for POSIX strict compliance.
The access() syscall now uses this function, while other operations continue
to use vfs_check_permission() with effective IDs.

This ensures access() behaves according to POSIX specification which requires
real IDs for permission checks, while preserving existing behavior for other
file operations that use effective IDs.

Test: make test-battery PASS (157/157), make analyzer PASS
include/fs.h
src/kernel/fs.c
src/kernel/syscall.c