diff options
| author | Denys Vlasenko <vda.linux@googlemail.com> | 2009-12-14 16:00:28 +0100 |
|---|---|---|
| committer | Denys Vlasenko <vda.linux@googlemail.com> | 2009-12-14 16:00:28 +0100 |
| commit | 5f3b126f3013cb78fa2e5a8beb935021e21d5c5d (patch) | |
| tree | f73b2d969ade5cfdb353f76b11ac13555bd85b7c /lib/Plugins/Mailx.cpp | |
| parent | 452013e2097aa985bf8c3f8296d00d189401eea3 (diff) | |
| download | abrt-5f3b126f3013cb78fa2e5a8beb935021e21d5c5d.tar.gz abrt-5f3b126f3013cb78fa2e5a8beb935021e21d5c5d.tar.xz abrt-5f3b126f3013cb78fa2e5a8beb935021e21d5c5d.zip | |
add paranoia checks on setuid/setgid
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'lib/Plugins/Mailx.cpp')
| -rw-r--r-- | lib/Plugins/Mailx.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/lib/Plugins/Mailx.cpp b/lib/Plugins/Mailx.cpp index 26b6ec4..b06edeb 100644 --- a/lib/Plugins/Mailx.cpp +++ b/lib/Plugins/Mailx.cpp @@ -57,9 +57,8 @@ static void exec_and_feed_input(uid_t uid, const char* pText, char **pArgs) struct passwd* pw = getpwuid(uid); gid_t gid = pw ? pw->pw_gid : uid; setgroups(1, &gid); - setregid(gid, gid); - setreuid(uid, uid); - setsid(); /* why? I propose removing this */ + xsetregid(gid, gid); + xsetreuid(uid, uid); execvp(pArgs[0], pArgs); exit(1); /* exec failed */ |
