Commit graph

5603 commits

Author SHA1 Message Date
Nick Kralevich
29393d69b3 fix another misuse of strncat
This has the potential to overflow "buffer" if the command line
is more than 4K.

Change-Id: Icdfed0d9d21804f290b75787ef3809e0475b14f0
2013-06-03 13:40:11 -07:00
Nick Kralevich
960ac434a4 fix strncat misuse
The third argument of strncat() tells how much data to append from
src, not the total size of the buffer.

Change uses of strncat() to strlcat(), which has the buffer overflow
protection behavior intended by the original author.

This fixes the following compiler warning:

In function 'strncat',
    inlined from 'print_type' at system/core/toolbox/lsof.c:76:12:
bionic/libc/include/string.h:142:5: warning: call to __builtin___strncat_chk might overflow destination buffer [enabled by default]

Change-Id: Id69edc641de3cb87d1867a409cd57b04b12f90a7
2013-06-03 12:13:36 -07:00
Nick Kralevich
e44c6b7183 Merge "property_get: do argument checking." 2013-05-24 21:36:30 +00:00
Nick Kralevich
1c743de2bd Merge "properties.h: avoid duplicating constant values" 2013-05-24 21:36:22 +00:00
Nick Kralevich
90900689e6 Merge "libcutils: Don't build host property support" 2013-05-24 21:36:14 +00:00
Nick Kralevich
cf41bbf311 Merge "adb: Only use properties on device builds" 2013-05-24 21:36:04 +00:00
Tim Murray
d8b11c1ddd Add ATRACE_TAG_RS.
Change-Id: Iaff497a1cb04a797441b5bb47b30ad6f09db8e95
2013-05-23 13:46:12 -07:00
Nick Kralevich
0e54ec825e property_get: do argument checking.
Try to verify, at compile time, that the supplied
value buffer is large enough.

Change-Id: I91fa560d3ceff87609194269356ac634bdbf2ede
2013-05-23 11:05:16 -07:00
Nick Kralevich
53df3ade9b properties.h: avoid duplicating constant values
Use the constant value from sys/system_properties.h,
rather than having two copies of this constant in two
different places.

This partially addresses the TODO in the header file.

Change-Id: Ic0b098cb8caf562ed2a25a0cf8cd412ba2e06884
2013-05-23 11:05:16 -07:00
Nick Kralevich
b39e3a8a4f libcutils: Don't build host property support
Only build property support for the device, not for the
host. Host side property support is being removed, as it
was only really used for the simulator.

process_name.c: When building this for the host, don't
reference properties.

Change-Id: Idcea5ad52a85e47eef17a381cb0601657efbdf13
2013-05-23 11:04:54 -07:00
Nick Kralevich
893a4a47e8 adb: Only use properties on device builds
When building for the host, don't make reference to
property_get / property_set.  I'm in the process of removing
host side support for properties.

Change-Id: I691c5872b5fd538e78bc38a3fe72574cdc7f43c3
2013-05-23 10:37:46 -07:00
The Android Open Source Project
1c15930794 am 54d19aa6: (-s ours) Reconcile with jb-mr2-release - do not merge
* commit '54d19aa66c6d446c97172599a9317caa6c456741':
2013-05-23 08:10:23 -07:00
The Android Open Source Project
54d19aa66c Reconcile with jb-mr2-release - do not merge
Change-Id: I43fb882425fac784151bbf0a313661f3b684ac89
2013-05-23 08:05:48 -07:00
The Android Automerger
cd07446afe merge in jb-mr2-release history after reset to jb-mr2-dev 2013-05-23 05:55:39 -07:00
Matthew Xie
17775724b8 am 5cb9a02b: am 7e723498: Merge "Add permission for bluetooth app in non-primary users" into jb-mr2-dev
* commit '5cb9a02b0322c18b48eb9ce261502c3b830c113c':
  Add permission for bluetooth app in non-primary users
2013-05-22 10:41:26 -07:00
Matthew Xie
5cb9a02b03 am 7e723498: Merge "Add permission for bluetooth app in non-primary users" into jb-mr2-dev
* commit '7e72349865db83d62f98eec8bca4b170712fe0e0':
  Add permission for bluetooth app in non-primary users
