Commit graph

5532 commits

Author SHA1 Message Date
Stephen Smalley
8348d279c7 Add support for socket security context specification.
Add an optional argument to the socket option for specifying
a SELinux security context for the socket.  Normally the socket
security context is automatically computed from the service security
context or set using the seclabel option, but this facility allows
dealing with two scenarios that cannot be addressed using the existing
mechanisms:
1) Use of logwrapper to wrap a service.
In this case, init cannot determine the service security context
as it does not directly execute it and we do not want logwrapper
to run in the same domain as the service.

2) Situations where a service has multiple sockets and we want to
label them distinctly.

Change-Id: I7ae9088c326a2140e56a8044bfb21a91505aea11
Signed-off-by: Stephen Smalley <sds@tycho.nsa.gov>
2013-08-23 08:35:43 -04:00
Elliott Hughes
5d8554323c Merge "Add USB Vendor ID for ECS" 2013-07-25 16:50:39 +00:00
ecsgms
cae8b9df5c Add USB Vendor ID for ECS
Change-Id: Ib2fa70204d37f53dc642091eb927d865ddc585b5
2013-07-24 16:13:49 +08:00
Colin Cross
f987398723 am 5954ecb8: Merge "Allow more characters in partition name links"
* commit '5954ecb87b8c77425d8cc766c0cc798957a07a7d':
  Allow more characters in partition name links
2013-07-22 15:40:55 -07:00
Colin Cross
5954ecb87b Merge "Allow more characters in partition name links" 2013-07-22 22:39:37 +00:00
Johan Redestig
93ca79b445 Allow more characters in partition name links
We have several partitions with underscores in their names
which would not be properly linked in:
/dev/block/platform/msm_sdcc.1/by-name/

With this change more characters (_-.) are allowed in
partition name links. Also, any other character is
replaced with '_' so the resulting link names have the
same length as the partition name.

Change-Id: I746566c03db98b10326c755692362d2c10e528ae
2013-07-18 10:06:01 +02:00
Elliott Hughes
a570312a56 am f265426f: am 596ee9ea: Merge "Improve the crasher stack-overflow command."
* commit 'f265426f020162b9e8c20fb051f613de3640254b':
  Improve the crasher stack-overflow command.
2013-07-16 10:23:03 -07:00
Elliott Hughes
f265426f02 am 596ee9ea: Merge "Improve the crasher stack-overflow command."
* commit '596ee9ea8ae37b17fbdff91508f55250d528f1d2':
  Improve the crasher stack-overflow command.
2013-07-16 10:21:22 -07:00
Elliott Hughes
596ee9ea8a Merge "Improve the crasher stack-overflow command." 2013-07-16 17:19:58 +00:00
Elliott Hughes
b1be27e29b Improve the crasher stack-overflow command.
Runs a lot quicker, with no intermediate noise.

Change-Id: Icd911ff305da2e0889029dc78d5c2b39f32111c5
2013-07-15 17:19:02 -07:00
Nick Kralevich
9a4913d422 init.rc: remove "on fs" section
This was only ever used by the emulator. Now the emulator
uses an fstab file.

Change-Id: I1a071e567e1f1a379f9c8079cc2dc17660d8455f
2013-07-12 13:48:50 -07:00
Nick Kralevich
7d6ddc7d39 am 2713be91: am fb1c9cf6: Merge "use ext4 instead of yaffs"
* commit '2713be91a84078e8b0b9b755ce17881b750e85a7':
  use ext4 instead of yaffs
2013-07-12 11:20:15 -07:00
Nick Kralevich
2713be91a8 am fb1c9cf6: Merge "use ext4 instead of yaffs"
* commit 'fb1c9cf6fa4efafb3e0c6b0bc93c7f087d926a48':
  use ext4 instead of yaffs
