13829 Commits

Author SHA1 Message Date
Christopher Ferris
99491a2988 am 21ddfa23: am e6c7e294: am f8eec1e5: Merge "Allow wildcards to match arg values."
* commit '21ddfa23f67cd0a9db7eff0c8a4ada5df1931f15':
  Allow wildcards to match arg values.
2015-02-26 04:04:42 +00:00
Yabin Cui
76f0031e4d am 8a661472: am 00ba42b9: am 7355d29b: Merge "Make getgrent deprecated."
* commit '8a6614726802170a19e5e68543a06117596def06':
  Make getgrent deprecated.
2015-02-26 04:04:41 +00:00
Christopher Ferris
21ddfa23f6 am e6c7e294: am f8eec1e5: Merge "Allow wildcards to match arg values."
* commit 'e6c7e294820a3b6c3569decad57d29eac31254b3':
  Allow wildcards to match arg values.
2015-02-26 03:58:38 +00:00
Yabin Cui
8a66147268 am 00ba42b9: am 7355d29b: Merge "Make getgrent deprecated."
* commit '00ba42b9f509baa706c93f648c8ad7c84c89d6d0':
  Make getgrent deprecated.
2015-02-26 03:58:37 +00:00
Christopher Ferris
e6c7e29482 am f8eec1e5: Merge "Allow wildcards to match arg values."
* commit 'f8eec1e54fbfb7b0304b73cb9ce2de44760a672e':
  Allow wildcards to match arg values.
2015-02-26 03:52:35 +00:00
Yabin Cui
00ba42b9f5 am 7355d29b: Merge "Make getgrent deprecated."
* commit '7355d29bbd106bd4ab3f5be1b743fb73e8c3b4da':
  Make getgrent deprecated.
2015-02-26 03:52:34 +00:00
Christopher Ferris
f8eec1e54f Merge "Allow wildcards to match arg values." 2015-02-26 03:47:12 +00:00
Yabin Cui
7355d29bbd Merge "Make getgrent deprecated." 2015-02-26 03:46:41 +00:00
Yabin Cui
d2f0f768e5 am 0a2db6e2: am 253fcfe7: am 398ef152: Merge "Move endpwent to ndk_cruft.cpp."
* commit '0a2db6e26f3a605df3d6c62e90b86b894be6f64b':
  Move endpwent to ndk_cruft.cpp.
2015-02-26 03:06:26 +00:00
Yabin Cui
072a326231 am f244b6d6: am fbff0fd5: am f1b4a5d5: Merge "Make tempnam/mktemp deprecated."
* commit 'f244b6d6920bdc9e7d2b597b0ac790759b603f72':
  Make tempnam/mktemp deprecated.
2015-02-26 03:06:24 +00:00
Yabin Cui
b8b5a72f41 Make getgrent deprecated.
Bug: 19340053
Change-Id: Ie8b97f840d9e87555e6a3d591fc87bc08c2d6820
2015-02-25 19:05:37 -08:00
Yabin Cui
0a2db6e26f am 253fcfe7: am 398ef152: Merge "Move endpwent to ndk_cruft.cpp."
* commit '253fcfe70e1bb87ca66e2886d90f6906e8d27f12':
  Move endpwent to ndk_cruft.cpp.
2015-02-26 02:58:56 +00:00
Yabin Cui
f244b6d692 am fbff0fd5: am f1b4a5d5: Merge "Make tempnam/mktemp deprecated."
* commit 'fbff0fd516a5d6499b3417eb194b0631ae50094a':
  Make tempnam/mktemp deprecated.
2015-02-26 02:58:50 +00:00
Yabin Cui
253fcfe70e am 398ef152: Merge "Move endpwent to ndk_cruft.cpp."
* commit '398ef152d50854fccb21086e30b5cc24641b3e2a':
  Move endpwent to ndk_cruft.cpp.
2015-02-26 02:52:36 +00:00
Yabin Cui
fbff0fd516 am f1b4a5d5: Merge "Make tempnam/mktemp deprecated."
* commit 'f1b4a5d510c693d7cffc76cade9ab049f7dfed07':
  Make tempnam/mktemp deprecated.
2015-02-26 02:52:35 +00:00
Yabin Cui
398ef152d5 Merge "Move endpwent to ndk_cruft.cpp." 2015-02-26 02:23:08 +00:00
Yabin Cui
f1b4a5d510 Merge "Make tempnam/mktemp deprecated." 2015-02-26 02:17:17 +00:00
Yabin Cui
9b4f77f5cf Make tempnam/mktemp deprecated.
Bug: 19340053
Change-Id: Ib02c65814ef97cd1758fd8142b73736cc8bc1700
2015-02-25 15:42:01 -08:00
Yabin Cui
52d7f1a94f Move endpwent to ndk_cruft.cpp.
Bug: 19109159
Change-Id: I3683a247643006ea6d6bcf3845f57d1908d457d7
2015-02-25 14:58:08 -08:00
Christopher Ferris
339ac378ca Allow wildcards to match arg values.
Change-Id: I38230b500bb8f8f69af0d7c740855a401cd12898
2015-02-25 14:56:32 -08:00
Yabin Cui
b448acfdba am 561d57a2: am f5d4f322: am 448a8596: Merge "Switch system_properties.cpp from bionic atomic operations to stdatomic."
* commit '561d57a246179d7148781eea4659fa960e93df02':
  Switch system_properties.cpp from bionic atomic operations to stdatomic.
