Commit graph

46 commits

Author SHA1 Message Date
Nick Kralevich
6575a1625a am 8f98c4b5: Merge "Fix dirfd crash issue in property service"
* commit '8f98c4b5f011db8637ce1b9361e82d59b13434f4':
  Fix dirfd crash issue in property service
2012-10-23 10:46:55 -07:00
Yi-wei Zhao
e41bc31555 Fix dirfd crash issue in property service
In "init: harden property service" patch, dirfd() is invoked
without checking whether opendir() return successfully. It may
fail if load_persistent_properties() is invoked before userdata
partition is mounted; then dirfd(NULL) will make init crash.
This may happen if "is_charger" is true.

Change-Id: I216fb743a3c9fa050f92fcb31b62e766346d84bb
Signed-off-by: Yi-wei Zhao <gbjc64@motorola.com>
2012-10-23 21:31:06 +08:00
Kenny Root
2a36ae5608 am 7b88a90d: Merge "Remove HAVE_SELINUX guards"
* commit '7b88a90da2a27e347fc16c14fa577f4ae1ef07fd':
  Remove HAVE_SELINUX guards
2012-10-17 09:57:10 -07:00
Kenny Root
b5982bf7c6 Remove HAVE_SELINUX guards
Change-Id: I8272c573b3c5dc663203bafab68fad5e94d89364
2012-10-16 23:18:18 -07:00
Nick Kralevich
474cb0e33a am 33045b3d: am f9c05970: Merge "init: harden property service."
* commit '33045b3d7bd965f67e2e0b175976cf9934fb924f':
  init: harden property service.
2012-10-04 11:47:06 -07:00
Nick Kralevich
7ecfe6a94b init: harden property service.
Don't create temporary files in a well-known location. Rather,
use mkstemp().

Don't read persistent property files from insecure files.

Change-Id: I81e2aca674a2a7ca54869f088737fb228d3af6d2
2012-10-04 10:47:05 -07:00
Nick Kralevich
32b9023d08 init: Don't read local properties if ro.debuggable=0
Bug: 7195965
Change-Id: I29fdad61aa61f2c46d49db227cf7b84d9cc6f25d
2012-09-19 13:03:18 -07:00
Jeonghoon lim
e953e9657c bluetooth: bring up with bluedroid stack
- change permission of "bluetooth." property to AID_BLUETOOTH

Change-Id: Ifcd97f136cfc3372412fe500e4f800d1bbbd065c
2012-08-15 01:34:31 -07:00
Kenny Root
2fec4de5c7 am 11c783f1: am 9494f297: Merge "Implement SELinux/MAC checks for property service."
* commit '11c783f1ead9f276e8854cb1adaebeed8517e8a1':
  Implement SELinux/MAC checks for property service.
2012-08-13 10:22:57 -07:00
Kenny Root
605103fb55 resolved conflicts for merge of 4dcd52ab to jb-mr1-dev
Change-Id: Ibd0c03a7883a2e31adab18543c016776b7b36866
2012-08-13 10:21:35 -07:00
rpcraig
63207cd20f Implement SELinux/MAC checks for property service.
This is a set of changes to the init property service
implementation to apply a SELinux check over who can
change what properties. Also included control hooks
for the 'ctl' keys.

Change-Id: I5a18809bf5536f6459a36b6bf0d622b9f5061aa0
Signed-off-by: rpcraig <rpcraig@tycho.ncsc.mil>
2012-08-09 10:05:49 -04:00
Stephen Smalley
ae6f3d7c05 Add support for reloading policy from /data/system.
To support runtime policy management, add support for reloading
policy from /data/system.  This can be triggered by setting the
selinux.loadpolicy property to 1, whether from init.rc after
mounting /data or from the system_server (e.g. upon invocation of
a new device admin API for provisioning policy). ueventd and
installd are restarted upon policy reloads to pick up the new
policy configurations relevant to their operation.

Change-Id: I97479aecef8cec23b32f60e09cc778cc5520b691
Signed-off-by: Stephen Smalley <sds@tycho.nsa.gov>
2012-08-09 09:59:10 -04:00
Ravi Nagarajan
a8afd723a4 Allow AID_BLUETOOTH to update persist.service.bdroid
When devices are provisioned, bd address path is set in ro.bt.bdaddr_path.
On devices where this property is not present, a random bd address is
generated and saved to the property: persist.service.bdroid.bdaddr
This change allows bluetooth process to update this property
bug 6885309