2013-07-12 11:18:26 -07:00
Nick Kralevich
fb1c9cf6fa Merge "use ext4 instead of yaffs" 2013-07-12 18:16:48 +00:00
Elliott Hughes
6b78fad147 am a9396549: Fix my incorrect merge resolution for 132b7d750e harder.
* commit 'a9396549b37d13c518c662c04f6ff42e9ae47c24':
  Fix my incorrect merge resolution for 132b7d750e harder.
2013-07-11 19:10:01 -07:00
Elliott Hughes
a9396549b3 Fix my incorrect merge resolution for 132b7d750e harder.
Change-Id: I3f8bc955f035b49407540053462e53b3f262d381
2013-07-11 19:07:06 -07:00
Elliott Hughes
435640312c am 7b9c33b1: Fix my incorrect merge resolution for 132b7d750e.
* commit '7b9c33b1e0e47f72d0af35d8a948900697da5871':
  Fix my incorrect merge resolution for 132b7d750e.
2013-07-11 19:01:36 -07:00
Elliott Hughes
7b9c33b1e0 Fix my incorrect merge resolution for 132b7d750e.
The conflict was the actual intended change.

Change-Id: Icc9493e4b24b7b53a18e2c7406ef24a81e4d4a7b
2013-07-11 18:58:07 -07:00
Elliott Hughes
dccd777307 am 786b1232: resolved conflicts for merge of 42031e0e to stage-aosp-master
* commit '786b1232d201d46f59bd9da84bfcfcb9ad80bb6c':
  fs_mgr_priv: Extend fs wait timeout to 20 seconds
2013-07-11 18:50:25 -07:00
Elliott Hughes
786b1232d2 resolved conflicts for merge of 42031e0e to stage-aosp-master
Change-Id: I3e6337c258b3e7fb6eee4ed8e3664a69ae219fd6
2013-07-11 18:48:30 -07:00
Ken Sumrall
42031e0ed7 Merge "fs_mgr_priv: Extend fs wait timeout to 20 seconds" 2013-07-10 22:42:37 +00:00
Nick Kralevich
f4c1512db8 use ext4 instead of yaffs
This is needed to allow the emulator to use ext4 images.

Bug: https://code.google.com/p/android/issues/detail?id=38561
Change-Id: I02fde6382ad67cf7f4f3b695396841f70bb9301d
2013-07-09 18:06:11 -07:00
Colin Cross
983939f794 am 149a9b68: am fafcabd0: (-s ours) Merge "Added net.dns1 prop for emulator, as Android emulator ignores it by default."
* commit '149a9b68ab09e4934556e9247ee5f98008a65662':
  Added net.dns1 prop for emulator, as Android emulator ignores it by default.
2013-07-03 15:47:31 -07:00
Colin Cross
149a9b68ab am fafcabd0: (-s ours) Merge "Added net.dns1 prop for emulator, as Android emulator ignores it by default."
* commit 'fafcabd0dd4432de3c7f5956edec23f6ed241b56':
  Added net.dns1 prop for emulator, as Android emulator ignores it by default.
2013-07-03 15:45:16 -07:00
Colin Cross
fafcabd0dd Merge "Added net.dns1 prop for emulator, as Android emulator ignores it by default." 2013-07-03 22:35:42 +00:00
Colin Cross
b1e3bb2798 am b1a9f8cf: resolved conflicts for merge of b6c60285 to stage-aosp-master
* commit 'b1a9f8cf4b15a861ab998a4c5f0c69068f22c62a':
  init: move initial property area allocation into bionic
  property_service: make /dev/__properties__ readable
2013-06-24 17:22:56 -07:00
Colin Cross
b1a9f8cf4b resolved conflicts for merge of b6c60285 to stage-aosp-master
Change-Id: I5afba55b668065499fa28369cf217d4f5eafab4a
2013-06-24 17:19:43 -07:00
Colin Cross
b6c6028594 Merge changes Ieb94caab,I762da21e
* changes:
  init: move initial property area allocation into bionic
  property_service: make /dev/__properties__ readable
