diff options
author | Nick Kralevich <nnk@google.com> | 2016-02-24 15:50:52 -0800 |
---|---|---|
committer | Nick Kralevich <nnk@google.com> | 2016-02-24 15:50:52 -0800 |
commit | ab5629c197ae278992039a9685df047fe34232b8 (patch) | |
tree | b9a7cb3cb0f5f442a3e597459dcd069a472ea870 /libutils/Unicode.cpp | |
parent | b236ff71562ab93a5474831edb9c8dced309ea74 (diff) |
init: harden socket creation against symlinks
Instead of using chown, use the symlink safe lchown.
Instead of using chmod, use the symlink safe fchmodat
with AT_SYMLINK_NOFOLLOW.
Fix a bug where the SELinux filesystem creation context may
not be restored, and some memory not freed, if bind() fails.
Check the return values from the chown/chmod calls and unlink
the files if it ever fails.
Bug: 27337831
Change-Id: I3343786f5a4eefda7bbb8317f2eca16bd21003c0
Diffstat (limited to 'libutils/Unicode.cpp')
0 files changed, 0 insertions, 0 deletions