2015-02-25 21:21:25 +00:00
Yabin Cui
561d57a246 am f5d4f322: am 448a8596: Merge "Switch system_properties.cpp from bionic atomic operations to stdatomic."
* commit 'f5d4f322bbea9e5a5a1ec4025a0289123c667e5f':
  Switch system_properties.cpp from bionic atomic operations to stdatomic.
2015-02-25 21:14:44 +00:00
Yabin Cui
f5d4f322bb am 448a8596: Merge "Switch system_properties.cpp from bionic atomic operations to stdatomic."
* commit '448a85968da1e4622e829bb48fd888a38f9f6c49':
  Switch system_properties.cpp from bionic atomic operations to stdatomic.
2015-02-25 21:10:42 +00:00
Yabin Cui
448a85968d Merge "Switch system_properties.cpp from bionic atomic operations to stdatomic." 2015-02-25 21:04:56 +00:00
Yabin Cui
baeac9b294 am e4093959: am a1e4a4a3: am 8c41eae6: Merge "Move getusershell/endusershell/setusershell to ndk_cruft.cpp."
* commit 'e4093959c06ee37f28461a460f553882eb010c4f':
  Move getusershell/endusershell/setusershell to ndk_cruft.cpp.
2015-02-25 17:04:56 +00:00
Yabin Cui
2955985437 am d16844ab: am 4600bdac: am af3ba5c8: Merge "Make all output of child test go to parent process in gtest_main."
* commit 'd16844abcea1cc50a64694367d6571c084c6a745':
  Make all output of child test go to parent process in gtest_main.
2015-02-25 17:04:55 +00:00
Nick Kralevich
328ab034c2 am fccf68ac: am e93bc6bb: am d91ded81: Merge "Fix "faccessat ignores flags""
* commit 'fccf68ace95348338e8b19afd6101581588a4f83':
  Fix "faccessat ignores flags"
2015-02-25 17:04:53 +00:00
Yabin Cui
e4093959c0 am a1e4a4a3: am 8c41eae6: Merge "Move getusershell/endusershell/setusershell to ndk_cruft.cpp."
* commit 'a1e4a4a3c68fc99958cc7a6e6fb7fed58feeaae8':
  Move getusershell/endusershell/setusershell to ndk_cruft.cpp.
2015-02-25 16:52:39 +00:00
Yabin Cui
d16844abce am 4600bdac: am af3ba5c8: Merge "Make all output of child test go to parent process in gtest_main."
* commit '4600bdac709969408ac446507d85881db55b0ca7':
  Make all output of child test go to parent process in gtest_main.
2015-02-25 16:52:35 +00:00
Nick Kralevich
fccf68ace9 am e93bc6bb: am d91ded81: Merge "Fix "faccessat ignores flags""
* commit 'e93bc6bbe8ce180187e3914d0a7494cfe84f6255':
  Fix "faccessat ignores flags"
2015-02-25 16:52:22 +00:00
Yabin Cui
a1e4a4a3c6 am 8c41eae6: Merge "Move getusershell/endusershell/setusershell to ndk_cruft.cpp."
* commit '8c41eae6fcdb6cad1f6c46ae01708ead6b734060':
  Move getusershell/endusershell/setusershell to ndk_cruft.cpp.
2015-02-25 00:05:52 +00:00
Yabin Cui
8c41eae6fc Merge "Move getusershell/endusershell/setusershell to ndk_cruft.cpp." 2015-02-25 00:00:51 +00:00
Yabin Cui
4600bdac70 am af3ba5c8: Merge "Make all output of child test go to parent process in gtest_main."
* commit 'af3ba5c87319e19c10be6755b37af92521f702c2':
  Make all output of child test go to parent process in gtest_main.
2015-02-24 23:48:02 +00:00
Yabin Cui
af3ba5c873 Merge "Make all output of child test go to parent process in gtest_main." 2015-02-24 23:40:31 +00:00
Yabin Cui
7fb680bfda Move getusershell/endusershell/setusershell to ndk_cruft.cpp.
Bug: 19108648
Change-Id: I65134040345398dde612c4325d902db58f3bd2be
2015-02-24 14:46:59 -08:00
Yabin Cui
ea9c933f36 Make all output of child test go to parent process in gtest_main.
Change-Id: Iad460e89755051cdb99593cbf42c97d9a359f32b
2015-02-24 14:44:51 -08:00
Nick Kralevich
e93bc6bbe8 am d91ded81: Merge "Fix "faccessat ignores flags""
* commit 'd91ded81376a10a1c89f7a5ae3c462ae3b24188e':
  Fix "faccessat ignores flags"
