projects
/
platform
/
core
/
system
/
crash-worker.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
fbee707
)
crash-manager: Set primary group
01/252801/1
author
Karol Lewandowski
<k.lewandowsk@samsung.com>
Tue, 2 Feb 2021 09:00:59 +0000
(10:00 +0100)
committer
Karol Lewandowski
<k.lewandowsk@samsung.com>
Tue, 2 Feb 2021 09:56:09 +0000
(09:56 +0000)
Previously only supplementary groups were set, leaving main gid to
be 'root'.
Change-Id: I50494ca40192c985d07cf07827c4f44c4f99b1d7
src/crash-manager/main.c
patch
|
blob
|
history
diff --git
a/src/crash-manager/main.c
b/src/crash-manager/main.c
index
6af466e
..
0860b0b
100644
(file)
--- a/
src/crash-manager/main.c
+++ b/
src/crash-manager/main.c
@@
-255,6
+255,11
@@
static bool drop_privileges(const char *user_name)
if (!set_groups(user_name, user_info.pw_gid))
goto exit;
+ if (setgid(user_info.pw_gid) == -1) {
+ _E("setgid() error: %m\n");
+ goto exit;
+ }
+
if (setuid(user_info.pw_uid) == -1) {
_E("setuid() error: %m\n");
goto exit;