Timeline for How does vim decide if a file is "readonly"?
Current License: CC BY-SA 4.0
3 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Jun 19, 2019 at 23:43 | comment | added | filbranden |
@Martin a setuid binary will execute with an EUID ("effective" UID) of root (or the user that owns the binary), but still an UID ("real" UID) of your user. Functions to explicitly check for access (access(2) ) typically use the real UID. A setuid process that wants to actually run as root will typically execute setreuid(geteuid()): to reset the real UID appropriately. Hope that helps!
|
|
Jun 19, 2019 at 11:01 | comment | added | Martin |
That's odd, because /etc/passwd has w for user root : -rw-r--r-- 1 root root 1571 May 8 13:19 /etc/passwd . I guess it has nothing to do with vim , but rather how Linux executes the setuid binaries.
|
|
Jun 18, 2019 at 19:46 | history | answered | D. Ben Knoble♦ | CC BY-SA 4.0 |