Change-Id: I2e8a2471a0e890da82e6bbec6a2ef67ec8e1f8f4
2012-08-06 23:56:45 -07:00
jeonghoon.lim
8c0350f4ee bluetooth: add property permission for bluetooth
add property permission for bluetooth.

Change-Id: I099f325f533d06c63ad43843dd6477ea81fc9781
2012-07-16 17:35:22 -07:00
Romain Guy
45fa13f370 Let users with SYSTEM permission set debug. properties
Change-Id: Ieda3f7dd5dca5f6a8fc50b07822e6a875db030ad
2012-04-27 15:19:30 -07:00
Nick Kralevich
0dbda7e1c5 Don't read /data/local.prop on user builds
Creating a root owned /data/local.prop is one of the most common
ways to root an Android device. /data/local.prop is only intended
to assist developers on debuggable devices, and is never
intended to be used on production devices.

Change-Id: Ifcfa21c2ee9914b0b54445218b4cf0fea0a98e9c
2012-01-18 13:38:34 -08:00
Dima Zavin
8886112d87 init: export all androidboot cmd line values as ro.boot.xx props
Also, clean up how we initialize the ro.xx properties and process
the kernel command line.

Change-Id: Iedda6c90e31340a189171a44b2767480403354f7
Signed-off-by: Dima Zavin <dima@android.com>
2012-01-05 15:02:00 -08:00
Jeff Brown
33901e6024 Delete dead code.
Change-Id: Icfb9bcee2c524026ecbeb7e30e943d8ca299a33a
2011-11-18 15:21:56 -08:00
Dima Zavin
ebf46586f5 init: do not load default.prop from ramdisk in charger mode
Change-Id: Ic471b891829d7f857674b925c9948954972d9ecb
Signed-off-by: Dima Zavin <dima@android.com>
2011-09-06 10:12:41 -07:00
Benoit Goby
5da93589f1 Allow radio to set sys.usb.config
This allows the ril to put the phone into diagnostic mode

Change-Id: Iafc8164991550e7ab0ffda8b8da1d58e34a4225b
2011-08-22 12:12:37 -07:00
Benoit Goby
22bfc4cca0 Allow radio to set net.cdma* properties
Change-Id: I656abde9d06175eb158e84de4d08ede42620b46a
2011-07-28 18:10:23 -07:00
Benoit Goby
7100f640de Allow radio to set net.lte* properties
Change-Id: I4b7a280ba4c773673b28db8cfbbffcb360ee717f
2011-07-25 18:02:06 -07:00
Chia-chi Yeh
9bb4d411e0 init: update permissions for VPN.
VPN no longer uses system properties to keep network parameters.
Besides, profiles are now stored and encrypted by keystore.

Change-Id: I7575f04f350b7d8d5ba7008eb874a72180d057e8
2011-07-08 20:03:03 -07:00
Mike Lockwood
d18678f882 init: Handle EINTR in handle_property_set_fd()
Change-Id: I5a6f1791eaf11e98b1d81697112d78c99822fba5
Signed-off-by: Mike Lockwood <lockwood@android.com>
2011-07-01 15:04:38 -04:00
Brad Fitzpatrick
71ead18353 Close the client socket early for ctl.* properties.
Bug: 4199411
Change-Id: I3bf335e16e0df8405c538989a8f4f6db7795fa36
2011-04-01 12:00:35 -07:00
Brad Fitzpatrick
9f1e0e3ae3 Close the property socket *after* updating properties.
Also remove some dead code.

Bionic update is in change I3e80cecf

Bug: 4185486
Change-Id: I28e06197ff7a452c70b89b9fc5e2bcf0d9d54bbe
2011-03-30 15:27:03 -07:00
Ken Sumrall
c5c51033c8 Load the persistent properties after decrypting the /data partition
Fix for bug 3415286.  The persistent properties are normally read early
in the boot process after /data is mounted.  However, for an encrypted
system, at that point /data is a tmpfs ramdisk.  This change adds a new
command to init (load_persist_props) to read the persistent properties,
and adds an action to init.rc to load the persistent properties.  This
action is triggered by setting a property in vold, but that's in a
different CL.