2015-02-24 21:52:36 +00:00
Nick Kralevich
d91ded8137 Merge "Fix "faccessat ignores flags"" 2015-02-24 21:49:09 +00:00
Nick Kralevich
35778253a5 Fix "faccessat ignores flags"
The kernel system call faccessat() does not have any flags arguments,
so passing flags to the kernel is currently ignored.

Fix the kernel system call so that no flags argument is passed in.

Ensure that we don't support AT_SYMLINK_NOFOLLOW. This non-POSIX
(http://pubs.opengroup.org/onlinepubs/9699919799/functions/access.html)
flag is a glibc extension, and has non-intuitive, error prone behavior.

For example, consider the following code:

  symlink("foo.is.dangling", "foo");
  if (faccessat(AT_FDCWD, "foo", R_OK, AT_SYMLINK_NOFOLLOW) == 0) {
    int fd = openat(AT_FDCWD, "foo", O_RDONLY | O_NOFOLLOW);
  }

The faccessat() call in glibc will return true, but an attempt to
open the dangling symlink will end up failing. GLIBC documents this
as returning the access mode of the symlink itself, which will
always return true for any symlink on Linux.

Some further discussions of this are at:

  * http://lists.landley.net/pipermail/toybox-landley.net/2014-September/003617.html
  * http://permalink.gmane.org/gmane.linux.lib.musl.general/6952

AT_SYMLINK_NOFOLLOW seems broken by design. I suspect this is why this
function was never added to POSIX. (note that "access" is pretty much
broken by design too, since it introduces a race condition between
check and action). We shouldn't support this until it's clearly
documented by POSIX or we can have it produce intuitive results.

Don't support AT_EACCESS for now. Implementing it is complicated, and
pretty much useless on Android, since we don't have setuid binaries.
See http://git.musl-libc.org/cgit/musl/commit/?id=0a05eace163cee9b08571d2ff9d90f5e82d9c228
for how an implementation might look.

Bug: 18867827
Change-Id: I25b86c5020f3152ffa3ac3047f6c4152908d0e04
2015-02-24 13:40:43 -08:00
Yabin Cui
b8ce474217 Switch system_properties.cpp from bionic atomic operations to stdatomic.
Bug: 17177189
Change-Id: I42e05ad1c490cc7a8040138151afc0ee72a9b63f
2015-02-24 10:41:53 -08:00
Elliott Hughes
df93bc50fc am 549aab61: am 4ec60a01: am 2aef607b: Merge "Fix dup2 in the case where the two fds are equal."
* commit '549aab610a36b696a4586e33c4b709a29a668c1a':
  Fix dup2 in the case where the two fds are equal.
2015-02-24 06:06:43 +00:00
Elliott Hughes
549aab610a am 4ec60a01: am 2aef607b: Merge "Fix dup2 in the case where the two fds are equal."
* commit '4ec60a017859b39d490cfeb089ed30da09863def':
  Fix dup2 in the case where the two fds are equal.
2015-02-24 06:03:02 +00:00
Elliott Hughes
4ec60a0178 am 2aef607b: Merge "Fix dup2 in the case where the two fds are equal."
* commit '2aef607b25c463baed5ae70d14212e24ea7bcf2b':
  Fix dup2 in the case where the two fds are equal.
2015-02-24 05:59:52 +00:00
Elliott Hughes
2aef607b25 Merge "Fix dup2 in the case where the two fds are equal." 2015-02-24 05:55:37 +00:00
Elliott Hughes
be52e65817 Fix dup2 in the case where the two fds are equal.
dup3's behavior differs from dup2 in this case, so we need to paper
over that in the C library.

Change-Id: I313cd6f226db5e237f61866f324c5ecdd12bf762
2015-02-23 21:52:56 -08:00
Elliott Hughes
7d85c81f31 am aced654f: am 491c09e0: am 393bdb15: Merge "Add RLIM_SAVED_CUR and RLIM_SAVED_MAX."
* commit 'aced654f583682074db54b10706511453a7521da':
  Add RLIM_SAVED_CUR and RLIM_SAVED_MAX.
2015-02-24 04:54:26 +00:00
Elliott Hughes
aced654f58 am 491c09e0: am 393bdb15: Merge "Add RLIM_SAVED_CUR and RLIM_SAVED_MAX."
* commit '491c09e0d5921edd57da2efb0c8ed4f32df93fe2':
  Add RLIM_SAVED_CUR and RLIM_SAVED_MAX.
2015-02-23 22:52:54 +00:00
Elliott Hughes
491c09e0d5 am 393bdb15: Merge "Add RLIM_SAVED_CUR and RLIM_SAVED_MAX."
* commit '393bdb156d5024a03f03425a977d0518c84dbb98':
  Add RLIM_SAVED_CUR and RLIM_SAVED_MAX.
2015-02-23 22:45:14 +00:00
Elliott Hughes
393bdb156d Merge "Add RLIM_SAVED_CUR and RLIM_SAVED_MAX." 2015-02-23 22:36:06 +00:00
Elliott Hughes
6af62e0d50 Add RLIM_SAVED_CUR and RLIM_SAVED_MAX.
Change-Id: Ia6be76460bfcf852832325c5f36cb272f49a4b87
2015-02-23 13:41:40 -08:00