2013-05-22 10:38:44 -07:00
Matthew Xie
7e72349865 Merge "Add permission for bluetooth app in non-primary users" into jb-mr2-dev 2013-05-22 17:36:53 +00:00
Matthew Xie
40a91a2884 Add permission for bluetooth app in non-primary users
bug 8954114
Change-Id: Id6a42f5a5beefa22c3cc8eecfb39a2222017a3b4
2013-05-22 10:00:23 -07:00
Ben Cheng
9c917a4c16 Merge "Format stack trace PC offset to 8 digits with leading zeros." 2013-05-21 21:58:28 +00:00
Colin Cross
ea1917f82e am a9e08d3e: am 51a2e4d5: Merge "libsysutils: fix null pointer and memory leak issue"
* commit 'a9e08d3ed60a12f58fc5fdf89f74b4f215ce066f':
  libsysutils: fix null pointer and memory leak issue
2013-05-21 14:44:36 -07:00
Colin Cross
a9e08d3ed6 am 51a2e4d5: Merge "libsysutils: fix null pointer and memory leak issue"
* commit '51a2e4d5d44a6f788da207dff301356e16b4e283':
  libsysutils: fix null pointer and memory leak issue
2013-05-21 14:39:19 -07:00
Colin Cross
51a2e4d5d4 Merge "libsysutils: fix null pointer and memory leak issue" 2013-05-21 21:13:51 +00:00
Ben Cheng
ddc50e67e2 Format stack trace PC offset to 8 digits with leading zeros.
BUG: 9067999
Change-Id: Ib5bbf2d5c166dc27e35386d589536eeb6b078c6a
2013-05-21 12:46:09 -07:00
The Android Open Source Project
4508ef49c0 am 084753ee: (-s ours) Reconcile with jb-mr2-release - do not merge
* commit '084753eedba485673fd070c44bc4a7feb63af483':
2013-05-21 09:02:35 -07:00
The Android Open Source Project
084753eedb Reconcile with jb-mr2-release - do not merge
Change-Id: I7aa2dccba44773db134e6bef703ff9477ed159ba
2013-05-21 08:59:31 -07:00
The Android Automerger
149cbfdafe merge in jb-mr2-release history after reset to jb-mr2-dev 2013-05-21 07:47:06 -07:00
Colin Cross
7195246131 am 5f1a938e: am 3d8e8c14: am 9246f8d6: Merge "init.rc: remove duplicated led-related nodes"
* commit '5f1a938e9c65829c3afebb4d92c8e93caecc3e11':
  init.rc: remove duplicated led-related nodes
2013-05-20 18:26:11 -07:00
Colin Cross
5f1a938e9c am 3d8e8c14: am 9246f8d6: Merge "init.rc: remove duplicated led-related nodes"
* commit '3d8e8c147b41dbc6a5e4edf6da1610a83623b5b2':
  init.rc: remove duplicated led-related nodes
2013-05-20 18:24:21 -07:00
Colin Cross
3d8e8c147b am 9246f8d6: Merge "init.rc: remove duplicated led-related nodes"
* commit '9246f8d6def40a50933a980fac773a909f2138d7':
  init.rc: remove duplicated led-related nodes
2013-05-20 18:16:45 -07:00
gcondra@google.com
a022ce7c80 am 8f6adcfc: am 49be2407: Revert "Add logic to fixup file contexts after a policy update."
* commit '8f6adcfcc55414cc07c18fe47d7c4314da148544':
  Revert "Add logic to fixup file contexts after a policy update."
2013-05-20 16:35:35 -07:00
gcondra@google.com
1e47a74668 am 253e91b4: am 477e35d6: Revert "Add persistent property for SELinux enforcment status."
* commit '253e91b4ffb631b188fdac0c1624786103471f05':
  Revert "Add persistent property for SELinux enforcment status."
2013-05-20 16:35:35 -07:00
gcondra@google.com
acef650dbc am 43329bc1: am 8a387870: Revert "Reload policy after setting up the data partition."
* commit '43329bc1c99c0f5f3670a8aaab39e54df34819a1':
  Revert "Reload policy after setting up the data partition."
2013-05-20 16:35:34 -07:00
gcondra@google.com
104c33992f am f5410f2b: am 3d32cd93: Revert "Remove /system from the dirs to relabel."
* commit 'f5410f2bde6fd5295cad36e3ba3efba0beb92780':
  Revert "Remove /system from the dirs to relabel."
