| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
| |
SELinux denies access to some files in /sys, so we can't just trawl
through that asserting general truths. Instead, create a small known
tree.
Sadly neither ftw nor nftw takes user callback data, otherwise it would
be nice to assert that we visit all the expected nodes.
Bug: 19252748
Change-Id: Ib5309c38aaef53e6030281191a265a8d5a619044
|
|
|
|
|
|
|
|
| |
When there is an error detected, the code runs forever and then times
out without any indication of what happened. Change it so that error
messages are printed and the test fails.
Change-Id: Id3160fc2f394984de0157356594fd8b40de66b4a
|
|
|
|
|
| |
Bug: 19220800
Change-Id: I4245b1270363544cd5f083fe7ea7d9b11b46cdc0
|
|\ |
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The two bugs are very closely related and code amount is very small,
So I think they may be fixed in one change.
Bug: 19128558
Bug: 19129994
Change-Id: I44a35398e64dfca7e9676428cb8f4026e8f6e488
|
|\ \
| | |
| | |
| | | |
test."
|
| |/
| |
| |
| |
| | |
Bug: 19220800
Change-Id: Ie75c640183c4a41a499556fefb4f824a134a5fb1
|
|\ \
| |/
|/| |
|
| |
| |
| |
| |
| | |
Bug: 19216648
Change-Id: I7b12955bdcad31c13bf8ec2740ff88ba15223ec0
|
|\ \ |
|
| |/
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Many libc functions have an option to not follow symbolic
links. This is useful to avoid security sensitive code
from inadvertantly following attacker supplied symlinks
and taking inappropriate action on files it shouldn't.
For example, open() has O_NOFOLLOW, chown() has
lchown(), stat() has lstat(), etc.
There is no such equivalent function for chmod(), such as lchmod().
To address this, POSIX introduced fchmodat(AT_SYMLINK_NOFOLLOW),
which is intended to provide a way to perform a chmod operation
which doesn't follow symlinks.
Currently, the Linux kernel doesn't implement AT_SYMLINK_NOFOLLOW.
In GLIBC, attempting to use the AT_SYMLINK_NOFOLLOW flag causes
fchmodat to return ENOTSUP. Details are in "man fchmodat".
Bionic currently differs from GLIBC in that AT_SYMLINK_NOFOLLOW
is silently ignored and treated as if the flag wasn't present.
This patch provides a userspace implementation of
AT_SYMLINK_NOFOLLOW for bionic. Using open(O_PATH | O_NOFOLLOW),
we can provide a way to atomically change the permissions on
files without worrying about race conditions.
As part of this change, we add support for fchmod on O_PATH
file descriptors, because it's relatively straight forward
and could be useful in the future.
The basic idea behind this implementation comes from
https://sourceware.org/bugzilla/show_bug.cgi?id=14578 , specifically
comment #10.
Change-Id: I1eba0cdb2c509d9193ceecf28f13118188a3cfa7
|
| |
| |
| |
| | |
Change-Id: I95291e2febf7b497c1d9f37fd7fa9acdd21e86a4
|
| |
| |
| |
| |
| |
| |
| | |
And remove the test for FD_ZERO fortification, which never made much
sense anyway.
Change-Id: Id1009c5298d461fa4722189e8ecaf22f0c529536
|
|/
|
|
| |
Change-Id: I4426d0c7c1bfe3b0028a674f72d1c3b9d883d6af
|
|
|
|
|
| |
Bug: 19130480
Change-Id: I0d3df70ee8f692581cc4b9b742c5f347259fd0d2
|
|\ |
|
| |
| |
| |
| |
| | |
Bug: 19130330
Change-Id: Id6a60570a8aab6ae7259ff228b3801285b378f77
|
|\ \
| |/
|/| |
|
| |
| |
| |
| | |
Change-Id: I17cc056b185755e0b91de096b5ceefee4f4e0b3a
|
|/
|
|
|
| |
Bug: 19109188.
Change-Id: Idfe769ac652bf37642da24e4abb6061ca861d57e
|
|\ |
|
| |
| |
| |
| |
| | |
Bug: 19109500
Change-Id: Ib18f90ad522e66ea62dd4e02e314585d9b36e15f
|
|\ \ |
|
| | |
| | |
| | |
| | |
| | | |
Bug: https://code.google.com/p/android/issues/detail?id=79170
Change-Id: Id91765fac45124545e2674a5b2c814707c1a448b
|
|/ /
| |
| |
| | |
Change-Id: If2fc97134340fd09ec2583b666ace2f673cbdf66
|
| |
| |
| |
| |
| |
| |
| |
| | |
gcov does writes after reads on the same stream, but the bulk read optimization
was clobbering the FILE _flags, causing fwrite to fail.
Bug: 19129055
Change-Id: I9650cb7de4bb173a706b502406266ed0d2b654d7
|
|\ \ |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Implement refcounter based data protection guard
to avoid unnecessary calls to mprotect when dlopen/dlclose
is called from a constructor.
Bug: 19124318
Big: 7941716
Change-Id: Id221b84ce75443094f99756dc9950b0a1dc87222
|
|/ /
| |
| |
| | |
Change-Id: Icc2ebf64bd1da1687bf313fe7a5640155c5795d8
|
| |
| |
| |
| | |
Change-Id: Iad70e6bd4cb7cec9e0ece500a540e4dadc83d92e
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Another sizeof/strlen screwup caused by trying to be too clever. Use
std::string instead.
Also fix all the ASSERT_STREQ calls in this file that had the arguments
the right^Wwrong way round. If I ever see Kent Beck...
Change-Id: I47a1bdfee99cf4e7bed9b398f3158a308fbcf1e8
|
|/
|
|
| |
Change-Id: I53a7f1428fd27c0b2a5c80f2e8af4845d17f5b4b
|
|
|
|
|
|
|
|
|
|
|
|
| |
The old __isthreaded hack was never very useful on Android because all user
code runs in a VM where there are lots of threads running. But __fsetlocking
lets a caller say "I'll worry about the locking for this FILE*", which is
useful for the normal case where you don't share a FILE* between threads
so you don't need any locking.
Bug: 17154740
Bug: 18593728
Change-Id: I2a8dddc29d3edff39a3d7d793387f2253608a68d
|
|\ |
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This makes us competitive with glibc for fully-buffered and unbuffered reads,
except in single-threaded situations where glibc avoids locking, but since
we're never really single-threaded anyway, that isn't a priority.
Bug: 18593728
Change-Id: Ib776bfba422ccf46209581fc0dc54f3567645b8f
|
| |
| |
| |
| |
| | |
Bug: 19075565
Change-Id: Icccb60657a2985e96abb1703673f0ebe2199586a
|
| |
| |
| |
| |
| | |
Bug: 17589740
Change-Id: I37f2d3fe72870b9dc867407fa1619c9a6fcd5cbb
|
|\ \
| |/
|/| |
|
| |
| |
| |
| |
| |
| | |
I almost fixed a non-bug. Add a test to prevent me from doing that.
Change-Id: I4a1dc13e603a7a377bdaee2e78132015087f7107
|
|\ \ |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
"ulimit -c xxx" command may run before bionic-unit-tests.
Make sure sys_resource test fails gently in that case.
Change-Id: Ic3b5ed8b20acba56df8c5ef082c88e5050e761aa
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
If pthread_detach() is called while the thread is in pthread_exit(),
it takes the risk that no one can free the pthread_internal_t.
So I add PTHREAD_ATTR_FLAG_ZOMBIE to detect this, maybe very rare, but
both glibc and netbsd libpthread have similar function.
Change-Id: Iaa15f651903b8ca07aaa7bd4de46ff14a2f93835
|
|\ \ \ |
|
| |/ /
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Fix bug of handling signal terminated tests.
Bug: 17589740
Bug: 18951146
Change-Id: I4803382b26cd5454693090202b3ba38e3dbe66e5
|
| |/
|/|
| |
| |
| |
| |
| | |
Addition change: make netdb_test pass on host.
Bug: 18791191
Change-Id: I7a9e29aa559ff6557288b47323d8a436379201a2
|
| |
| |
| |
| |
| | |
Bug: https://code.google.com/p/android/issues/detail?id=13228
Change-Id: I5e3b126d90d750a93ac0b8872198e50ba047e603
|
| |
| |
| |
| |
| | |
Bug: 18908062
Change-Id: I7037ac8273ebe54dd19b1561c7a376819049124c
|
|/
|
|
|
| |
Bug: 18069809
Change-Id: Ie143d56b0f8f03510dc451649291067e1add1d2f
|
|\ |
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
1. option to run each test in a separate forked process: "--isolate".
2. warnings about slow tests: "--warnline".
3. run multiple tests at the same time: "-j N".
Bug: 17589740
Change-Id: Ife5f4cafec43aa051ad7bd9c9b2b7e2e437db0de
|