Change-Id: I74b3057974ee6029c29d956b76fef5566700d471
2011-03-10 18:12:19 -08:00
Amol Bhatkar
cf01597121 property_service: Give radio permission to set net.qmi*
Change-Id: I771ef22859799b863ab79de9d3248ef610af4dd8
2011-03-02 16:00:58 -08:00
Mike Lockwood
58aa5b0ee0 init: Allow non-root adbd to switch between TCP and USB modes
Change-Id: I9e93ceefadfaa2a4f8ec25cfa05fa4821fd98093
Signed-off-by: Mike Lockwood <lockwood@android.com>
2010-12-10 09:48:41 -08:00
Wink Saville
cfa0d84393 Allow AID_RADIO to restart the ril-daemon.
This enhances robustness by allowing the Telephony Framework to restart
ril-daemon if it notices some catastrophic failure.

Added setprop ctl.restart.
Added ril-daemon to setprop control_perms and allow users/groups
with the AID_RADIO ID to control it.

Change-Id: I195abdd754a731ce0b77e8f71ab47fde8c3e7977
2010-10-03 13:54:03 -07:00
Brian Swetland
25b15be912 init: use tmpfs/ftruncate for properties backing store instead of ashmem
This removes the need for ashmem for early bringup and avoids an issue
with permissions enforcement.

Change-Id: I405b080660934d73048c79d614b6b2ebc43ab182
Signed-off-by: Brian Swetland <swetland@google.com>
2010-07-13 16:43:56 -07:00
Colin Cross
3294bbbad9 init: Allow services to start before property triggers are up
Change-Id: I4f87657123bea88b7b5c537781868908d8d66b01
2010-04-21 19:43:35 -07:00
Colin Cross
ed8a7d8442 init: Move list and log handling to list.h and log.h
Change-Id: I298f575c590d0f28b7ad78747f3ebdbba56b7a27
2010-04-21 19:43:35 -07:00
Colin Cross
3899e9fc01 init: Move prototypes for util.c into util.h
Change-Id: I46a91849ce5297eb2597dd6134412f817564ec24
2010-04-13 22:52:10 -07:00
Colin Cross
d11beb2b15 init: Move property_set_fd to property_service.c
Change-Id: Ic7a19073eae8f353d48cabee80fa9722b35a82b5
2010-04-13 22:52:10 -07:00
Oscar Montemayor
ef4e21520c Encrypted File SYstems project. Enabling EFS security properties.
This change enables persist.security.* flags in the device, allowing oly the system to modify them.
Change is necessary to allow for further progress in the project, as this is an ideal location for access both from the
framework as well as from the recovery mode / transition.
2009-11-12 12:02:24 -08:00
Mike Lockwood
c5e7ef2430 init: Add support for enforcing setprop by caller's group.
Change-Id: Ic96e139c4c596882adb38b8863ac6157e0ac17b5
Signed-off-by: Mike Lockwood <lockwood@android.com>
2009-09-03 00:36:25 -04:00
Tammo Spalink
3dfe6c6664 Add persistent radio prop perms ; cleanup ws and typos.
Change-Id: I7d6b51bbb8a9658179bd01c4ff3b5356ec8b4b6c
2009-08-31 11:10:13 +08:00
Robert Greenwalt
0ab3a93aba Allow radio to modify net.ppp* properties for dns
The radio bringup script was changed from operating as root to operating as radio.  This is
preventing it from adding the "net.ppp0.dns0" and "net.ppp0.dns1" properties that
ConnectivityService needs to correctly set dns.

bug: 2077628
2009-08-25 13:55:57 -07:00
Chia-chi Yeh
88dc657d50 Add device, property, directory, and file permissions for VPN. 2009-06-19 15:53:28 +08:00
Mike Lockwood
b3779558dc init: Fix some broken code that did not cause problems until switching to gcc 4.4
Signed-off-by: Mike Lockwood <lockwood@android.com>
2009-05-08 14:27:42 -04:00
The Android Open Source Project
e037fd7e19 auto import from //branches/cupcake_rel/...@138607 2009-03-13 13:04:37 -07:00
The Android Open Source Project
dd7bc3319d auto import from //depot/cupcake/@135843 2009-03-03 19:32:55 -08:00
The Android Open Source Project
e54eebbf1a auto import from //depot/cupcake/@135843 2009-03-03 18:29:04 -08:00
The Android Open Source Project
35237d1358 Code drop from //branches/cupcake/...@124589 2008-12-17 18:08:08 -08:00
The Android Open Source Project
4f6e8d7a00 Initial Contribution 2008-10-21 07:00:00 -07:00