4.7 access and faccessat Functions
As we described earlier,when we open a file, the kernel performs its access tests based
on the effective user and group IDs. Sometimes, however,a process wants to test
accessibility based on the real user and group IDs. This is useful when a process is
running as someone else, using either the set-user-ID or the set-group-ID feature. Even
though a process might be set-user-ID to root, it might still want to verify that the real
user can access a given file The access and faccessat functions base their tests on
the real user and group IDs. (Replace effective with real in the four steps at the end of
Section 4.5.)
ps 관노야 이 문장이 이해가 안간다는게 아니라 이 문장 해석을 해봐 프로세스가 root에 대한 set-user-ID라고 해도 라고 해석되잖아 be가 ~이다,~가 되다 이런 뜻이니까 !!! 프로세스가 set-user-ID이다 라는 게 말이되냐?? 프로세스가 접근 권한이냐 그럼??? 프로세스가 접근 권한을 갖는다 이게 맞는 말아냐 근데 왜 be를 썼냐 이걸 묻는거아냐
비록 한 프로세스가 사용자 ID가 root로 설정될 수 있더라도, 여전히 실제 사용자가 주어진 파일에 접근이 가능한지 확인할 수 있다.
https://github.com/torvalds/linux/blob/88e237610b426897f0e9935adb6a60bd38bfe6c6/fs/open.c#L335