Loading init/init.cpp +2 −0 Original line number Diff line number Diff line Loading @@ -585,6 +585,8 @@ int main(int argc, char** argv) { mount("devpts", "/dev/pts", "devpts", 0, NULL); #define MAKE_STR(x) __STRING(x) mount("proc", "/proc", "proc", 0, "hidepid=2,gid=" MAKE_STR(AID_READPROC)); gid_t groups[] = { AID_READPROC }; setgroups(arraysize(groups), groups); mount("sysfs", "/sys", "sysfs", 0, NULL); mount("selinuxfs", "/sys/fs/selinux", "selinuxfs", 0, NULL); mknod("/dev/kmsg", S_IFCHR | 0600, makedev(1, 11)); Loading init/service.cpp +2 −4 Original line number Diff line number Diff line Loading @@ -233,11 +233,9 @@ void Service::SetProcessAttributes() { PLOG(FATAL) << "setgid failed for " << name_; } } if (!supp_gids_.empty()) { if (setgroups(supp_gids_.size(), &supp_gids_[0]) != 0) { PLOG(FATAL) << "setgroups failed for " << name_; } } if (uid_) { if (setuid(uid_) != 0) { PLOG(FATAL) << "setuid failed for " << name_; Loading Loading
init/init.cpp +2 −0 Original line number Diff line number Diff line Loading @@ -585,6 +585,8 @@ int main(int argc, char** argv) { mount("devpts", "/dev/pts", "devpts", 0, NULL); #define MAKE_STR(x) __STRING(x) mount("proc", "/proc", "proc", 0, "hidepid=2,gid=" MAKE_STR(AID_READPROC)); gid_t groups[] = { AID_READPROC }; setgroups(arraysize(groups), groups); mount("sysfs", "/sys", "sysfs", 0, NULL); mount("selinuxfs", "/sys/fs/selinux", "selinuxfs", 0, NULL); mknod("/dev/kmsg", S_IFCHR | 0600, makedev(1, 11)); Loading
init/service.cpp +2 −4 Original line number Diff line number Diff line Loading @@ -233,11 +233,9 @@ void Service::SetProcessAttributes() { PLOG(FATAL) << "setgid failed for " << name_; } } if (!supp_gids_.empty()) { if (setgroups(supp_gids_.size(), &supp_gids_[0]) != 0) { PLOG(FATAL) << "setgroups failed for " << name_; } } if (uid_) { if (setuid(uid_) != 0) { PLOG(FATAL) << "setuid failed for " << name_; Loading