Commit graph

5243 commits

Author SHA1 Message Date
Geremy Condra
ebcf93e3bf Add logic to fixup file contexts after a policy update.
Bug: 8116902

(cherry picked from commit 47677a506f)

Change-Id: I2a50f68a53aee2c94d03d3e5ced1ea36337fde33
2013-04-15 14:59:42 -07:00
Ken Sumrall
ebbe980790 Include liblog in fs_mgr to fix the build.
A recent change to how libcutils is built requires liblog
to be explicitly included in the link list if it's needed.

Change-Id: I8547f5e65c488c8f6e314ccd4eb96606742272be
2013-04-15 12:33:17 -07:00
Ken Sumrall
1a6d9ec2af Merge "fs_mgr: Capture the output of e2fsck and add to the kernel log" into jb-mr2-dev 2013-04-15 17:34:15 +00:00
Ken Sumrall
1f75eb1eae Merge "logwrapper: Add ability to log to kernel log" into jb-mr2-dev 2013-04-15 17:33:44 +00:00
Ken Sumrall
774814d194 Merge "klog: Have klog_write() call klog_init() if needed" into jb-mr2-dev 2013-04-15 17:33:27 +00:00
Ken Sumrall
bf021b4cd7 fs_mgr: Capture the output of e2fsck and add to the kernel log
Currently, the output of e2fsck is not saved, and we have no insight
into how many errors e2fsck is finding and fixing.  Using the new
abbreviated logging feature in liblogwrap, up to the first 100 lines,
and last 4K bytes of the output of e2fsck is captured by fs_mgr, and
added to the kernel log.

Usually, the filesystem will be clean, and this will only add a few
lines to the kernel log on boot, but when things go wrong, it should
save enough to indicate what the problem is, without potentially
filling the kernel log with only e2fsck output if the filesystem is
really corrupted.

Change-Id: I9c264798e6fe721c8f818b5ce15d0975027ddbdd
2013-04-14 17:11:00 -07:00
Ken Sumrall
96e11b5bc4 logwrapper: Add ability to log to kernel log
Also add ability to do abbreviated logging where only the first
4K bytes and last 4K bytes of output are added to the desginated log.

Also update standalog logwrapper command to support the new options.

Change-Id: Ia49cbe58479b9f9ed077498d6852e20b21287bad
2013-04-14 17:10:55 -07:00
Dianne Hackborn
24bc41b78c Add new resources trace.
Change-Id: I63398f282fe7bf04f1c4cefa8f602100f403fa7c
2013-04-12 14:51:43 -07:00
Ken Sumrall
7425fd1b23 klog: Have klog_write() call klog_init() if needed
Also change klog_init() to do nothing if already initialized.

Change-Id: Ia2dfe914c9d9fd119fb8939508d57b15c9884663
2013-04-11 20:03:47 -07:00
Ying Wang
c796ed9746 We need libcutils to include liblog
For some prebuilts were built against libcutils with liblog in it.
Unfortunately that means in the future if someone checks in prebuilts
that are built against libcutils and they don't explicitly link against
liblog, they will again prevent us from removing liblog from libcutils.

Bug: 8587800
Bug: 8580410
Change-Id: I2a5ed6233df7e7d542d1e4167bec405750c0e671
2013-04-10 17:33:48 -07:00
Ying Wang
083b5ccba3 Add liblog
Bug: 8580410
Change-Id: Iab3a9b4307f207c14a04a922cc7350c54e60e9ad
2013-04-09 22:03:45 -07:00
Christopher Tate
7716aef138 Uploaded native crash dumps do not include memory contents
Also fixed the LOG() macro to actually write to the log again, tracking
the change in _LOG() argument semantics.

Bug 8322568

Change-Id: I79330c85c26d3ffb734315b6d0f2c0bb80bd234a
2013-04-05 16:30:15 -07:00
Elliott Hughes
e5f8a692e4 Modify debuggerd to cope with the abort message.
(cherry picked from commit 707b8bbe18)

Bug: 8531731
Change-Id: I2785a07ef83e085f338d3094f9972de23117807c
2013-04-05 15:59:17 -07:00
Jeff Sharkey
b4d52a437e Only handle keycodes when adb is enabled.
This prevents accidental bugreports on userdebug/eng devices.

Bug: 8541006
Change-Id: Iefd15826090fd91434403f197cfd166e64400224
2013-04-04 10:46:33 -07:00
Geremy Condra
c1e47294c9 Merge "Give system ownership of selinux load and enforce files." into jb-mr2-dev 2013-04-03 20:59:33 +00:00
Geremy Condra
8e15eabdc0 Apply the correct SELinux label for the properties workspace.
Change-Id: Ibb9c8044caa9d39ee6ec9fe06d54bb9dc4b56ff3
2013-04-03 11:59:56 -07:00
Geremy Condra
c2594f36e7 Give system ownership of selinux load and enforce files.
This is necessary to enable remote updates.

