mirror of
https://github.com/kvorschk/Magisk.git
synced 2026-12-04 19:10:47 -05:00
Remove reliance on /proc/self/fd symlink resolution across base and core components: - Add top-level pre_order_walk and post_order_walk that track entry paths via an internal buffer, and unify Directory walk methods to support path-tracking and pathless traversals without extra overhead. - Add DirEntry::get_stat using fstatat(AT_SYMLINK_NOFOLLOW) directly on directory file descriptors. - Update Directory::copy_into and link_into to operate directly on file descriptors with fd_get_attr/fd_set_attr, passing paths only for symlink attribute updates. - Refactor find_apk_path and restore_tmpcon to use pre_order_walk, and update get_app_no_list to use DirEntry::get_stat. - Remove DirEntry::resolve_path, Directory::path_at, Directory::resolve_path, and fd_path. - Replace remaining consumers of xrealpath and canonical_path (in su and magiskinit) with standard realpath or partition matching, allowing removal of Utf8CStr::realpath and its C FFI exports. Assisted-by: Gemini 3.8 Flash