• Home
  • History
  • Annotate
  • only in /frameworks/native/cmds/servicemanager/
History log of /frameworks/native/cmds/servicemanager/
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
43c64c3f0366cffa1c329a14c89528951d7f74ae 07-Dec-2017 Ivan Lozano <ivanlozano@google.com> Merge "Keystore and gatekeeper not working when servicemanager crashed" am: c81d9b84c3 am: d32d93125c
am: 6780e1a578

Change-Id: Id42b9431c97bebd3fb308a455db6d07df66c19bd
c81d9b84c3592341d29f817d14702d6d6c387abe 06-Dec-2017 Treehugger Robot <treehugger-gerrit@google.com> Merge "Keystore and gatekeeper not working when servicemanager crashed"
0c0da3814ef72a5986e927ebfd06e4e5ca380433 20-Oct-2017 Jiyong Park <jiyong@google.com> Merge "Remove libselinux_vendor" am: cd4895df08 am: 016e9504ae am: ad119fd2ad
am: 886d5976b4

Change-Id: I5b610cd06b89c14a34b5d42ad7270cf1b8c45a6c
016e9504aeedc412a794139e9956d6d2634c1065 20-Oct-2017 Jiyong Park <jiyong@google.com> Merge "Remove libselinux_vendor"
am: cd4895df08

Change-Id: I461e1ffd3d2f3b7e1ac4027b2a280eb9fc33a047
a6974e9e50fe0e7b41c5e71174eed1b8dbe73ac5 13-Oct-2017 Jiyong Park <jiyong@google.com> Remove libselinux_vendor

libselinux now becomes a vendor_available:true library.

Bug: 66914194
Test: lunch aosp_arm64_ab-userdebug; m vndservicemanager

Change-Id: I9885c8656f42f79cf218d978feff79a47d16e1b3
ndroid.bp
f56042d6a496fca2e5cfc1f598251f77a9bc7986 20-Sep-2017 Vishnu Nair <vishnun@google.com> Pass dumpsys priority to IServiceManager

Modify IServiceManger to accept supported dumpsys priority as a bitmask
with NORMAL being the default priority. Change listServices to return
a list of services filtered by the priority or all services when the
priority is set to ALL.

BUG:27429130

Test: mmm -j32 frameworks/native/cmds/dumpsys && \
adb sync data && adb shell /data/nativetest/dumpsys_test/dumpsys_test && \
adb shell /data/nativetest64/dumpsys_test/dumpsys_test && \
printf "\n\n#### ALL TESTS PASSED ####\n"

Change-Id: Ibccba63035ace9970c2967a621ee2ad8d15cbeea
ervice_manager.c
30556fc7e7e62ff55ad10b63e735cbb012ed6571 01-May-2017 Sandeep Patil <sspatil@google.com> vndservicemanager: remove static dependency on libselinux

libselinux_vendor is part of VNDK. No need to statically link
to it anymore.

Bug: 37343404
Test: Build and boot
Test: 'vndservice list' to ensure all services are listed as before

Change-Id: I5b3151f44f7b77ce0f2ff4bba38550a3d7e35375
Signed-off-by: Sandeep Patil <sspatil@google.com>
Merged-In: I5b3151f44f7b77ce0f2ff4bba38550a3d7e35375
ndroid.bp
4b0185e68897c8ffadca783252756217a8d9da15 04-Aug-2017 Yifan Hong <elsk@google.com> Merge "Use cutils/android_filesystem_config.h" into oc-mr1-dev
am: 595ff4798d

Change-Id: I3a8917e1389963f3ae457676eb30300f7526b07c
cb4c58bda0693bf84f1c6ee2f244e51c5b9c8337 03-Aug-2017 Yifan Hong <elsk@google.com> Merge commit '219b580fed7916ed4e02dd634e003073f91c6b93' into manual_merge_219b580fe am: 84548cfbfb
am: 5cd3d789b8

Change-Id: I4476bca7b0b5e0a17af504a2b21a51d26b069587
84548cfbfb397ae66d0d71c520ce01864e377b6d 03-Aug-2017 Yifan Hong <elsk@google.com> Merge commit '219b580fed7916ed4e02dd634e003073f91c6b93' into manual_merge_219b580fe