Change-Id: I05fb979c0360eca4cc6e4add48bb42f712a1ba17
2013-04-03 11:58:12 -07:00
Mathias Agopian
69de9ac00b Merge "move tinyutils into its own namespace" into jb-mr2-dev 2013-04-02 23:19:06 +00:00
Benoit Goby
7f8fb3ffa2 Merge "adb: Prevent registering usb_disconnect twice" into jb-mr2-dev 2013-04-02 01:44:50 +00:00
Benoit Goby
b66356cab6 adb: Prevent registering usb_disconnect twice
adbd can receive multiple AUTH_RSAPUBLICKEY packets. This happens for
example when booting with usb attached when we retry authenticating
after the framework is done booting. Make sure usb_disconnect is only
registered once, otherwise this creates a loop in the disconnects list.

Bug: 8504991
Change-Id: Ia1f9a37005dd17b7eefee1493d622e1679263eea
2013-04-01 17:39:06 -07:00
Mathias Agopian
9857d99eec move tinyutils into its own namespace
I was fed-up with the constant conflicts in Eclipse
with the "libutils" version.

Also fix a few copyright notices.

Change-Id: I8ffcb845af4b5d0d178f5565f64dfcfbfa27fcd6
2013-04-01 16:50:43 -07:00
Christopher Tate
ded2e5acfc debuggerd now notifies the Activity Manager about native crashes
The Activity Manager sets up a permission-guarded domain socket, which
debuggerd connects to when a crash happens.  If this is successful,
the daemon then mirrors the logged crash report to that socket, then
closes it.

Bug 8322568

Change-Id: Ife0c772a628ef82e8457094e511ce1edbfe57460
2013-04-01 10:37:24 -07:00
Nick Kralevich
d67bbab6d8 am a56b0b97: am 191fe44c: Merge "run-as: Don\'t require CAP_DAC_READ_SEARCH"
* commit 'a56b0b97ddd64a9558975c470ea6d09b4f10575e':
  run-as: Don't require CAP_DAC_READ_SEARCH
2013-03-29 10:21:55 -07:00
Nick Kralevich
a56b0b97dd am 191fe44c: Merge "run-as: Don\'t require CAP_DAC_READ_SEARCH"
* commit '191fe44c972e7f45f4bac1cee27522ae244da498':
  run-as: Don't require CAP_DAC_READ_SEARCH
2013-03-29 10:00:56 -07:00
Nick Kralevich
191fe44c97 Merge "run-as: Don't require CAP_DAC_READ_SEARCH" 2013-03-29 16:24:06 +00:00
Nick Kralevich
b0f1540f2a run-as: Don't require CAP_DAC_READ_SEARCH
This is a partial AOSP port of Google internal change
080427e4e2 .

Change-Id: I23a7edc808d227caf3862b035dc2ca39639d9d59
2013-03-29 08:55:06 -07:00
Geremy Condra
46e8991209 am f19e045c: am c8df252f: Merge "run-as: Get seinfo from packages.list and pass to libselinux."
* commit 'f19e045c58dafbdc46e848ec5a5c935f472dea34':
  run-as: Get seinfo from packages.list and pass to libselinux.
2013-03-28 14:32:49 -07:00
Geremy Condra
f19e045c58 am c8df252f: Merge "run-as: Get seinfo from packages.list and pass to libselinux."
* commit 'c8df252fa16d328be197ecc5280a2f8c2aacb5ad':
  run-as: Get seinfo from packages.list and pass to libselinux.
2013-03-28 14:30:36 -07:00
Jamie Gennis
774f929991 libcutils: add support for app tracing
This change adds support for tracing using the ATRACE_TAG_APP tag.  This tag is
enabled only for processes in which the /proc/<pid>/cmdline value appears in
the comma-separated list of such values in the debug.atrace.app_cmdlines system
property.  It is also only enabled if either the ro.debuggable system property
is set to 1 or the application has declared itself debuggable in its manifest,
which gets reported to libcutils by the framework.

Change-Id: Ic94ba55f4e70a9cf994056acbf151e523428b65d
2013-03-28 20:59:31 +00:00
Geremy Condra
c8df252fa1 Merge "run-as: Get seinfo from packages.list and pass to libselinux." 2013-03-28 20:30:57 +00:00
Robert Craig
fced3ded83 run-as: Get seinfo from packages.list and pass to libselinux.
Change allows the proper seinfo value to be passed
to libselinux to switch to the proper app security
context before running the shell.

