3 ms·
getpwnam() gets its data by parsing /etc/{passwd,shadow}[0]. It isn't a magical system call that elevates the privileges of the calling program. [0] assuming y
by tremon 5y ago
getpwnam() gets its data by parsing /etc/{passwd,shadow}[0]. It isn't a magical system call that elevates the privileges of the calling program.
[0] assuming your nsswitch says so
- a-dub 5y agoyeah. agree, was merely pointing out the public interface for querying passwd records for the purposes of highlighting why said interface might be another reason to reconsider the proposed idea of a setuid shim that reads a read protected /etc/passwd that contains password hashes and returns only the public components.