summaryrefslogtreecommitdiffstats
path: root/cmds/servicemanager
Commit message (Collapse)AuthorAgeFilesLines
* service_manager: reorder permission checks for findNick Kralevich2015-03-051-16/+14
| | | | | | | | | | | | | | | | | Reorder the find permission checks. This avoids generating misleading SELinux denials when a service doesn't exist, or when a service is prohibited to isolated apps. The original reason for structuring the code this way is explained in https://android-review.googlesource.com/#/c/100530/4/cmds/servicemanager/service_manager.c@172 The concern at the time was to avoid leaking a situation where a caller could probe for the existance of a service. This turns out to be unnecessary. The same return value is used for both a permission denied and a service not found. The only side effect is the generation of an SELinux audit log, which likely won't be accessible to the calling application. Change-Id: I9760e1821ed16102fa5f9bec07f8c34944565be9
* Add missing includes.Elliott Hughes2015-01-292-0/+2
| | | | Change-Id: I1dad32ab459c25063a70cf52100a29d00fea3a90
* Add MAC for remaining service_manager functionality.Riley Spahn2014-07-141-35/+75
| | | | | | | | | Add SELinux MAC for the list and find functionality to service_manager. By default the list action uses the service_manager_type attribute as its target object. Change-Id: I7630f21a9f3232ae3d6d8b9a1119230b40899aef
* service_manager: check binder passed lengthsNick Kralevich2014-07-121-13/+29
| | | | | | | | | | 1) Pass length through to str8 function. 2) Fix implicit function definition warning. 3) Check for NULL from bio_get_string16 functions. Bug: 15886919 Bug: 15888753 Change-Id: I78a401d55b84f382ab83911be32b8d501998aa82
* Remove inline access control in service_manager.Riley Spahn2014-06-261-42/+1
| | | | | | | | Remove the hardcoded tuples of UIDs and the services that each is allowed to register. We will rely only on permissions from SELinux. Change-Id: I1c44555a6e274814282398865b30ee938f40dabb
* Add SELinux checks when adding a service.Riley Spahn2014-06-122-7/+85
| | | | | | | | | | | Add a MAC check to the svc_can_register function in service_manager. The types are defined in external/sepolicy/service.te and the mapping from service names is defined in external/sepolicy/service_contexts. Currently uses the property context backend to parse the contexts file. Bug: 12909011 Change-Id: I5d90a614263c60571c7c70c2882e6fa929911ca5
* Use 64 bit binder interface if TARGET_USES_64_BIT_BINDER _or_ ↵Arve Hjønnevåg2014-02-031-0/+2
| | | | | | TARGET_IS_64_BIT is set. Change-Id: I46a29939fa29ec9421ab6dff3285502f69a31745
* ServiceManager: Implement PING_TRANSACTIONArve Hjønnevåg2014-01-312-0/+5
| | | | | | | Stop printing "invalid id " to stderr every time a process tries to connect to the servicemanager. Change-Id: Ib0e5a0375bfa2dec2c2f9cd668bd5dda46ed6588
* ServiceManager: Use 32/64 bit types from new binder headerArve Hjønnevåg2014-01-312-27/+28
| | | | Change-Id: I1bd7c38ed9f43125cf9c63aa533434ee7ca06f80
* Add BINDER_IPC_32BIT to CFLAGS unless TARGET_USES_64_BIT_BINDER is trueArve Hjønnevåg2014-01-311-0/+4
| | | | Change-Id: I96c643123b0314c361b7f48a18d5c22c660d4ff5
* ServiceManager: Fix the binder interfaceSerban Constantinescu2014-01-313-40/+51
| | | | | | | | | | | This patch adds support for binder transactions on 64bit systems without breaking the existing 32bit ABI. It has been tested on the Android emulator and ARMv8 Model. Most of the changes in this patch just follow the binder ABI. Change-Id: I8c37b847ea65008d56554d34d4696fe3d22f7533 Signed-off-by: Serban Constantinescu <serban.constantinescu@arm.com>
* ServiceManager: Store handles in uint32_t instead of void *Serban Constantinescu2014-01-314-63/+63
| | | | | | | This patch corrects the types used for storing handles. Change-Id: If9c10782345f1de9e12b4b3fd6be9e02e6b568cd Signed-off-by: Serban Constantinescu <serban.constantinescu@arm.com>
* ServiceManager: Generic FixesSerban Constantinescu2014-01-313-64/+66
| | | | | | | | This patch fixes some of the ServiceManager issues. The following patches of the series add fixes to the ABI. Change-Id: Ib479234c8704e12592f1b149ddec67881bc50230 Signed-off-by: Serban Constantinescu <serban.constantinescu@arm.com>
* ServiceManager: Add extra error handlingSerban Constantinescu2014-01-313-2/+15
| | | | | | | | This patch extends the error handling. It also adds a check for a matching binder version - kernel/userspace. Change-Id: I43a262934b38c5711536aaa42754fed1ef04b39e Signed-off-by: Serban Constantinescu <serban.constantinescu@arm.com>
* ServiceManager: Fix Android.mkSerban Constantinescu2014-01-311-4/+11
| | | | | | | | This patch fixes Android.mk and enables building bctest as an optional module without any extra hacks. Change-Id: Icaf8bf9452776db2ea4a2ba75f3abf05b4e2cdab Signed-off-by: Serban Constantinescu <serban.constantinescu@arm.com>
* ServiceManager: Make use of kernel exported structuresSerban Constantinescu2014-01-313-70/+46
| | | | | | | | | | | | This patch switches ServiceManager to use the structures exported in the kernel headers rather then redefining its own. struct binder_txn is replaced with struct binder_transaction_data and struct binder_object with struct flat_binder_object, both defined in the binder driver header <linux/binder.h>. Change-Id: I3b3e97918173ea35a289e184774ae06193192da3 Signed-off-by: Serban Constantinescu <serban.constantinescu@arm.com>
* Add media.log serviceGlenn Kasten2013-01-161-0/+1
| | | | Change-Id: Ic17752fff30676fe692c80260ff68284543385dd
* Switch keystore to binderKenny Root2012-11-141-0/+1
| | | | Change-Id: Ie15781de079e8ecc9616cab9a5e392f5c814d9d8
* Move non-Java commands over from frameworks/baseMike Lockwood2012-10-245-0/+1135
Change-Id: I0571813c1cfcf66abd36eb9f178fc49b618e88a6 Signed-off-by: Mike Lockwood <lockwood@google.com>