50192: use set{u,g}id() for dropping privilege on NetBSD

master
Jun-ichi Takimoto 2 years ago
parent eec9882d04
commit c190883a0a

@ -1,3 +1,8 @@
2022-05-11 Jun-ichi Takimoto <takimoto-j@kba.biglobe.ne.jp>
* 50192: Src/openssh_bsd_setres_id.c: use set{u,g}id() instead of
setre{u,g}id() for dropping privilege on NetBSD
2022-05-08 dana <dana@dana.is>
* 50176 (with xpufx, tweaked): Completion/Linux/Command/_htop:

@ -55,6 +55,16 @@
#include <unistd.h>
#include <string.h>
#ifdef __NetBSD__
/*
* On NetBSD, setreuid() does not reset the saved uid if the real uid
* is not modified. Better to use setuid() that resets all of real,
* effective and saved uids to the specified value. Same for setregid().
*/
#define BROKEN_SETREUID
#define BROKEN_SETREGID
#endif
#if defined(ZSH_IMPLEMENT_SETRESGID) || defined(BROKEN_SETRESGID)
int
setresgid(gid_t rgid, gid_t egid, gid_t sgid)

Loading…
Cancel
Save