Clean fix for the chown race condition on new input devices.

Drop init's egid to AID_INPUT while creating the device node, so that it is
created with the correct gid. This eliminates the
possibility of system_server opening the device node before its permissions
are set correctly.

Using setegid() allows us to swap back to AID_ROOT immediately after mknod().

Bug: 2375632
1 file changed