1
0
Fork 0
mirror of git://git.code.sf.net/p/zsh/code synced 2025-07-10 16:31:27 +02:00
Commit graph

3 commits

Author SHA1 Message Date
Jun-ichi Takimoto
c190883a0a 50192: use set{u,g}id() for dropping privilege on NetBSD 2022-05-11 11:22:46 +09:00
Peter A. Castro
e872a7cec9 users/26982, subset not already integrated: use standard #include format 2021-08-28 21:38:23 +01:00
Daniel Shahaf
8250c5c168 Improve PRIVILEGED fixes
- Fix retval handling in bin_setopt()

- Don't skip_setuid / skip_setgid.  It's not our place to optimize away noops
  (that might not even _be_ noops; they might change the saved uid…).

- Remove HAVE_* guard checks around functions that are used unguarded elsewhere.

- Use bsd-setres_id.c from OpenSSH to provide setresuid() / setresgid()
  everywhere, and thus simplify the ifdef soup.  Fix some preëxisting
  bugs in the macro definitions of setuid() (do we still need that one?).

- Fix zwarning() format codes for variadic arguments type safety

- Restored a comment from HEAD

- Fix failure modes around initgroups()

- Compared privilege restoration code with OpenSSH's permanently_drop_uid() and
  updated as needed

- Add E01 PRIVILEGED sanity checks
2020-02-14 16:06:57 -06:00