• zhul's avatar
    Switch to internal API and add fallback user for fstatat() · 4286ee8b
    zhul authored
    - Add `fstatat_with_fallback_user` function to handle UIDs in `my_fstatat.c`
    - Add `#include <stdbool.h>` and `bool retried` to `proc_parse.c`
    - Add `retry_o_path` goto and `if (!retried)` check to `proc_parse.c`
    - Use `fstatat_with_fallback_user
    
    [criu/my_fstatat.c]
    - Add `fstatat_with_fallback_user` function
    - Set the UID based on the `CURRENT_TASK_USER` environment variable
    - Rollback to the original UID after the call to `fstatat`
    [criu/proc_parse.c]
    - Add `#include <stdbool.h>`
    - Add `bool retried`
    - Add `retry_o_path` goto
    - Add `if (!retried)` check
    - Add `flags = O_PATH`
    [criu/files-reg.c]
    - Include `my_fstatat.c`
    - Use `fstatat_with_fallback_user` instead of `fstatat`
    4286ee8b
proc_parse.c 55.4 KB