Test: pass
Change-Id: Ic796fced51004d4a716c754fc8c0d347c33af8ff
3f68cca4d606454b7b3c5104ff01414630f5cae3 02-Aug-2017 Yifan Hong <elsk@google.com> Use cutils/android_filesystem_config.h

private/android_filesystem_config.h is not available for
vndservicemanager.

Test: m -j
Test: BOARD_VNDK_VERSION m -j

Bug: 63135587
Change-Id: Iaf9911a519ebbb798184e93b2911d0e813e6026c
Merged-In: Iaf9911a519ebbb798184e93b2911d0e813e6026c
ervice_manager.c
212c88143ebdeabbab364fca7680d8cd2caff256 02-Aug-2017 Yifan Hong <elsk@google.com> Use cutils/android_filesystem_config.h

private/android_filesystem_config.h is not available for
vndservicemanager.

Test: m -j
Test: BOARD_VNDK_VERSION m -j

Bug: 63135587
Change-Id: Iaf9911a519ebbb798184e93b2911d0e813e6026c
ervice_manager.c
145b13a2db5d620eff2e15138101a7d2b652273a 29-Jul-2017 Christopher Ferris <cferris@google.com> Merge "Changes to support new v4.12.3 headers." am: ab9e842013 am: 4e99fac316
am: 6488d4e87d

Change-Id: I7c1ee59b3eda16790b3441654766ebe08f01406e
4e99fac3160edd1725b4024eacff4c72ee78bf99 29-Jul-2017 Christopher Ferris <cferris@google.com> Merge "Changes to support new v4.12.3 headers."
am: ab9e842013

Change-Id: I9db34d9168c6b69b73cdfb3f8a62134850346a63
dbaa22a7e135432c2effcfc7b9b2f31be80b90ff 27-Jul-2017 Christopher Ferris <cferris@google.com> Changes to support new v4.12.3 headers.

Test: Built and booted angler.
Change-Id: I82405b4e52d203d6cfd81aa7583dfc8b2ae86f9d
inder.c
699fbb73daaf33e080288f8513b0d56037dfe1a9 11-Jul-2017 Wei Wang <wvw@google.com> servicemanager: Mark servicemanager as shutdown critical

Bug: 62951929, 63514363, 62845700
Test: Build
Change-Id: Ib1b7aec4b6d3c590eb469daeed40b954d37efa18
ervicemanager.rc
175e684d01cc8f5f0c4106ca426820c1b1168ae9 11-Jul-2017 Roopesh Rajashekharaiah Nataraja <roopeshr@codeaurora.org> servicemanager: Mark vndservicemanager as shutdown critical

vndservicemanager needs to be alive during shutdown to allow vndk
components which may run during shutdown to communicate. The system
ndk servicemanager keeps running throughout shutdown, so this brings
the vndservicemanager on par with that behavior.

Bug: 62951929, 63514363, 62845700
Test: Build
Change-Id: Iba154820ef69c6491a5cb05747b6b905763a825d
ndservicemanager.rc
61f8dfa24b0846ae66328891f8facf9e06237c15 13-Jun-2017 Kouji Shiotani <kouji.shiotani@sony.com> Avoid SELinux violation at vndservicemanager

Avoid following SELinux violation.

avc: denied { read } for comm="vndservicemanag"
name="nonplat_service_contexts" dev="rootfs" ino=17045
scontext=u:r:vndservicemanager:s0
tcontext=u:object_r:service_contexts_file:s0 tclass=file permissive=0
ppid=1 pcomm="init" pgid=1 pgcomm="init"

This violation caused by vndservicemanager reading service_contexts at
svcmgr_handler(). In main() loading as well, processing is divided by
the VENDORSERVICEMANAGER flag. Therefore, even in svcmgr_handler(),
processing is divided by flags like main().

Bug: 62562415
Test: mma
Change-Id: I06b0308a80fc6ea1ca57cd10d9555dd269b8e12d
ervice_manager.c
c691f31ff87179c68682ddb81c1c067699de1a8b 03-May-2017 Sandeep Patil <sspatil@google.com> Revert "Revert "vndservicemanager: remove static dependency on libselinux""

This reverts commit 53625afa7c7264ad575a42cf9c292c919e4582f1.

The build errors introduced in original topic has now been fixed in
libselinux

Bug: 37343404
Bug: 37919668
Test: Build and boot.

