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
Now the debugging output shows the tid of the crashed thread instead of
the pid of the process that crashed.
Change-Id: I637f409ff02d73d458edc6d1a5c462c21d128211
+ Add a new property, sys.init_log_level, which can be set after init
bootstrap. This will control the level at which init does prints to klog.
Change-Id: Ia15b2110157b5e6b713785ece9b0fb94889be6c8
+ Make prints of rc commands significantly more verbose. All commands
will log all arguments, file/line number of the command, return value,
and parent action which triggered the command.
init: command 'mount tmpfs tmpfs /mnt/obb mode=0755,gid=1000' action=init
status=0 (/init.rc:89)
init: command 'setprop net.tcp.default_init_rwnd 60' action=boot status=0
(/init.rc:403)
Change-Id: I5498c7258e4891706be4a12546df4231d14d86c4
We already do this for init, but had failed to do it for ueventd
and could not capture any logging from libselinux calls made by
ueventd.
Truly enabling non-error logging also requires uncommenting a line
in Android.mk:
LOCAL_CFLAGS += -DLOG_UEVENTS=1
which enables other logging and sets the default log level to INFO,
or otherwise changing the klog level in the ueventd code (is not
settable by init.rc loglevel).
Change-Id: I00e6f9d6271f2a21d9078c96368816d74d6d2850
Signed-off-by: Stephen Smalley <sds@tycho.nsa.gov>
This is a follow-up to commit 157b00171a.
After "fastboot reboot", "fastboot devices" was still showing the device as
connected even though it was starting to reboot; now "fastboot reboot" will
wait until the device has disconnected.
The wait timeout is 3 seconds.
Change-Id: I8066741f0be91e53f3e3f5bc968bc1b9de31db05