2013-05-20 16:35:34 -07:00
gcondra@google.com
9a8cb3abf8 am b9866649: am 52351300: Revert "Add a version check for SELinux policy on device."
* commit 'b9866649e24d7b6eedcaf2e03ffc605a3417537d':
  Revert "Add a version check for SELinux policy on device."
2013-05-20 16:35:33 -07:00
gcondra@google.com
8f6adcfcc5 am 49be2407: Revert "Add logic to fixup file contexts after a policy update."
* commit '49be240735a06f44e1d91aa51dd299779ad36d96':
  Revert "Add logic to fixup file contexts after a policy update."
2013-05-20 15:52:28 -07:00
gcondra@google.com
253e91b4ff am 477e35d6: Revert "Add persistent property for SELinux enforcment status."
* commit '477e35d6d56c7fe9b2305becdf3ed4f590ddfbd6':
  Revert "Add persistent property for SELinux enforcment status."
2013-05-20 15:52:28 -07:00
gcondra@google.com
43329bc1c9 am 8a387870: Revert "Reload policy after setting up the data partition."
* commit '8a3878700eb9cd8ecf495cd01f15face5c3879c8':
  Revert "Reload policy after setting up the data partition."
2013-05-20 15:52:27 -07:00
gcondra@google.com
f5410f2bde am 3d32cd93: Revert "Remove /system from the dirs to relabel."
* commit '3d32cd938746215e5fa9b1a3c3b78903e043ae73':
  Revert "Remove /system from the dirs to relabel."
2013-05-20 15:52:27 -07:00
gcondra@google.com
b9866649e2 am 52351300: Revert "Add a version check for SELinux policy on device."
* commit '52351300d156826bf22c493828571f45a1cea16a':
  Revert "Add a version check for SELinux policy on device."
2013-05-20 15:52:26 -07:00
Colin Cross
9246f8d6de Merge "init.rc: remove duplicated led-related nodes" 2013-05-20 21:06:59 +00:00
Hong-Mei Li
544a7f7a36 libsysutils: fix null pointer and memory leak issue
In SocketClient::quoteArg function
1. Fix potential null pointer accessing issue
2. Fix potential memory leak introduced by realloc fail

Change-Id: I1ca0f9089290d43452e9a71428244545f4ed866b
Signed-off-by: Hong-Mei Li <a21834@motorola.com>
2013-05-20 17:30:11 +08:00
Sungmin Choi
a8d392da91 init.rc: remove duplicated led-related nodes
Change-Id: Ibee7ef9137594fc4c30d3ab6ee7bdf3515836c62
2013-05-19 21:56:36 -07:00
repo sync
49be240735 Revert "Add logic to fixup file contexts after a policy update."
This reverts commit ebcf93e3bf.
2013-05-17 12:48:34 -07:00
repo sync
477e35d6d5 Revert "Add persistent property for SELinux enforcment status."
This reverts commit b89bdfde42.
2013-05-17 12:48:18 -07:00
repo sync
8a3878700e Revert "Reload policy after setting up the data partition."
This reverts commit fee250d27a.
2013-05-17 12:47:04 -07:00
repo sync
3d32cd9387 Revert "Remove /system from the dirs to relabel."
This reverts commit 3d4d07b2fa.
2013-05-17 12:46:31 -07:00
repo sync
52351300d1 Revert "Add a version check for SELinux policy on device."
This reverts commit 921be8b656.
2013-05-17 12:46:00 -07:00
The Android Open Source Project
a9228942f0 am 19ec15b2: (-s ours) Reconcile with jb-mr2-release - do not merge
* commit '19ec15b247523ec8b0c6651e01bf746674d424d1':
2013-05-16 05:48:14 -07:00
The Android Open Source Project
19ec15b247 Reconcile with jb-mr2-release - do not merge
Change-Id: I731b1db7da9f82dbb92a3e1dc40bfab1a3f307e2
2013-05-16 05:44:17 -07:00
Brian Carlstrom
2579dbcfcf am 3ce15fcc: am de1dadb7: Merge "Disable darwin build"
* commit '3ce15fcc916e097b6a98efc57302e012dab69d6f':
  Disable darwin build
2013-05-15 10:44:02 -07:00