Change-Id: I2c1baac221c9516ac9d3ef5317af19839c8f9af3
Signed-off-by: Sandeep Patil <sspatil@google.com>
ndroid.bp
53625afa7c7264ad575a42cf9c292c919e4582f1 03-May-2017 Nick Kralevich <nnk@google.com> Revert "vndservicemanager: remove static dependency on libselinux"

MAC builds have the following compile error:

Undefined symbols for architecture x86_64:
"_selabel_file_init", referenced from:
_initfuncs in label.o
ld: symbol(s) not found for architecture x86_64
clang.real: error: linker command failed with exit code 1 (use -v to see invocation)

Reverting patchset.

This reverts commit 53dfd407ce2729ff5653725a43bdad51e6dd274a.

Change-Id: I8ab4a14ad853a1bf13412a13371661a859a73df7
ndroid.bp
53dfd407ce2729ff5653725a43bdad51e6dd274a 01-May-2017 Sandeep Patil <sspatil@google.com> vndservicemanager: remove static dependency on libselinux

libselinux_vendor is part of VNDK. No need to statically link
to it anymore.

Bug: 37343404
Test: Build and boot
Test: 'vndservice list' to ensure all services are listed as before

Change-Id: I5b3151f44f7b77ce0f2ff4bba38550a3d7e35375
Signed-off-by: Sandeep Patil <sspatil@google.com>
ndroid.bp
6561fb6f46fced31995cd632c7431ad51f7a0e36 25-Apr-2017 Vijay Venkatraman <vijaykv@google.com> Change vndservicemanger's dep on libselinux to libselinux_vendor

Bug: 37343404
Test: Build vndservicemanager with BOARD_VNDK_VERSION set
Change-Id: Ibdb0872a8f1342a533524eb43cfb6ec13a6d1d0c
ndroid.bp
bb26dd29563d90f25aa55b79a32203f0cebc1dc0 18-Apr-2017 Dan Cashman <dcashman@google.com> Reflect removal of vndservice_manager SELinux object manager.

(preemptive cherry-pick of commit: 2762a7833ffc68cb731be53730e2364920a9d041
to avoid merge conflict)

Bug: 34454312
Bug: 36052864
Test: policy builds and device boots.
Change-Id: Ic2aebb15f4ae9085bf2cb440cceef6b4beb5ddc5
ervice_manager.c
2762a7833ffc68cb731be53730e2364920a9d041 18-Apr-2017 Dan Cashman <dcashman@google.com> Reflect removal of vndservice_manager SELinux object manager.

Bug: 34454312
Bug: 36052864
Test: policy builds and device boots.
Change-Id: Ic2aebb15f4ae9085bf2cb440cceef6b4beb5ddc5
ervice_manager.c
a5f53b053f87234a8a73008e6358297a261a34fe 12-Apr-2017 Martijn Coenen <maco@google.com> Link vndservicemanager against libselinux statically.

Bug: 37189668
Test: vndservicemanager works
Change-Id: I8187fb86371d5a2073287beb6b17e263eedfb17b
ndroid.bp
4339a83c0f840fcfaa0bcd45f0aeb2d3d7675b63 06-Apr-2017 Martijn Coenen <maco@google.com> vndservicemanager: use separate SELinux class.

For doing access control.

Bug: 36052864
Test: device boots
Change-Id: I263679ed4532ec52b1e64e5e60bdc064b7484073
ervice_manager.c
42aca5a0d3cae3f1fb416a0170ff339bd763c71c 04-Apr-2017 Martijn Coenen <maco@google.com> Merge "vndservicemanager: load vendor service_contexts." into oc-dev
31361232e1e7965d00c638ead2903f08f168f1c9 01-Apr-2017 Martijn Coenen <maco@google.com> vndservicemanager: load vendor service_contexts.

Also, don't crash when /dev/vndbinder is not
accessible.

Bug: 36052864
Test: loads vendor service contexts
Test: doesn't crash without /dev/vndbinder, works with it
Change-Id: Ida9dd94791206e14246348a8b8e66be09ed8fca7
ndroid.bp
ervice_manager.c
dac30b4bbfba384148a906d0b973500ce5c78882 23-Mar-2017 Keun-young Park <keunyoung@google.com> add surfaceflinger and servicemanager to animation class

- necessary for running shutdown animation

bug: 36526187
Test: many reboots

