Needed for cases where something should be constexpr if possible, but
not being constexpr is fine if in pre-C++11 code (such as a const
static float member variable).
Bug: 18466763
Change-Id: I635d062575ba2fbc4cbe3a89f730128c404d95e1
use asprintf to dynamically allocate filename buffer
rather than just reserving 512 bytes on the stack to
avoid potential overflow.
Change-Id: Ieeb9c6c2e5f97a9574f8128d84eba0b8efdb7263
The previous implementation returned the path the executable was in instead
of returning the path including the executable (i.e. it returned ...bin
instead of ...bin/executable). This is not what the original methods did
and caused the process forking of adb to fail.
This patch corrects the implementation.
Change-Id: Ib58497cab35706041f170c1bc97c31fd5d965f90
It's time we switched to blacklisting any problematic devices rather than
slowly whitelisting the entire world. This seems to work for me, but let's
see how other people get on before coming back to actually remove the list.
We'll also need to find a Mac to test the equivalent Mac change.
Change-Id: I2bf583a27f9a3f98ef006ea62b906a4f89960507
Impose a limit of 20 selinux denials per second. Denials beyond
that point don't add any value, and have the potential to cause
crashes or denial of service attacks.
Do some other misc cleanup while I'm here.
Bug: 18341932
(cherry picked from commit c234a1b879)
Change-Id: Ic5c96003db82e504baf301e87be5c8c539c73c2a
Impose a limit of 20 selinux denials per second. Denials beyond
that point don't add any value, and have the potential to cause
crashes or denial of service attacks.
Do some other misc cleanup while I'm here.
Bug: 18341932
Change-Id: I6125d629ae4d6ae131d2e53bfa41e1f50277d402
Recent versions of XCode fail to compile the adb and fastboot binaries due to
two functions being deprecated in 10.9 (GetCurrentProcess and
ProcessInformationCopyDictionary), and the use of -Werrror.
This patch replaces the method implementations which use calls to methods
deprecated in the 10.9 SDK with versions which only call non-deprecated methods.
Change-Id: I855bf26aff45093ca9022924f3ecd1b80f2305a8
Currently, mkdirAndChown takes parameters for mode, uid and gid, but
ignores them and hardcodes 0750, AID_SYSTEM, AID_SYSTEM instead.
This doesn't matter much because so far its only invocation passes
exactly those values as parameters -- but clang complains about unused
parameters.
Might as well make the function do what it claims to do.
Change-Id: I5a8056be3278a0c5d0a576dbc061288aa0956a35
Signed-off-by: Bernhard Rosenkränzer <Bernhard.Rosenkranzer@linaro.org>
This means that code that uses libcutils no longer has to ensure that
it's set ANDROID_SMP in the calling code's Android.mk for this to
function correctly.
Change-Id: I80c7ff170cd621106f34d6b74689d6b4f03e4eb7