diff options
Diffstat (limited to 'init')
-rw-r--r-- | init/builtins.c | 8 | ||||
-rw-r--r-- | init/devices.c | 3 | ||||
-rwxr-xr-x | init/property_service.c | 2 | ||||
-rw-r--r-- | init/signal_handler.c | 4 |
4 files changed, 13 insertions, 4 deletions
diff --git a/init/builtins.c b/init/builtins.c index da41b89..bb963c1 100644 --- a/init/builtins.c +++ b/init/builtins.c @@ -322,6 +322,14 @@ int do_mkdir(int nargs, char **args) if (_chown(args[1], uid, gid) < 0) { return -errno; } + + /* chown may have cleared S_ISUID and S_ISGID, chmod again */ + if (mode & (S_ISUID | S_ISGID)) { + ret = _chmod(args[1], mode); + if (ret == -1) { + return -errno; + } + } } return 0; diff --git a/init/devices.c b/init/devices.c index 4ffc885..c30303f 100644 --- a/init/devices.c +++ b/init/devices.c @@ -600,6 +600,9 @@ static void handle_generic_device_event(struct uevent *uevent) } else if (!strncmp(uevent->subsystem, "graphics", 8)) { base = "/dev/graphics/"; make_dir(base, 0755); + } else if (!strncmp(uevent->subsystem, "drm", 3)) { + base = "/dev/dri/"; + make_dir(base, 0755); } else if (!strncmp(uevent->subsystem, "oncrpc", 6)) { base = "/dev/oncrpc/"; make_dir(base, 0755); diff --git a/init/property_service.c b/init/property_service.c index 5eb0a8a..c378aeb 100755 --- a/init/property_service.c +++ b/init/property_service.c @@ -81,7 +81,7 @@ struct { { "sys.", AID_SYSTEM, 0 }, { "service.", AID_SYSTEM, 0 }, { "wlan.", AID_SYSTEM, 0 }, - { "bluetooth.", AID_SYSTEM, 0 }, + { "bluetooth.", AID_BLUETOOTH, 0 }, { "dhcp.", AID_SYSTEM, 0 }, { "dhcp.", AID_DHCP, 0 }, { "debug.", AID_SYSTEM, 0 }, diff --git a/init/signal_handler.c b/init/signal_handler.c index b170132..abccb40 100644 --- a/init/signal_handler.c +++ b/init/signal_handler.c @@ -131,11 +131,9 @@ void signal_init(void) int s[2]; struct sigaction act; - + memset(&act, 0, sizeof(act)); act.sa_handler = sigchld_handler; act.sa_flags = SA_NOCLDSTOP; - act.sa_mask = 0; - act.sa_restorer = NULL; sigaction(SIGCHLD, &act, 0); /* create a signalling mechanism for the sigchld handler */ |