summaryrefslogtreecommitdiffstats
path: root/logwrapper
diff options
context:
space:
mode:
authorRom Lemarchand <romlem@google.com>2013-01-11 14:56:44 -0800
committerRom Lemarchand <romlem@google.com>2013-01-28 13:12:37 -0800
commitcfb5ec3c283bb0fd5a99d6ed282a508be309d291 (patch)
tree7a043ee4378c8b9b85cc84996703712c978f7a79 /logwrapper
parent611f5b4b938f2ffcf2a2e71a847e4fd12587ca4b (diff)
downloadsystem_core-cfb5ec3c283bb0fd5a99d6ed282a508be309d291.zip
system_core-cfb5ec3c283bb0fd5a99d6ed282a508be309d291.tar.gz
system_core-cfb5ec3c283bb0fd5a99d6ed282a508be309d291.tar.bz2
logwrap: remove unnecessary call to setuid/setgid
Android allows all users to write to log. The setuid/setgid call is unneeded and could cause unintended side effects when called from daemons or programs that need to run as root. Change-Id: I3bdb26eaa4363ef037615e45a1a5cb1ceb4088f3
Diffstat (limited to 'logwrapper')
-rw-r--r--logwrapper/logwrap.c6
1 files changed, 0 insertions, 6 deletions
diff --git a/logwrapper/logwrap.c b/logwrapper/logwrap.c
index 09f8b81..ef457de 100644
--- a/logwrapper/logwrap.c
+++ b/logwrapper/logwrap.c
@@ -262,12 +262,6 @@ int logwrap(int argc, char* argv[], int *status) {
signal_fd_write = sockets[0];
- // switch user and group to "log"
- // this may fail if we are not root,
- // but in that case switching user/group is unnecessary
- setgid(AID_LOG);
- setuid(AID_LOG);
-
rc = parent(argv[0], parent_ptty, sockets[1], pid, status);
}