2013-06-25 00:07:54 +00:00
Colin Cross
372d668a27 am 39021a48: am 83ada447: Merge changes Ib54f39fd,I7e36edd8
* commit '39021a48a0e0687c654423acd5a4c99a1d79440d':
  init: Retain traditional restart behavior for critical and oneshot services.
  init: Safely restart services to avoid race conditions.
2013-06-24 15:27:43 -07:00
Colin Cross
39021a48a0 am 83ada447: Merge changes Ib54f39fd,I7e36edd8
* commit '83ada447aed69dfcd0a88e952eced8db1e4d6584':
  init: Retain traditional restart behavior for critical and oneshot services.
  init: Safely restart services to avoid race conditions.
2013-06-24 15:24:57 -07:00
Colin Cross
83ada447ae Merge changes Ib54f39fd,I7e36edd8
* changes:
  init: Retain traditional restart behavior for critical and oneshot services.
  init: Safely restart services to avoid race conditions.
2013-06-24 22:23:32 +00:00
Greg Hackmann
2baad52520 init: move initial property area allocation into bionic
bionic's __system_property_add() now expands the property area as needed
by mapping in more pages.  Rather than duplicate the mapping code, move
it inside bionic and have bionic's __system_property_area_init() set up
the first page.

Signed-off-by: Greg Hackmann <ghackmann@google.com>

(cherry picked from commit f14eef0c3c)

Change-Id: Ieb94caab1527c71f2155efe3795490b0ea215a29
2013-06-19 12:26:31 -07:00
Nick Kralevich
26f2d2f519 property_service: make /dev/__properties__ readable
Currently, system properties are passed via the environment
variable ANDROID_PROPERTY_WORKSPACE and a file descriptor passed
from parent to child. This is insecure for setuid executables,
as the environment variable can be changed by the caller.

Make the /dev/__properties__ file accessible, so an app can
get properties directly from the file, rather than relying on
environment variables.

Preserve the environment variable for compatibility with pre-existing
apps.

Bug: 8045561

(cherry picked from commit 7ece0a862c)

Change-Id: I762da21ef4075f288745efed0ec7d16c2b71303c
2013-06-19 12:26:28 -07:00
Colin Cross
9270f12529 am a44c31cc: am e755dfd4: Merge changes I1db3137b,I0f66144e
* commit 'a44c31cc91bce7124e896adb072a10f2740a96b4':
  toolbox: reimplement watchprops using __system_property_foreach()
  libcutils: reimplement property_list() using __system_property_foreach()
2013-06-19 10:35:33 -07:00
Colin Cross
a44c31cc91 am e755dfd4: Merge changes I1db3137b,I0f66144e
* commit 'e755dfd43812ebd9a0d0d6a2106316f343ffb5a2':
  toolbox: reimplement watchprops using __system_property_foreach()
  libcutils: reimplement property_list() using __system_property_foreach()
2013-06-19 10:33:42 -07:00
Colin Cross
e755dfd438 Merge changes I1db3137b,I0f66144e
* changes:
  toolbox: reimplement watchprops using __system_property_foreach()
  libcutils: reimplement property_list() using __system_property_foreach()
2013-06-19 17:32:06 +00:00
Greg Hackmann
68e9b6bc94 toolbox: reimplement watchprops using __system_property_foreach()
Internally, replace the watchlist array with a hashmap since the array
assumes properties are enumerated in a consistent order and foreach()
probably won't.  (find_nth() never guaranteed this either but it usually
worked in practice.)

Signed-off-by: Greg Hackmann <ghackmann@google.com>

(cherry picked from commit 389e358017)

Change-Id: I1db3137b130474f4bb205f01f0bdcf37cf974764
2013-06-18 19:26:28 -07:00
Greg Hackmann
6967935eb3 libcutils: reimplement property_list() using __system_property_foreach()
Signed-off-by: Greg Hackmann <ghackmann@google.com>

