platform_bionic/libc/arch-x86
Nick Kralevich 2825f10b7f libc: Add O_PATH support for fgetxattr / fsetxattr
Support O_PATH file descriptors when handling fgetxattr and fsetxattr.
This avoids requiring file read access to pull extended attributes.

This is needed to support O_PATH file descriptors when calling
SELinux's fgetfilecon() call. In particular, this allows the querying
and setting of SELinux file context by using something like the following
code:

  int dirfd = open("/path/to/dir", O_DIRECTORY);
  int fd = openat(dirfd, "file", O_PATH | O_NOFOLLOW);
  char *context;
  fgetfilecon(fd, &context);

This change was motivated by a comment in
https://android-review.googlesource.com/#/c/152680/1/toys/posix/ls.c

Change-Id: Ic0cdf9f9dd0e35a63b44a4c4a08400020041eddf
2015-06-01 15:51:56 -07:00
..
atom Replace ambiguous cmp operator with cmpl. 2014-10-21 16:25:35 -07:00
bionic Fix addition of extra arg to cfi_restore. 2015-04-14 17:02:31 -07:00
generic Remove the unused swab.S. 2014-07-22 20:21:31 -07:00
include/machine Simplify our endian.h implementation. 2014-12-08 20:35:08 -08:00
silvermont Regenerate the bionic NOTICE files. 2014-07-07 15:42:06 -07:00
syscalls libc: Add O_PATH support for fgetxattr / fsetxattr 2015-06-01 15:51:56 -07:00
x86.mk Share LP32 makefile settings between arches 2015-02-04 17:35:49 -08:00