--- comsat/comsat.c | 1 + comsat/comsat.h | 1 + pop3d/user.c | 4 +++- 3 files changed, 5 insertions(+), 1 deletion(-) --- comsat/comsat.c +++ comsat/comsat.c 2018-06-07 08:51:30.882263156 +0000 @@ -535,6 +535,7 @@ change_user (const char *user) return 1; } + initgroups (user, pw->pw_gid); setgid (pw->pw_gid); setuid (pw->pw_uid); chdir (pw->pw_dir); --- comsat/comsat.h +++ comsat/comsat.h 2018-06-07 09:57:24.467620564 +0000 @@ -35,6 +35,7 @@ #include #include #include +#include #include --- pop3d/user.c +++ pop3d/user.c 2018-06-07 08:56:38.448784813 +0000 @@ -37,8 +37,10 @@ pop3d_begin_session () return ERR_LOGIN_DELAY; } - if (auth_data->change_uid) + if (auth_data->change_uid) { + initgroups (auth_data->name, auth_data->gid); setuid (auth_data->uid); + } if (manlock_open_mailbox (&mbox, auth_data->mailbox, 0, MU_STREAM_CREAT | MU_STREAM_RDWR))