mailutils/silent-rpmlint-with_initgroups.patch

30 lines
775 B
Diff

---
comsat/comsat.c | 1 +
pop3d/user.c | 4 +++-
2 files changed, 4 insertions(+), 1 deletion(-)
--- comsat/comsat.c
+++ comsat/comsat.c 2018-06-07 08:51:30.882263156 +0000
@@ -516,6 +516,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);
--- pop3d/user.c
+++ pop3d/user.c 2018-06-07 08:56:38.448784813 +0000
@@ -38,8 +38,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))