Change-Id: Id26f5747a8903e91db8499093a489409dcafa129
ervicemanager.rc
69b0515dcd58a479c41977aca7bd18b865571d09 21-Mar-2017 Martijn Coenen <maco@google.com> Add vndservicemanager.

vndservicemanager is the context manager for
binder services that are exclusively used from
the vendor binder domain, "/dev/vndbinder";
these services can only be registered and accessed
by vendor processes.

To facilitate code re-use, vndservicemanager
is just framework servicemanager accessing the
vendor binder devnode.

Bug: 36052864
Test: modified binder_test to use /dev/vndbinder

Change-Id: Iac19a1180321a5be78d7be5ceb4ba211c593dc47
ndroid.bp
ctest.c
inder.c
inder.h
ervice_manager.c
ndservicemanager.rc
b2dead1d1d254ecfe33b6948c9cbc606b05b99a0 02-Mar-2017 sj.cha <sj.cha@lge.com> Keystore and gatekeeper not working when servicemanager crashed

Reproduce step :
- Kill servicemanager process

frequency : 100%

Reason of issue :
As you know, servicemanager manages almost framework services.
However when servicemanager killed by unknown reason, android restart servicemanager.
In this case, keystore and gatekeeper deamon should be restart.
But current android source code doesn't consider those case.
So, I want to disscuss about this changes with you.
(It is able to so fixed in theirs(keystore.rc...) rc files.
But I'm not sure what is the best changes.)

Solution : Adding restart services syntax from rc file

Signed-off-by: SangJin Cha <sj.cha@lge.com>
Change-Id: Iab02b54417406dd84a1e970dc1ded6437183d0c0
ervicemanager.rc
93ba7019cb473158bdea1b8fc73a1db34ea9a129 27-Dec-2016 Sandeep Patil <sspatil@google.com> servicemanager: selinux: set selinux callbacks early

SELinux library error logs are never be shown in logcat if
there's a failure before the callbacks are set. We missed
all logs from service context initialization because of this.

Bug: 33746484
Test: Restart new service manager to make sure context init logs
show up in logcat.

Change-Id: I5479cf5fe10ceb1a210eda26946b6ea344792e24
Signed-off-by: Sandeep Patil <sspatil@google.com>
ervice_manager.c
7823e124e00576e20e47ec717cbe8bc89f0f2bf2 29-Sep-2016 Mark Salyzyn <salyzyn@google.com> Replace cutils/log.h and rationalize log/log.h and android/log.h

- cutils/log.h treat as deprecated and lead by example
- android/log.h to be used instead of log/log.h if possible
- add system includes that are assumed as side effects
- define LOG_TAG first

Test: compile
Bug: 31289077
Bug: 30465923
Change-Id: I8d99b24c333578c9b5aa9f2a01324bd0bba268dd
inder.c
ervice_manager.c
a5e161b1207ef447a51e99856097d69d4a6111e1 29-Sep-2016 Mark Salyzyn <salyzyn@google.com> Replace cutils/log.h and rationalize log/log.h and android/log.h

- cutils/log.h treat as deprecated and lead by example
- android/log.h to be used instead of log/log.h if required
- add system includes that are assumed as side effects of log.h
- modules that use SLOG should use SLOG for all logging (installd)
- define LOG_TAG first
- remove logging infrastructure if not used

Test: build
Bug: 31289077
Change-Id: Iea147a0104c7ab7f12451304131d6500f42141e7
inder.c
ervice_manager.c
eb4d5cbde02b17259e968321ef457b158ce1da4e 10-Dec-2016 Nick Kralevich <nnk@google.com> service_manager.c: remove is_selinux_enabled calls

SELinux is always enabled. No need to check for it.

Test: Device boots and service manager works without errors.
Change-Id: I12be7336e7c31a5f5796ea1383f3dc934eb3c97c
ervice_manager.c
6b9c6d23f69a64f76fc26cda6989183042b0621c 19-Aug-2016 Arve Hjønnevåg <arve@android.com> ServiceManager: Allow system services running as secondary users to add services

This should be reverted when all system services have been cleaned up to not
do this. A process looking up a service while running in the background will
see the service registered by the active user (assuming the service is
registered on every user switch), not the service registered by the user that
the process itself belongs to.

BUG: 30795333
Change-Id: I1b74d58be38ed358f43c163692f9e704f8f31dbe
ndroid.bp
ervice_manager.c
5fa90a063f77054fc6068f45f6a21f43d64364b6 02-Aug-2016 Arve Hjønnevåg <arve@android.com> ServiceManager: Restore basic uid check

Prevent apps from registering services without relying on selinux checks.

Bug: 29431260

Change-Id: I38c6e8bc7f7cba1cbd3568e8fed1ae7ac2054a9b
ervice_manager.c
2a001e8bfe0255242740df7d9674408820f13627 05-Aug-2016 Dan Willemsen <dwillemsen@google.com> resolve merge conflicts of 0783d5f to stage-aosp-master

Change-Id: I4fe9c0391d6d41bae5fbbb0df6e00e264e87649f
59e086f536e1dbbbfe9cb6a1826aaddef999d5ce 26-Jul-2016 Dan Willemsen <dwillemsen@google.com> Start converting Android.mk to Android.bp

See build/soong/README.md for more information.

Merged-In: Ifbe9b0072a63b4467c72b3a52148a606e5365f78
Change-Id: Ifbe9b0072a63b4467c72b3a52148a606e5365f78
ndroid.bp
ndroid.mk
173b3eff35f956ccc0050699bbebb2df95424646 20-Jul-2016 Christopher Ferris <cferris@google.com> Merge \"Change to include linux/android/binder.h.\"
am: b34400ea94

Change-Id: I1aab76bd51c448410d1d9ff3ae288013c81c8d52
0170cd016c8c649da3a3d845276e6c5ffa350481 19-Jul-2016 Christopher Ferris <cferris@google.com> Change to include linux/android/binder.h.

The upstream kernels have binder.h as linux/android/binder.h, so
match that.

Bug: 30072483
Change-Id: Iacdc96629dd09c1f4be0a5767666ab64b3df8f15
inder.h
52aa4a7a5ad85dfc364ff1f9b61e94010ef61070 25-May-2016 Mark Salyzyn <salyzyn@google.com> svcmgr: don't send reply to one-way txn (part deux)

Do not split transaction into two when sending synchronous responses.

Partially revert changes associated with binder_send_reply from
previous incantations in commit 51f592c7bad13d3d8e8f7cfec25edfef42901802
that resulted in a performance regression.

Signed-off-by: Mark Salyzyn <salyzyn@google.com>
Bug: 27111612
Bug: 28696050
Bug: 28946245
Change-Id: I12edc10a2d1408a71507a7983afa7f17b5a6a81b
inder.c
14a1be2fc08ce757aa0340eac6e7f1a4ceb14d00 15-Apr-2016 Martijn Coenen <maco@google.com> Move servicemanager into system-background cpuset.

Bug: 24949295
Change-Id: I9149c43edf79d9acbc5af4b3dc1eae59c695a86a
ervicemanager.rc
51f592c7bad13d3d8e8f7cfec25edfef42901802 11-Mar-2016 dcashman <dcashman@google.com> svcmgr: don't send reply to one-way txn.

svcmgr currently assumes that all incoming transactions are synchronous
and expecting a reply. Change the BR_TRANSACTION handling code to not
send a reply to one-way transactions.

Bug: 27111612
Change-Id: If2e56d3eb53b41d059dbe7d5d10e764343c0262c
inder.c
4318b9c88cca12485082687658ee3bab5ecd9013 19-Feb-2016 Ian Pedowitz <ijpedowitz@google.com> Merge "Revert "Revert "Fix warnings in servicemanager and KeyCharacterMap""" into nyc-dev
d57d9b900da83b1b5431d90e250f86c0047c618a 19-Feb-2016 Ian Pedowitz <ijpedowitz@google.com> Revert "Revert "Fix warnings in servicemanager and KeyCharacterMap""

This reverts commit b480269b0f8e933fa6fc6bd4c9e1e504e1b51508.

Change-Id: If405c0786c5bdd02e3f2c3356d56a4200c6b9dfb
ndroid.mk
inder.c
ervice_manager.c
3f0d762955d4478256848fef92f7c5b105ff1509 19-Feb-2016 Ian Pedowitz <ijpedowitz@google.com> Merge "Revert "Fix warnings in servicemanager and KeyCharacterMap"" into nyc-dev
b480269b0f8e933fa6fc6bd4c9e1e504e1b51508 19-Feb-2016 Ian Pedowitz <ijpedowitz@google.com> Revert "Fix warnings in servicemanager and KeyCharacterMap"

This reverts commit d3b4c050f6bcdfd44bfb9c8ed885fd1c482c50bb.

Change-Id: I961f89d4446ac23f0e267c6541b504c4ec6b3af1
ndroid.mk
inder.c
ervice_manager.c
527b5ecd6e2453421d9d9371f2f932b5360c0a6d 19-Feb-2016 Colin Cross <ccross@android.com> Fix checkbuild

Fix build breakage introduced by
I2e2acb15d1bc05c6ba09563a87d5baceebe7ebd9

Bug: 26936282
Change-Id: I944d758afd4d026a2d30b6816d88356a97ca70a5
ctest.c
d3b4c050f6bcdfd44bfb9c8ed885fd1c482c50bb 19-Feb-2016 Aurimas Liutikas <aurimas@google.com> Fix warnings in servicemanager and KeyCharacterMap

- Suppress unused parameter warnings.
- Remove a few unused parameters.
- Set the correct formatting for size_t log.

Bug: 26936282
Change-Id: I2e2acb15d1bc05c6ba09563a87d5baceebe7ebd9
ndroid.mk
inder.c
ervice_manager.c
abc47e39adcc034c60a06abc8c0acc6f7dfad8bc 04-Dec-2015 Chien-Yu Chen <cychen@google.com> Restart cameraserver when servicemanager restarts

Bug: 24511454
Change-Id: I50187d506ebe8a1e2debe82b2c2a8d0f7b3f6523
ervicemanager.rc
ff1697c120a5d97a61307709fc2227830ceefa38 24-Dec-2015 Nick Kralevich <nnk@google.com> Merge "More O_CLOEXEC" am: 43e4260831
am: 66824c36ce

* commit '66824c36ce08ae86a057440e33a5fe1a23ef01f1':
More O_CLOEXEC
0fe7ce375ed6c9fcd86b8bb3a836bc37c9740831 24-Dec-2015 Nick Kralevich <nnk@google.com> More O_CLOEXEC

Change-Id: I31991ed089f395174857e86e509b8190ad98f92a
inder.c
0ce5c9846967ab5339de133cc75d933a9ff8dcfc 11-Dec-2015 Andy Hung <hunga@google.com> Merge "Restart audioserver if servicemanager restarts"
07e25abb0a9e8fa973dd9b85ba7b711f8d722e20 09-Nov-2015 Nick Kralevich <nnk@google.com> Merge "Allow read access to /proc entries for other UIDs" am: fd53598220 am: 877b5daecc
am: 3e606062b3

* commit '3e606062b3b2e8143f5353a7028e78b25a803aa8':
Allow read access to /proc entries for other UIDs
ab46a4922655bc75848660da4268ab85d72a6010 08-Nov-2015 Nick Kralevich <nnk@google.com> Allow read access to /proc entries for other UIDs

Allow dumpstate (aka adb bugreport), servicemanager, and
surfaceflinger to access /proc entries associated with other UIDs.

Bug: 23310674
Change-Id: I385dcf0db3376ba979409cbe6fe1a468d36237ef
ervicemanager.rc
08e94903390a96530131c9b419bd5f31f1e0d989 30-Oct-2015 Andy Hung <hunga@google.com> Restart audioserver if servicemanager restarts

Bug: 24511453
Change-Id: I55e6c5a6eed02033179dc47ced0c1b9c4f9f89ab
ervicemanager.rc
382f5fb38f61c12531d5ff782b6d5b622464d64e 10-Oct-2015 Nick Kralevich <nnk@google.com> am 748c546b: am c4db5ece: am 8e0c88ea: Merge "servicemanager: log pid and uid on selinux denial"

* commit '748c546b15dbaef6b1c480bed733fd6b16ce4cdc':
servicemanager: log pid and uid on selinux denial
8fb0f92e0fe3c286ebb120bae9e1570ee109fa12 02-Oct-2015 William Roberts <william.c.roberts@intel.com> servicemanager: log pid and uid on selinux denial

The audit logs for servicemanager were missing the pid and uid of the source.
This is useful for debugging.

Before:
... SELinux : avc: denied { find } for service=android.security.keystore scontext=u:r:system_app:s0 ...
After:
... SELinux : avc: denied { find } for service=android.security.keystore pid=1252 uid=1000 scontext=u:r:system_app:s0 ...

Change-Id: Id1a6f38b99f11a31315439620ead2f01108b18b2
Signed-off-by: William Roberts <william.c.roberts@intel.com>
ervice_manager.c
48f7ec35a2f8f31a6fe8530ece855e9c23900924 21-Aug-2015 Tom Cherry <tomcherry@google.com> update bundled rc files to their contents from rootdir/init.rc

Bug 23186545

Change-Id: Ic6b2ba78ff90242b031ab1e88a81da8118f9eafd
ervicemanager.rc
74155996d931edbd19ed5b3f71a58ceff920b451 14-Aug-2015 Tom Cherry <tomcherry@google.com> bundle init.rc contents with its service

Bug: 23186545
Change-Id: I2a70a39122b146d5bbc9b55156e769782e011bff
ndroid.mk
ervicemanager.rc
bea0746b241d15626cf0a56828efc1d4640dbda7 03-Jun-2015 Stephen Smalley <sds@tycho.nsa.gov> Call selinux_status_open() prior to use of selinux_status_updated().

The selinux_status_*() interfaces require calling selinux_status_open()
first. Since this was not being called by servicemanager, the
selinux_status_updated() call was always failing and servicemanager
was not reloading service_contexts upon a policy reload.

Change-Id: I6ac62e114bbca99c5f0999feb918fcde15009274
Signed-off-by: Stephen Smalley <sds@tycho.nsa.gov>
ervice_manager.c
a60ff367a4f55ea319625cf500687c5025604f40 07-Apr-2015 Elliott Hughes <enh@google.com> Merge "Remove useless 'svcmgr_handle' (which had wrong type)."
0b41ad5d6ec86cd2d481969dcff7e88f2805324f 04-Apr-2015 Elliott Hughes <enh@google.com> Remove useless 'svcmgr_handle' (which had wrong type).

Also use the 'ptr' union member rather than 'handle'.

Signed-off-by: Serban Constantinescu <serban.constantinescu@arm.com>
Change-Id: I68e5336cd3af3bc61dbddd2b33d7e1512c0c329c
ervice_manager.c
018cf41a15a349fbe788b240d13afbb4e985481b 19-Feb-2014 Serban Constantinescu <serban.constantinescu@arm.com> ServiceManager: Print kernel/userspace binder version

This patch adds extra logging for the binder version in case the userspace
and kernel versions differ.

Change-Id: I9859b29099726cfcfe5ca23d88ed2e101a06af1a
Signed-off-by: Serban Constantinescu <serban.constantinescu@arm.com>
inder.c
13df5f5f8fbc5a3fdfdd5d1ba5dc853cf3f017f0 01-Apr-2015 Mark Salyzyn <salyzyn@google.com> servicemanager: service_manager missing include for string.h

service_manager.c gets string.h inherited from
private/android_filesystem_config.h it should
not rely on this in the future. The intent is
to move fs_config function into libcutils and
thus deprecate any need for string.h in this
include file.

Bug: 19908228
Change-Id: Icc95ee02bf02c596463868b1330d209d1bd5c58a
ervice_manager.c
b27bbd18bb65b3744ae066fcd6826285dec8b469 05-Mar-2015 Nick Kralevich <nnk@google.com> service_manager: reorder permission checks for find

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
ervice_manager.c
824e30e5ed35b8f416fea12ce574b012aedaaab5 30-Jan-2015 Elliott Hughes <enh@google.com> Add missing includes.

Change-Id: I1dad32ab459c25063a70cf52100a29d00fea3a90
ctest.c
inder.c
c67e6307cadb1f2cd876907c42d39b8374b93acd 08-Jul-2014 Riley Spahn <rileyspahn@google.com> Add MAC for remaining service_manager functionality.

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
ervice_manager.c
7d42a3c31ba78a418f9bdde0e0ab951469f321b5 13-Jul-2014 Nick Kralevich <nnk@google.com> service_manager: check binder passed lengths

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
ervice_manager.c
1244edcb85811e9e58d9d40fd05f10dd22e497ca 26-Jun-2014 Riley Spahn <rileyspahn@google.com> Remove inline access control in service_manager.

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
ervice_manager.c
69154df9efd3ffb7580b72a0138f58a2f5443db6 05-Jun-2014 Riley Spahn <rileyspahn@google.com> Add SELinux checks when adding a service.

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
ndroid.mk
ervice_manager.c
f3ad11cf3ce60436bcdeec577d1e35c67ccae460 03-Feb-2014 Arve Hjønnevåg <arve@android.com> Use 64 bit binder interface if TARGET_USES_64_BIT_BINDER _or_ TARGET_IS_64_BIT is set.

Change-Id: I46a29939fa29ec9421ab6dff3285502f69a31745
ndroid.mk
e5245cbf5d4e830cf605ef07f5d284d7c5d2867e 29-Jan-2014 Arve Hjønnevåg <arve@android.com> ServiceManager: Implement PING_TRANSACTION

Stop printing "invalid id " to stderr every time a process tries to
connect to the servicemanager.

Change-Id: Ib0e5a0375bfa2dec2c2f9cd668bd5dda46ed6588
inder.h
ervice_manager.c
399b6c3bbc0d887ab016a8bb686ff16d36edc6c8 29-Jan-2014 Arve Hjønnevåg <arve@android.com> ServiceManager: Use 32/64 bit types from new binder header

Change-Id: I1bd7c38ed9f43125cf9c63aa533434ee7ca06f80
inder.c
inder.h
e91fff0a2dfe7d312286b140c8069c820627da8c 29-Jan-2014 Arve Hjønnevåg <arve@android.com> Add BINDER_IPC_32BIT to CFLAGS unless TARGET_USES_64_BIT_BINDER is true

Change-Id: I96c643123b0314c361b7f48a18d5c22c660d4ff5
ndroid.mk
3a345f0df5f62d77e875a289e9aee89f0d1b526e 19-Dec-2013 Serban Constantinescu <serban.constantinescu@arm.com> ServiceManager: Fix the binder interface

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>
ctest.c
inder.c
ervice_manager.c
5fb1b8836aa5cf0f38b49bc7bfb8343b84fdf9bf 30-Jan-2014 Serban Constantinescu <serban.constantinescu@arm.com> ServiceManager: Store handles in uint32_t instead of void *

This patch corrects the types used for storing handles.

Change-Id: If9c10782345f1de9e12b4b3fd6be9e02e6b568cd
Signed-off-by: Serban Constantinescu <serban.constantinescu@arm.com>
ctest.c
inder.c
inder.h
ervice_manager.c
9b738bb4110926b85da65d36b2e6f1a50199ec4c 10-Jan-2014 Serban Constantinescu <serban.constantinescu@arm.com> ServiceManager: Generic Fixes

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>
inder.c
inder.h
ervice_manager.c
a44542ca74b7da5b44ba30c205c3244805bb0600 30-Jan-2014 Serban Constantinescu <serban.constantinescu@arm.com> ServiceManager: Add extra error handling

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>
ctest.c
inder.c
ervice_manager.c
dc832dc5513f0767c153f90a57356c3466f45dd4 30-Jan-2014 Serban Constantinescu <serban.constantinescu@arm.com> ServiceManager: Fix Android.mk

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>
ndroid.mk
bcf38880c65297da58194eb0c0ce8d6e2bab7d94 10-Jan-2014 Serban Constantinescu <serban.constantinescu@arm.com> ServiceManager: Make use of kernel exported structures

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>
inder.c
inder.h
ervice_manager.c
64c8be07878a6a110e5386c5f789fa9db51c5746 16-Jan-2013 Glenn Kasten <gkasten@google.com> Add media.log service

Change-Id: Ic17752fff30676fe692c80260ff68284543385dd
ervice_manager.c
244408786cf1f374eeacbf6d16dd5a6f7b5e3c59 15-Nov-2012 Kenny Root <kroot@google.com> Switch keystore to binder

Change-Id: Ie15781de079e8ecc9616cab9a5e392f5c814d9d8
ervice_manager.c
94afecf4b6f437b3ee9a076242402e421c6c07a6 24-Oct-2012 Mike Lockwood <lockwood@google.com> Move non-Java commands over from frameworks/base

Change-Id: I0571813c1cfcf66abd36eb9f178fc49b618e88a6
Signed-off-by: Mike Lockwood <lockwood@google.com>
ndroid.mk
ctest.c
inder.c
inder.h
ervice_manager.c