git.cappig.dev / apheleiaOS.git master

b41d7779d649dd25e19daa6da3b3842d5848923e master
cappig <[email protected]> ยท 4 months ago
VFS search permission checks, procfs stat ownership

* Add vfs_check_search() to validate execute permission on every
  directory component of a path; wire into _resolve_user_path,
  _resolve_writable_parent, sys_open, sys_chdir, and exec _open_file
* Add procfs_stat_owner() that walks a vfs_node's tree ancestors to
  find its owning PID and return its uid/gid; apply override in
  sys_stat_path and sys_fstat so stat(2) reflects process ownership
* Remove pixel-shift memmove optimisation from term scroll_up();
  revert to mark_dirty_all() to fix visual corruption
* Fix ps output column widths using PS_COL_* constants and %*.*s
  format specifiers for consistent alignment
8 files changed, 245 insertions, 28 deletions
kernel/sys/exec.c +5 -0
kernel/sys/procfs.c +94 -0
kernel/sys/procfs.h +3 -0
kernel/sys/syscall.c +47 -4
kernel/sys/vfs.c +65 -0
kernel/sys/vfs.h +1 -0
user/ps/main.c +29 -3
user/term/term_screen.c +1 -21