For Linux, the USB code was only looking at the first
descriptor when searching for the fastboot interface
which caused some devices to not be found.
Also clarify some code by using the actual USB structures
instead of void or char pointers.
Change-Id: I9e4871c4d477ac10ba75bb17a955f176809af289
Signed-off-by: Patrick Tjin <pattjin@google.com>
The init process allows environment variables to be specified in
the rc script globally, via 'export', and for a specific process,
via the 'setenv' option.
However, the mechanism for assembling the environment simply
appended the new variable without checking whether it was already
defined, so it was not possible to overwrite an existing entry.
This patch fixes that behaviour.
Limitations and concerns:
The limit of a maximum number of 31 variables is unchanged.
Currently, most callers of "add_environment" do not check the return
value, but the function now logs the failure rather than failing
silently.
Change-Id: Ie9a68c37a0f55c5b40e904e695cd35514f67f480
There's no good reason to separate "fill the integer registers with
recognizable patterns and crash" from "fill the FP registers with recognizable
patterns and crash".
Also remove the incorrect use of ARCH_ARM_HAVE_VFP_D32 rather than try to fix
it.
Change-Id: I3a4a3aca1575de5489314027ae52168997404d79
Make sure all files / directories within /cache are properly
labeled, not just the directory itself.
Addresses the following denial:
type=1400 audit(0.0:26): avc: denied { getattr } for comm="Thread-85" path="/cache/lost+found" dev="mmcblk0p27" ino=11 scontext=u:r:untrusted_app:s0 tcontext=u:object_r:unlabeled:s0 tclass=dir
Change-Id: I5937b30043efeb696ffaa77258b7294d20d1494e
Currently, the fixup code in fixup_sys_perms() scans through all
entries in uevent*.rc. If it finds a match, then it performs a fixup.
If there's no match in that file, no fixup is performed.
SELinux file labels are independently stored in /file_contexts,
with no relationship to the files in /ueventd.rc. Even when no
entries exist in ueventd.rc, we still want to fixup the SELinux
file label in /sys when a uevent message occurs.
Change-Id: I0ccb5395ec0be9282095b844a5022e8c0d8903ac
For a file the FUSE fh is a struct handle containing an int fd;
for a directory it's a struct dirhandle containing a DIR*. Fix
handle_fsync to extract the file descriptor appropriately in
both cases.
Bug: 14613980
Change-Id: I45515cff6638e27a99b849e6fc639d355dbb4d27
Maps output now displays fault address location more intelligently. If
the fault is not in a mapped region, it now shows where that address is
with respect to the other maps.
In addition, the size of the map is now printed as part of the output.
Also, crasher now supports an "mmap" option which mmaps/munmaps a region
of memory and then attempts to access it, causing a fault address in
between mapped regions that can be used to test that new part of the
maps output.
Change-Id: Ia5e1926802bdfcbbdb7857e3631ddf395ae0c5b8
This may require changes to other code, such as fastbootd, which relies on this
service. sshd is not currently, used, however, so this change will force any
such code to be changed.
Bug: 11594902
Change-Id: I07e52008290dab5825be2ad062cbe730fa7dff71
Socket file descriptors remain open across exec unless
SOCK_CLOEXEC is set. Enable this option, to avoid leaking
file descriptors.
See https://android-review.googlesource.com/53736 for a similar
problem with the old logging code.
Change-Id: I9e045d2291ae6680044ab86604f3ff2c55b5eaed
Implement LOG_EVENT_STRING, so that native code can create new
event log entries. This is needed to support logging SELinux denials
to the event log.
Change-Id: I6a269a832bc2f5e5da6c9dbd169ed2f901b49166
At present, charging animation runs irrespective of whether charger
is connected or not. When the charger is disconnected, device not shutdown
for 10secs. Charging animation during this period should be avoided.
Change-Id: Idf8e6a11261aec2812f1ebbbdec1bd1ad769565e
Signed-off-by: Pavan Kumar S <pavan.kumar.s@intel.com>
Signed-off-by: Jenny TC <jenny.tc@intel.com>
Signed-off-by: Yong Yao <yong.yao@intel.com>
Glibc declares unused fields as __unused and so a #define for __unused causes
issues when we built against glibc on the host. Rename __unused to __UNUSED as
a workaround.
This fixed checkbuild for 64-bit host builds. Bug: 13751317
Change-Id: Ic2cd52518c16661497cc819cb3fd7f1fa5c6f0fb