(cherry picked from commit e7bb159d16)

Change-Id: I0f66144eb8a4a48e04e4fcd125ad37f19ad94b8e
2013-06-18 19:26:27 -07:00
Elliott Hughes
98c02528a2 am 19188955: am d92e35eb: Merge "Add Qisda usb config"
* commit '19188955b50ef6cb133780f66384e9fa055acfac':
  Add Qisda usb config
2013-06-18 11:35:46 -07:00
Elliott Hughes
19188955b5 am d92e35eb: Merge "Add Qisda usb config"
* commit 'd92e35eb7b97f349054390cfee1d40154dba6d66':
  Add Qisda usb config
2013-06-18 11:32:58 -07:00
Elliott Hughes
d92e35eb7b Merge "Add Qisda usb config" 2013-06-18 18:30:39 +00:00
esther
001fe87e02 Add Qisda usb config
add Qisda usb config
Signed-off-by: esther <esther530@gmail.com>

Change-Id: I5b8a0e5bd2218ecdf417de357c9a7d9307c91932

Conflicts:
	adb/usb_vendors.c
2013-06-18 11:28:08 -07:00
Colin Cross
44d1f3c703 am 99c1a416: resolved conflicts for merge of 95a41f6b to stage-aosp-master
* commit '99c1a4168ba792437f298d31cd4631ff01661476':
  init: fix copying boot properties
  toolbox: hide property implementation from watchprops
  init: verify size of property buffers passed to property_get
  init: move the system property writer implementation
  init: switch property_get to use __system_property_get
2013-06-17 18:24:39 -07:00
Colin Cross
99c1a4168b resolved conflicts for merge of 95a41f6b to stage-aosp-master
Change-Id: Icfae29edf989fb43a7f0b8bda188a9807f76a3b9
2013-06-17 18:19:28 -07:00
Colin Cross
95a41f6b20 Merge changes Ia7b337e1,I7a2d8aa5,Iacc2b42b,Idf6100d1,If3fba2cc
* changes:
  init: fix copying boot properties
  toolbox: hide property implementation from watchprops
  init: verify size of property buffers passed to property_get
  init: move the system property writer implementation
  init: switch property_get to use __system_property_get
2013-06-18 01:11:59 +00:00
Colin Cross
5e484e9c43 init: fix copying boot properties
The previous patch "init: verify size of property buffers passed
to property_get" incorrectly modified one of the callers,
resulting in ro.serialno, ro.bootmode, ro.baseband, and
ro.bootloader always being set to their default values.

Bug: 9469860

(cherry picked from commit 67e3663fc9)

Change-Id: Ia7b337e1fab6e334729f47ee1269e6c736615177
2013-06-17 16:58:14 -07:00
Colin Cross
8196316411 toolbox: hide property implementation from watchprops
(cherry picked from commit 91779634de)

Change-Id: I7a2d8aa507ac61cedc5f67c563531a7d4ec8e4c2
2013-06-17 16:58:09 -07:00
Colin Cross
a5a860ef20 init: verify size of property buffers passed to property_get
Verify that the buffer passed as the value parameter to property_get
is always big enough.

(cherry picked from commit 88ac54a4e8)

Change-Id: Iacc2b42bfe4069e0bfcbb1c48474f30126a93139
2013-06-17 16:58:02 -07:00
Colin Cross
993b6ceeb0 init: move the system property writer implementation
Move the system property writer implementation into bionic to keep
it next to the reader implementation and allow for better testing.

(cherry picked from commit 9f5af63501)

Change-Id: Idf6100d1d0170751acd5163a22597912bff480f0
2013-06-17 16:57:49 -07:00
Colin Cross
1a6f4c3bf2 init: switch property_get to use __system_property_get
(cherry picked from commit 2deedfe0b1)

Change-Id: If3fba2cc1dd5c167b0924ddfe42dbe2e6387208a
2013-06-17 16:57:32 -07:00