It doesn't make any sense for the C library to contain private stuff
that's only used by toolbox. Rather than move that stuff out of bionic
and into here, let's just use the same MD5 implementation the rest of
the system's using.
Change-Id: Ia1c73164124094b532af3453b90c4bd1ebfdaa24
Allow us to easily identify the 32/64 bitness of the process. Yes, I
know this is not technically an ABI, but it seemed close enough!
Change-Id: Ia03a17fd74d61e7619911cb26b3dd7d82b62930c
- Deal with some signedness issues
- Deal with some size issues
- Deal with NULL pointer issues
- Deal with some -Wunused issues
Change-Id: I1479dd90d690084491bae3475f2c547833519a57
Would've been nice if we could use the sys property
observer to start and stop all services in a service
class but service classes do not appear to be fully
supported.
Change-Id: Iaf17a2dbcf913c4c646bc1e8e13adee9f952c45e
Patch for https://code.google.com/p/android/issues/detail?id=68268
A length check for the argv[2] was added in order to prevent buffer
overflow. Also replace strcpy with strlcpy.
Signed-off-by: nks <nks@sixserv.org>
Change-Id: If65b83e9b658315c672e684f64e3ae00e69fac31
uid_from_user doesn't need to cope with numeric ids in the BSD code
like it did with the old Android code; the caller now handles those.
Also explain what SUPPORT_DOT is for.
Change-Id: I185c9f02b7039795069aa30545563b8a6ef54cd5
This depends on change I137588013ed1750315702c0dbe088ce3e4a29e83.
Change-Id: I5a4fef9affd6cddf98d72dc9d54899be25741779
Signed-off-by: Stephen Smalley <sds@tycho.nsa.gov>
libselinux selinux_android_restorecon API is changing to the more
general interface with flags and dropping the older variants.
Also get rid of the old, no longer used selinux_android_setfilecon API
and rename selinux_android_setfilecon2 to it as it is the only API in use.
Change-Id: I1e71ec398ccdc24cac4ec76f1b858d0f680f4925
Signed-off-by: Stephen Smalley <sds@tycho.nsa.gov>
Extend the libselinux restorecon implementation to allow reuse
by the toolbox restorecon command. This simply requires adding
support for the nochange (-n) and verbose (-v) options to the
libselinux functions and rewriting the toolbox restorecon command
to use the libselinux functions. Also add a force (-F) option to
support forcing a restorecon_recursive even if the restorecon_last
attribute matches the current file_contexts hash so that we can
continue to force a restorecon via the toolbox command for testing
or when we know something else has changed (e.g. for when we support
relabeling /data/data and package information has changed).
Change-Id: I92bb3259790a7195ba56a5e9555c3b6c76ceb862
Signed-off-by: Stephen Smalley <sds@tycho.nsa.gov>
This cleans up most of the size-related problems in system/core.
There are still a few changes needed for a clean 64-bit build,
but they look like they might require changes to things like the
fastboot protocol.
Change-Id: I1560425a289fa158e13e2e3173cc3e71976f92c0
Use ssize_t for handling the result of a readlink call.
Fix the following compiler warning:
system/core/toolbox/ls.c: In function 'listfile_maclabel':
system/core/toolbox/ls.c:238:68: warning: unused parameter 'flags' [-Wunused-parameter]
static int listfile_maclabel(const char *path, struct stat *s, int flags)
Change-Id: Idd65f3349fb9dfb6f7a374c81f72d3169af33505
Increase the size of the user/group buffer from 16 bytes
to 32 bytes. Some OEMs are creating usernames longer than
15 bytes, causing problems.
Use bounds checking functions when handling user/group
data, to avoid overflowing buffers.
Change-Id: I4a5824b819b0c37662ba4f33573af0d0e071b444
Move the liblog headers to log/ instead of cutils/ to complete
the separation of libcutils and liblog. cutils/log.h still
exists and includes log/log.h in order to support the many existing
modules that use cutils/log.h.
Change-Id: I2758c9f4aedcb809ca7ba8383d0f55041dd44345