Elliott Hughes
2d082af4c6
am ea31751e: am aa916c8d: am c5999c1e: Merge "Clean up SEEK_SET definitions."
...
* commit 'ea31751e4b61adeaad1cf186b1774df4591012e2':
Clean up SEEK_SET definitions.
2015-02-03 02:00:45 +00:00
Elliott Hughes
ea31751e4b
am aa916c8d: am c5999c1e: Merge "Clean up SEEK_SET definitions."
...
* commit 'aa916c8db85b01389b929f060f232b3e06448e79':
Clean up SEEK_SET definitions.
2015-02-03 01:31:08 +00:00
Elliott Hughes
aa916c8db8
am c5999c1e: Merge "Clean up SEEK_SET definitions."
...
* commit 'c5999c1e0382c40286cc631c6a53e7781bc03154':
Clean up SEEK_SET definitions.
2015-02-03 01:25:23 +00:00
Elliott Hughes
c5999c1e03
Merge "Clean up SEEK_SET definitions."
2015-02-03 01:21:17 +00:00
Nick Kralevich
62b98b3ce6
am 4c8a50ba: am 0cb8abc6: am d80ec661: Merge "Add fchmodat(AT_SYMLINK_NOFOLLOW) and fchmod O_PATH support"
...
* commit '4c8a50ba5d966981f8d88e61e0975cd8532b9db5':
Add fchmodat(AT_SYMLINK_NOFOLLOW) and fchmod O_PATH support
2015-02-02 22:17:41 +00:00
Nick Kralevich
4c8a50ba5d
am 0cb8abc6: am d80ec661: Merge "Add fchmodat(AT_SYMLINK_NOFOLLOW) and fchmod O_PATH support"
...
* commit '0cb8abc6207d7484ecbc9698064c1f24b9b668d5':
Add fchmodat(AT_SYMLINK_NOFOLLOW) and fchmod O_PATH support
2015-02-02 22:10:53 +00:00
Nick Kralevich
0cb8abc620
am d80ec661: Merge "Add fchmodat(AT_SYMLINK_NOFOLLOW) and fchmod O_PATH support"
...
* commit 'd80ec66121b5af96c6b3d07ba34353b3d517f5b3':
Add fchmodat(AT_SYMLINK_NOFOLLOW) and fchmod O_PATH support
2015-02-02 22:07:35 +00:00
Nick Kralevich
d80ec66121
Merge "Add fchmodat(AT_SYMLINK_NOFOLLOW) and fchmod O_PATH support"
2015-02-02 22:03:41 +00:00
Elliott Hughes
1ed337dbdf
Clean up SEEK_SET definitions.
...
If we lose the #ifndef, the compiler will tell us if the definitions
of SEEK_SET and friends ever get out of sync.
Change-Id: I357cabec7c9cd451c604342344f210bba20fb6bc
2015-02-02 14:02:09 -08:00
Nick Kralevich
3cbc6c627f
Add fchmodat(AT_SYMLINK_NOFOLLOW) and fchmod O_PATH support
...
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
2015-02-02 13:17:17 -08:00
Elliott Hughes
f4911f19aa
am 671b7eb2: am 815fc9bc: am c57b5c50: Merge "Small logging cleanup."
...
* commit '671b7eb288df3816b108871b5349c79f86d23be8':
Small logging cleanup.
2015-02-02 21:14:14 +00:00
Elliott Hughes
671b7eb288
am 815fc9bc: am c57b5c50: Merge "Small logging cleanup."
...
* commit '815fc9bc9ecf96dd478c0800fdb9c4e9200320be':
Small logging cleanup.
2015-02-02 20:54:27 +00:00
Elliott Hughes
815fc9bc9e
am c57b5c50: Merge "Small logging cleanup."
...
* commit 'c57b5c5094f915ff975a256e086d58e2e7cfedf1':
Small logging cleanup.
2015-02-02 20:46:39 +00:00
Elliott Hughes
c57b5c5094
Merge "Small logging cleanup."
2015-02-02 20:36:29 +00:00
Elliott Hughes
42084a2653
Small logging cleanup.
...
Don't send the trailing NUL bytes to the logger, call strlen if we already
know the length, or cast more specifically than we need to.
Change-Id: I68c9388a22bddea49120a1022dda8db8991360c1
2015-02-02 12:24:46 -08:00
Elliott Hughes
e2ce66764c
am c8820e61: am 6c1252de: am 530aaecc: Merge "Explicitly check that the reason fortify tests abort is fortify."
...
* commit 'c8820e61d1b6eafb7aad2095c6a1c742cf31ee15':
Explicitly check that the reason fortify tests abort is fortify.
2015-02-02 19:55:05 +00:00
Elliott Hughes
c8820e61d1
am 6c1252de: am 530aaecc: Merge "Explicitly check that the reason fortify tests abort is fortify."
...
* commit '6c1252decba273087411cd9e480d0422eabec6ef':
Explicitly check that the reason fortify tests abort is fortify.
2015-02-02 19:40:41 +00:00
Elliott Hughes
6c1252decb
am 530aaecc: Merge "Explicitly check that the reason fortify tests abort is fortify."
...
* commit '530aaeccd875f708918f59cd5ff8b076c156adab':
Explicitly check that the reason fortify tests abort is fortify.
2015-02-02 19:32:44 +00:00
Elliott Hughes
af3ded9c8e
am 2e02769a: am 5f7819d6: am 7f0f30c6: Merge "Fix clang build."
...
* commit '2e02769aa145b6ca1890174b96be9bcd5cf33bc6':
Fix clang build.
2015-02-02 19:31:01 +00:00
Elliott Hughes
530aaeccd8
Merge "Explicitly check that the reason fortify tests abort is fortify."
2015-02-02 19:25:58 +00:00
Elliott Hughes
d036e94bb3
Explicitly check that the reason fortify tests abort is fortify.
...
Change-Id: I95291e2febf7b497c1d9f37fd7fa9acdd21e86a4
2015-02-02 11:18:58 -08:00
Elliott Hughes
2e02769aa1
am 5f7819d6: am 7f0f30c6: Merge "Fix clang build."
...
* commit '5f7819d6f1b2cb706d818e3083d45337e35d386b':
Fix clang build.
2015-02-02 18:50:43 +00:00
Elliott Hughes
5f7819d6f1
am 7f0f30c6: Merge "Fix clang build."
...
* commit '7f0f30c6e20c1bf04bec05077eef2d779e7a32df':
Fix clang build.
2015-02-02 18:36:22 +00:00
Elliott Hughes
7f0f30c6e2
Merge "Fix clang build."
2015-02-02 18:23:28 +00:00
Elliott Hughes
30fbf5f44c
Fix clang build.
...
Change-Id: I863137b5d35602267b4ef3a74399cf394c9994d6
2015-02-02 10:21:39 -08:00
Neil Fuller
677aea1bda
am 575bceb2: am 0a302e01: am d514d9bb: Merge "Fixes to the update-tzdata.py tool"
...
* commit '575bceb28190006eccfccb663100f0efb59838af':
Fixes to the update-tzdata.py tool
2015-02-02 18:10:11 +00:00
Elliott Hughes
4b48f637f4
am 5372b83e: am 20f2e4f7: am 5940f98a: Merge "Fortify poll and ppoll."
...
* commit '5372b83eab9d9e5bd6bec18a832858c9dd18c432':
Fortify poll and ppoll.
2015-02-02 18:10:10 +00:00
Neil Fuller
575bceb281
am 0a302e01: am d514d9bb: Merge "Fixes to the update-tzdata.py tool"
...
* commit '0a302e0174da4432da4a6ad5ce126dc27e4a86de':
Fixes to the update-tzdata.py tool
2015-02-02 18:03:11 +00:00
Elliott Hughes
5372b83eab
am 20f2e4f7: am 5940f98a: Merge "Fortify poll and ppoll."
...
* commit '20f2e4f7ad9d9f816be13f6509e602d4344a018d':
Fortify poll and ppoll.
2015-02-02 18:03:10 +00:00
Neil Fuller
0a302e0174
am d514d9bb: Merge "Fixes to the update-tzdata.py tool"
...
* commit 'd514d9bbae354da72fcb43349f0157378e52004d':
Fixes to the update-tzdata.py tool
2015-02-02 17:57:22 +00:00
Elliott Hughes
20f2e4f7ad
am 5940f98a: Merge "Fortify poll and ppoll."
...
* commit '5940f98a35d64f9ca249536bb8cdcdbfe43e9bc3':
Fortify poll and ppoll.
2015-02-02 17:57:21 +00:00
Neil Fuller
d514d9bbae
Merge "Fixes to the update-tzdata.py tool"
2015-02-02 17:52:48 +00:00
Elliott Hughes
5940f98a35
Merge "Fortify poll and ppoll."
2015-02-02 17:51:50 +00:00
Neil Fuller
0662c3e5b3
Fixes to the update-tzdata.py tool
...
We build one too many times. Creating a missing directory
is sufficient.
The tz2icu needs some files in the CWD. Added symlinks.
Bug: 19230091
Change-Id: I58f9817af68b229f48139e56503f50a2b6dbb4fe
2015-02-02 17:42:41 +00:00
Elliott Hughes
4674e3899a
Fortify poll and ppoll.
...
And remove the test for FD_ZERO fortification, which never made much
sense anyway.
Change-Id: Id1009c5298d461fa4722189e8ecaf22f0c529536
2015-02-02 09:15:19 -08:00
Elliott Hughes
e0277717f8
am a5d743a6: am 9843afd6: am ffbda83b: Merge "Add the fortify tests back into the glibc tests."
...
* commit 'a5d743a6bf44b4fdb7c9de469a75f825a1ffb6c2':
Add the fortify tests back into the glibc tests.
2015-02-02 06:40:36 +00:00
Elliott Hughes
a5d743a6bf
am 9843afd6: am ffbda83b: Merge "Add the fortify tests back into the glibc tests."
...
* commit '9843afd62982516974fdc3c4481d36007527825a':
Add the fortify tests back into the glibc tests.
2015-02-02 06:07:15 +00:00
Elliott Hughes
9843afd629
am ffbda83b: Merge "Add the fortify tests back into the glibc tests."
...
* commit 'ffbda83b302e3c3970135013d2bb92402e040fe5':
Add the fortify tests back into the glibc tests.
2015-02-02 06:01:10 +00:00
Elliott Hughes
ffbda83b30
Merge "Add the fortify tests back into the glibc tests."
2015-02-02 05:56:27 +00:00
Elliott Hughes
b6e3e800d2
Add the fortify tests back into the glibc tests.
...
Change-Id: I4426d0c7c1bfe3b0028a674f72d1c3b9d883d6af
2015-01-31 21:32:10 -08:00
Elliott Hughes
c5152a5217
am 9b96dd6b: am d2d63740: am 21cdd22f: Merge "Include <malloc.h> for struct mallinfo."
...
* commit '9b96dd6b173a8d5752ddfd1e9179b141aca0c58c':
Include <malloc.h> for struct mallinfo.
2015-01-31 08:34:02 +00:00
Elliott Hughes
74c5abbd5d
am a26423f2: am fd10c019: am 09c33824: Merge "Break two incorrect transitive includes."
...
* commit 'a26423f22c3d92d7944e7e1706d3a347db78baf3':
Break two incorrect transitive includes.
2015-01-31 08:34:01 +00:00
Elliott Hughes
9b96dd6b17
am d2d63740: am 21cdd22f: Merge "Include <malloc.h> for struct mallinfo."
...
* commit 'd2d63740b78459a414e293efdb16e7a9ac089d5c':
Include <malloc.h> for struct mallinfo.
2015-01-31 07:49:25 +00:00
Elliott Hughes
a26423f22c
am fd10c019: am 09c33824: Merge "Break two incorrect transitive includes."
...
* commit 'fd10c019fab50c06f391b6a765b0904ce477d3b7':
Break two incorrect transitive includes.
2015-01-31 07:49:24 +00:00
Elliott Hughes
d2d63740b7
am 21cdd22f: Merge "Include <malloc.h> for struct mallinfo."
...
* commit '21cdd22f035efd50902b7780fc6ea53bd1684357':
Include <malloc.h> for struct mallinfo.
2015-01-31 06:21:34 +00:00
Elliott Hughes
fd10c019fa
am 09c33824: Merge "Break two incorrect transitive includes."
...
* commit '09c3382433ae94ada45780312a2a9fd082ad1478':
Break two incorrect transitive includes.
2015-01-31 06:21:33 +00:00
Elliott Hughes
21cdd22f03
Merge "Include <malloc.h> for struct mallinfo."
2015-01-31 04:37:11 +00:00
Elliott Hughes
cb0e70389e
Include <malloc.h> for struct mallinfo.
...
GCC doesn't seem to care, but clang does.
Change-Id: I9884820339a9e6f142862928c357f1a538184ae0
2015-01-30 20:33:31 -08:00
Elliott Hughes
09c3382433
Merge "Break two incorrect transitive includes."
2015-01-31 04:18:10 +00:00
Dan Albert
2fde9c03db
am 3c68e194: am 18dd2f3b: am 94335cc8: Merge "Put back inline definitions if using an old API."
...
* commit '3c68e1946ae61fc0bbd18c718d9be441f4d3c350':
Put back inline definitions if using an old API.
2015-01-30 21:28:05 +00:00