commit | 6405c6953fa02d41d9f6377f4cdb947604f481c4 | [log] [tgz] |
---|---|---|
author | Nick Pelly <npelly@google.com> | Thu Jan 21 18:13:39 2010 -0800 |
committer | Nick Pelly <npelly@google.com> | Fri Jan 22 11:50:49 2010 -0800 |
tree | d0d1fa9a7c0bafbbdb74d5882e77b554bc544f3a | |
parent | 25eab084c5bc6b6ed68001b4f67ca405fc541fcb [diff] |
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