Change-Id: I9d7ea47c920b1bc09a19008345ed7fd0aa426e87
Signed-off-by: rpcraig <rpcraig@tycho.ncsc.mil>
2013-03-28 06:04:39 -04:00
Geremy Condra
de97f798a1 am bed08333: am c0e1bc1c: Merge "Drop /data/system as a policy file location"
* commit 'bed08333d921e97bc60b81c0f183816386709d79':
  Drop /data/system as a policy file location
2013-03-27 16:42:21 -07:00
Geremy Condra
bed08333d9 am c0e1bc1c: Merge "Drop /data/system as a policy file location"
* commit 'c0e1bc1c755b165574c761e878b6fc26fb340ba0':
  Drop /data/system as a policy file location
2013-03-27 16:40:25 -07:00
Geremy Condra
c0e1bc1c75 Merge "Drop /data/system as a policy file location" 2013-03-27 22:39:47 +00:00
William Roberts
04561b6347 Drop /data/system as a policy file location
/data/system is no longer used as a policy
file location. Use /data/security instead.

Change-Id: Ie77be9e25c67c8a2157c7b6c468f3215a49ead52
2013-03-26 23:33:18 +00:00
Igor Murashkin
d118394d44 Merge "Properly handle cases of multiple inotify events" into jb-mr2-dev 2013-03-26 01:12:44 +00:00
Ziv Hendel
f75ea8d082 Properly handle cases of multiple inotify events
Bug: 8469799
Change-Id: Ie10242dd05becd142cc84651d5e5795e4c02270d
Signed-off-by: Igor Murashkin <iam@google.com>
Signed-off-by: Adam Hampson <ahampson@google.com>
2013-03-25 14:12:18 -07:00
Todd Poynor
6b5de1cda2 init.rc: Set owner/perm for interactive governor io_is_busy
Change-Id: I7537d56a23ca787daf92a9d91778056f987097bd
2013-03-25 13:17:13 -07:00
Geremy Condra
fb39c0d198 am 4d71493e: am e849970c: Merge "Fix mode on /data/security."
* commit '4d71493e74ed1ea39e554146351cc39e47cb5d02':
  Fix mode on /data/security.
2013-03-22 20:54:52 -07:00
Geremy Condra
4d71493e74 am e849970c: Merge "Fix mode on /data/security."
* commit 'e849970c5423cae43da1f7e2ab117117db6e0a64':
  Fix mode on /data/security.
2013-03-22 20:52:37 -07:00
Geremy Condra
e849970c54 Merge "Fix mode on /data/security." 2013-03-23 02:47:16 +00:00
Ying Wang
d0f3e8588a Merge "android_filesystem_config: add /vendor" into jb-mr2-dev 2013-03-22 15:57:59 +00:00
Rom Lemarchand
af3a9cad81 Merge "liblogwrap: use POLLHUP flag to check when a child dies" into jb-mr2-dev 2013-03-21 23:15:36 +00:00
Geremy Condra
9feea559d6 Merge "Create a new location for /data policy files" into jb-mr2-dev 2013-03-21 21:45:39 +00:00
William Roberts
bfd71b489b Create a new location for /data policy files
Adding a new location for policy files under
/data, the new location is /data/security. The
new location is used before attempting to use
any other location.
This requires a new directory to be created by
the init script and an update to the location of
the property_contexts file for property service.

Change-Id: I955a722ac3e51fa6c1b97201b8bdef3f601cf09d
2013-03-21 14:26:12 -07:00
Ian Rogers
62980e817c Inline ldrex/strex for thumb2, remove ARMv5 remnants.
We assume ARMv7 which with thumb2 has ldrex/strex operations that may be
inlined if -mthumb is defined.
Remove remnants of ARMv5 support.

(cherry picked from commit 80c3b278fd)

Change-Id: I194a3d08e933c63f79d48288d9235b4e64099340
2013-03-21 12:37:35 -07:00
Stephen Smalley
c0317a7579 Fix mode on /data/security.
Change-Id: Id97d06a1c360c7871361db147f76b8a2eaceca42
Signed-off-by: Stephen Smalley <sds@tycho.nsa.gov>
2013-03-21 14:25:16 -04:00
Geremy Condra
033b7f2446 am a3c3709e: (-s ours) am 028e38f6: Merge "Create a new location for /data policy files"
* commit 'a3c3709ead0505f1c872bbf3a42999deb727e2ff':
  Create a new location for /data policy files
2013-03-21 01:19:32 -07:00
Geremy Condra
a3c3709ead am 028e38f6: Merge "Create a new location for /data policy files"
* commit '028e38f691c12c3f6f034dd192e5efcae8e767c7':
  Create a new location for /data policy files
2013-03-20 23:45:15 -07:00
Geremy Condra
028e38f691 Merge "Create a new location for /data policy files" 2013-03-21 05:40:26 +00:00