summaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)AuthorFilesLines
2012-07-06Adds a method to retrieve the release channel delegation flag from the ↵chromium.org/factory-2569.BJulian Pastarmov6-0/+26
policy blob. BUG=chromium-os:32339 TEST=unit tests Change-Id: I750b120e855b8b66b0c5884d76d0a0e9f76fc58f Reviewed-on: https://gerrit.chromium.org/gerrit/26856 Reviewed-by: Mattias Nissler <mnissler@chromium.org> Commit-Ready: Julian Pastarmov <pastarmovj@chromium.org> Tested-by: Julian Pastarmov <pastarmovj@chromium.org>
2012-07-02libpolicy: set default symbol visibility to hiddenMike Frysinger5-0/+17
This allows gcc to make assumptions about other symbols and thus avoid going through the PLT. This ends up saving us about ~4KiB of text and ~1KiB of data. BUG=chromium-os:26654 TEST=`emerge-x86-alex libchromeos update_manager metrics` still works TEST=`libpolicy_unittest` passes TEST=`cbuildbot arm-generic-full` passes Change-Id: I93c8a4bd244f611fd44c614c3f7df09f35a80e4a Reviewed-on: https://gerrit.chromium.org/gerrit/16289 Tested-by: Mike Frysinger <vapier@chromium.org> Reviewed-by: Julian Pastarmov <pastarmovj@chromium.org> Commit-Ready: Mike Frysinger <vapier@chromium.org>
2012-06-26libpolicy: only export symbols we want toMike Frysinger2-1/+20
Only the policy namespace is exported in the policy headers, so make sure we hide all other symbols. Otherwise we end up exporting symbols that we imported from libbase. BUG=chromium-os:26654 TEST=`emerge-x86-alex libchromeos update_manager metrics` still works TEST=`libpolicy_unittest` passes TEST=`cbuildbot arm-generic-full` passes Change-Id: I9023e9adb9846f9da6c7a04fddd0d60212d18fc0 Reviewed-on: https://gerrit.chromium.org/gerrit/16288 Reviewed-by: Julian Pastarmov <pastarmovj@chromium.org> Tested-by: Mike Frysinger <vapier@chromium.org> Commit-Ready: Mike Frysinger <vapier@chromium.org>
2012-06-18move string helpers to libcroschromium.org/release-R21-2465.Bchromium.org/factory-2475.BMike Frysinger3-90/+0
The only project using these funcs is libcros, so move them to that project to avoid having to create a small shared library for it. BUG=chromium-os:29973 TEST=`cbuildbot {x86,amd64,arm}-generic-full` worked Change-Id: I55c296408a014c919d2cd58b157e6ccbab98666f Reviewed-on: https://gerrit.chromium.org/gerrit/25043 Commit-Ready: Mike Frysinger <vapier@chromium.org> Reviewed-by: Mike Frysinger <vapier@chromium.org> Tested-by: Mike Frysinger <vapier@chromium.org>
2012-06-13Moved SecureBlob to libchromeos.chromium.org/factory-2460.BDarren Krahn4-0/+196
Previously this class was in the cryptohome module. BUG=chromium-os:27681 TEST=Ran all unit tests and verified SecureBlob tests are running. Change-Id: I8e41dc4b8c2d07129de90ff91de6554fd7fd6097 Reviewed-on: https://gerrit.chromium.org/gerrit/25121 Reviewed-by: Gaurav Shah <gauravsh@chromium.org> Tested-by: Darren Krahn <dkrahn@chromium.org> Commit-Ready: Darren Krahn <dkrahn@chromium.org>
2012-06-07[libchromeos] handle variants in DBusPropertyMapToValueElly Jones1-0/+5
Handle variant types appearing as elements in other containers. BUG=chromium-os:30740 TEST=Adhoc /usr/libexec/debugd/helpers/network_status works with shill now Change-Id: I67f4730e9276d15c55f2721f7cc1b152cc2df99f Signed-off-by: Elly Jones <ellyjones@chromium.org> Reviewed-on: https://gerrit.chromium.org/gerrit/24758 Reviewed-by: Kees Cook <keescook@chromium.org>
2012-06-01Wire up allowed AU connection types with libpolicy.chromium.org/factory-2394.BMattias Nissler6-121/+65
BUG=chromium:31099 TEST=Compiles and passes tests. Change-Id: Ibe0bb31de1238e1a1b6847f5a933b00885636ce9 Reviewed-on: https://gerrit.chromium.org/gerrit/23381 Reviewed-by: Julian Pastarmov <pastarmovj@chromium.org> Commit-Ready: Mattias Nissler <mnissler@chromium.org> Tested-by: Mattias Nissler <mnissler@chromium.org>
2012-05-31Libchrome updates for enterprise policy to scatter downloads of updates.Jay Srinivasan5-0/+36
This CL provides methods to expose the newly added scatter_factor_in_seconds policy. This policy is used to scatter the downloads of ChromeOS updates over a given period of time in order to reduce bandwidth spikes which may otherwise result due to simultaneous downloads in large enterprises. BUG=chromeos-29615: Implement scattering of downloads in UpdateEngine TEST=update_engine works fine with new policy code. Updated unit tests. Change-Id: I1f56b5516970d5988eebb2cf8f93f6905823801d Reviewed-on: https://gerrit.chromium.org/gerrit/21557 Reviewed-by: Jay Srinivasan <jaysri@chromium.org> Tested-by: Jay Srinivasan <jaysri@chromium.org> Commit-Ready: Jay Srinivasan <jaysri@chromium.org>
2012-03-19Propagate new device policies for enterprise auto-update controls.chromium.org/release-R20-2268.Bchromium.org/release-R19-2046.Bchromium.org/firmware-link-2348.Bchromium.org/factory-2368.Bchromium.org/factory-2338.Bchromium.org/factory-2305.Bchromium.org/factory-2268.16.BJay Srinivasan4-0/+52
Enterprise admins needs more control over Chrome OS auto-update behavior. This CL propagates the newly added fields in the chrome_device_proto so that update_engine can consume it. BUG=27307: Implement StopAutoUpdate based on enterprise policy TEST=ChromeOS updateengine works. CQ-DEPEND=I873981e171b5e40ae0e16ba954042e228b5d23be Change-Id: I61a498280c3ccca674e74581f1b03364d7896bc2 Reviewed-on: https://gerrit.chromium.org/gerrit/18398 Reviewed-by: Jay Srinivasan <jaysri@chromium.org> Tested-by: Jay Srinivasan <jaysri@chromium.org> Commit-Ready: Jay Srinivasan <jaysri@chromium.org>
2012-03-07libchromeos: build SLOT-ed shared librarieschromium.org/factory-1987.BMike Frysinger3-40/+121
This merges the SLOT-ed libchrome into a SLOT-ed shared libchromeos. Now all apps wil link against libchromeos rather than libbase. This allows us to lock things in and track the dependencies. The fallout is that we no longer build a static libchromeos. Similarly for libpolicy, SLOT it and stop building libpolicy.a. BUG=chromium-os:26736 TEST=`FEATURES=test emerge libchromeos` works TEST=build_packages+build_image for x86-alex boots TEST=`cbuildbot arm-generic-full` works TEST=`cbuildbot x86-generic-full` works URL: https://groups.google.com/a/chromium.org/group/chromium-os-dev/browse_thread/thread/75a1fdee269c41e4 Change-Id: Ibccd471f2cde7901f71750a3d67fd8ecb36dab40 Reviewed-on: https://gerrit.chromium.org/gerrit/16763 Reviewed-by: Kees Cook <keescook@chromium.org> Reviewed-by: Chris Masone <cmasone@chromium.org> Tested-by: Mike Frysinger <vapier@chromium.org> Commit-Ready: Mike Frysinger <vapier@chromium.org>
2012-03-07process: include base/stringprintf.h directlyMike Frysinger1-0/+1
This code uses StringPrintf, but doesn't include the header. Older versions of libbase would implicitly include it, but newer ones do not. So include it ourselves to fix building with newer versions. BUG=chromium-os:25872 TEST=`emerge-x86-alex libchromeos` works (with newer and older libbase) Change-Id: I85ab12874374d7345789a78a67a40f3b79171c84 Reviewed-on: https://gerrit.chromium.org/gerrit/17473 Reviewed-by: Jason Glasgow <jglasgow@chromium.org> Commit-Ready: Mike Frysinger <vapier@chromium.org> Tested-by: Mike Frysinger <vapier@chromium.org>
2012-02-29Update libpolicy.h to find scoped_ptr.h in <base/memory>.Eric Shienbrood1-1/+1
This is in preparation to the move to a newer libchrome, where scoped_ptr.h no longer appears in base, just in base/memory. BUG=chromium-os:16623 TEST=Do the emerge, and then examine /usr/include/policy/libpolicy.h Change-Id: Ibfd200347084cf15de0168fd86d1a39eac1c96db Reviewed-on: https://gerrit.chromium.org/gerrit/17078 Reviewed-by: Darin Petkov <petkov@chromium.org> Reviewed-by: Eric Shienbrood <ers@chromium.org> Tested-by: Eric Shienbrood <ers@chromium.org> Commit-Ready: Eric Shienbrood <ers@chromium.org>
2012-02-28clean up env handlingMike Frysinger1-46/+43
This fixes up a few issues with the env handling: - unifies duplicate base setup between libchromeos and libpolicy - sets up sane defaults for ROOT and PKG_CONFIG - respects build env CPPFLAGS and LDFLAGS BUG=chromium-os:26654 TEST=`emerge-x86-alex libchromeos update_manager metrics` still works TEST=`libpolicy_unittest` passes TEST=`cbuildbot arm-generic-full` passes Change-Id: I0a165d8d90ecfbc6652e26349b0d38cabd739d9e Reviewed-on: https://gerrit.chromium.org/gerrit/16287 Reviewed-by: Mike Frysinger <vapier@chromium.org> Tested-by: Mike Frysinger <vapier@chromium.org> Commit-Ready: Mike Frysinger <vapier@chromium.org>
2012-02-17fix libpolicy dependencies with generated protoc filesMike Frysinger1-1/+2
There is a race condition with the libpolicy build where scons will try to compile the non-generated files before the protoc execution has finished, and that fails since those non-generated files need the generated headers. Make sure we list the headers as being generated outputs too so that scons won't try to build the source files that need those headers before they are available. BUG=None TEST=add `sleep 10s` before `protoc` in SConstruct and see `scons libpolicy.a -j 100` no longer fail Change-Id: Ief4048a792d8f0fd3f0638b4e7457de433b056b3 Reviewed-on: https://gerrit.chromium.org/gerrit/16099 Reviewed-by: David James <davidjames@chromium.org> Tested-by: Mike Frysinger <vapier@chromium.org> Commit-Ready: Mike Frysinger <vapier@chromium.org>
2012-02-16Use new name of the ephemeral_users device policyBartosz Fabianowski5-15/+18
This CL updates libpolicy to reflect the renaming of the ephemeral_users device policy to ephemeral_users_enabled. Note: Three different Chrome OS packages refer to the policy by name. The CLs for these must be committed together. BUG=chromium-os:26406 TEST=libpolicy_unittest CQ-DEPEND=If93e33a06c667e88a5c9f69d2caaf738b9dae11d CQ-DEPEND=I9a8c8e1a112304242fb42f6d6d660c9e3cb289f1 Change-Id: I41cfbcba1bd712104afe18ec61dadc9ccf0add08 Reviewed-on: https://gerrit.chromium.org/gerrit/15979 Reviewed-by: Julian Pastarmov <pastarmovj@chromium.org> Tested-by: Bartosz Fabianowski <bartfab@google.com> Commit-Ready: Bartosz Fabianowski <bartfab@google.com>
2012-02-10Add helpers for working with multi home mount pointsBartosz Fabianowski2-10/+67
This CL adds helper functions for setting and retrieving previously harcoded path components. An additional helper function checks whether a given string corresponds to an obfuscated/sanitized user name. These helpers will be used by cryptohomed in the fix for issue 20004. BUG=chromium-os:25861 TEST=all previous tests should pass CQ-DEPEND=I09616bbbe5b57815ce377d209444c8c1876e9499 Change-Id: Iec5cb5109732a5adb3893f316fb961eb4168b416 Reviewed-on: https://gerrit.chromium.org/gerrit/15237 Reviewed-by: Elly Jones <ellyjones@chromium.org> Commit-Ready: Bartosz Fabianowski <bartfab@google.com> Tested-by: Bartosz Fabianowski <bartfab@google.com>
2012-02-09libchromeos: add option to include meta-data in syslogmukesh agrawal2-4/+12
BUG=chromium-os:24539 TEST=manual manual testing: built shill with and without chromeos::kLogHeader option. observed that syslog messages included header (<date>/<timestamp>:<severity>:<file>(<line>) when option was present. observed that syslog messages did not include header when option was absent. Change-Id: I8792d1b7ac591bf45cdeb06714b824b14b08eaf4 Reviewed-on: https://gerrit.chromium.org/gerrit/15631 Reviewed-by: Chris Masone <cmasone@chromium.org> Reviewed-by: Thieu Le <thieule@chromium.org> Commit-Ready: mukesh agrawal <quiche@chromium.org> Tested-by: mukesh agrawal <quiche@chromium.org>
2012-02-07Extend libpolicy to provide access to all device policy fieldsBartosz Fabianowski9-25/+209
This CL extends libpolicy so that it provides access to all fields of the device policy protobuf. That also includes the ephemeral users policy which is being added to the protobuf on the Chrome side in the following CL: https://chromiumcodereview.appspot.com/9104038/ This CL should be committed once the above CL goes in and the version of the chromeos-base/protofiles ebuild has been bumped to pull in the new protobuf files. BUG=chromium-os:20004 TEST=libpolicy_unittest CQ-DEPEND=Ie7e0e5e1ee4deb4e2cce46702e3d865f27efcfce Change-Id: I09616bbbe5b57815ce377d209444c8c1876e9499 Reviewed-on: https://gerrit.chromium.org/gerrit/15147 Reviewed-by: Julian Pastarmov <pastarmovj@chromium.org> Tested-by: Bartosz Fabianowski <bartfab@google.com> Commit-Ready: Bartosz Fabianowski <bartfab@google.com>
2012-01-30Extend libpolicy to also retrieve the device ownerBartosz Fabianowski5-15/+44
The policy blob contains information about the device owner. This extends libpolicy with a DevicePolicy::GetOwner() that retrieves the device owner's e-mail address from the policy blob. BUG=chromium-os:25416 TEST=libpolicy_unittest Change-Id: I1bf8923b794528afea5ce216e4056e29c4d11593 Reviewed-on: https://gerrit.chromium.org/gerrit/14702 Reviewed-by: Julian Pastarmov <pastarmovj@chromium.org> Commit-Ready: Bartosz Fabianowski <bartfab@google.com> Tested-by: Bartosz Fabianowski <bartfab@google.com>
2012-01-23[libchromeos] Add DBus*ToValue().Elly Jones4-1/+385
Add DBus{Message,MessageIter,PropertyMap}ToValue to convert DBus types to libbase Value types. BUG=chromium-os:23839 TEST=unit Change-Id: Iaa00fae1577f21dc4fd39fe909970aaba97a7ff4 Signed-off-by: Elly Jones <ellyjones@chromium.org> Reviewed-on: https://gerrit.chromium.org/gerrit/13814 Reviewed-by: Kees Cook <keescook@chromium.org>
2012-01-17[libchromeos] update .pc file to use libchrome.pcElly Jones2-5/+6
BUG=chromium-os:24959 TEST=build Change-Id: I45efecc46e6a696dfaa5543ace9d3de90119c59d Signed-off-by: Elly Jones <ellyjones@chromium.org> Reviewed-on: https://gerrit.chromium.org/gerrit/14094 Reviewed-by: Mike Frysinger <vapier@chromium.org>
2012-01-12[libchromeos] add other deps to pkg-configElly Jones1-1/+1
BUG=chromium-os:24959 TEST=Adhoc Built every package depending directly on libchromeos. Change-Id: Idb9391c5a0e7f2ad48910c6ce4346958a4c774d3 Signed-off-by: Elly Jones <ellyjones@chromium.org> Reviewed-on: https://gerrit.chromium.org/gerrit/13991 Reviewed-by: Mike Frysinger <vapier@chromium.org>
2012-01-11[libchromeos] add pkg-config file.Elly Jones1-0/+5
BUG=chromium-os:24959 TEST=Adhoc emerge-$board libchromeos Change-Id: Ic508fea4b98cd2c68abe7e5028018d5398fa0e85 Signed-off-by: Elly Jones <ellyjones@chromium.org> Reviewed-on: https://gerrit.chromium.org/gerrit/13984 Reviewed-by: Mike Frysinger <vapier@chromium.org>
2011-12-07process: don't close child fds before finishing bindingElly Jones1-0/+4
Leaving the child fds open allows for the same child fd to be bound to multiple fds. BUG=None TEST=Adhoc Build, build debugd, run ping in an erroneous way. Change-Id: Idac0bdf8bf6bc5ea007d2d8a949a7cc6e2739d54 Signed-off-by: Elly Jones <ellyjones@chromium.org> Reviewed-on: https://gerrit.chromium.org/gerrit/12568
2011-12-07process: add BindFd method.Elly Jones4-0/+43
This method binds the specified file descriptor from the parent to the specified file descriptor in the child, ala dup2(2). This is necessary if we want to pass a socket to the child: if we have a socket fd s, and we use RedirectUsingPipe, we end up with: [child process] child_fd <----> parent_fd [parent] s <--- ... There's nothing the parent can do to link parent_fd with s, though: dup2(parent_fd, s) throws away s, and dup2(s, parent_fd) throws away any input buffered on parent_fd by the child. BUG=chromium-os:22533 TESTED_ON=x86-generic TEST=Build,unittest,trybot Try: http://naya.i.corp.google.com/tries/80df9824-5a62-42e3-8706-c8b3a07d72cb.txt Change-Id: Id52fc7743a92d211b3620f1da4a33e4554b6406d Signed-off-by: Elly Jones <ellyjones@chromium.org> Reviewed-on: https://gerrit.chromium.org/gerrit/12388
2011-10-17libchromeos: move mountpoints into subdirectorieschromium.org/release-R17-1412.Bchromium.org/release-R16-1193.Bchromium.org/firmware-uboot_v2-1299.Bchromium.org/firmware-kiev-2.112.Bchromium.org/factory-1412.Bchromium.org/factory-1284.Bchromium.org/factory-1235.BElly Jones1-2/+2
This lets us set permissions that apply to all user directories or all root directories. BUG=chromium-os:16681,chromium-os:20778 TEST=None Change-Id: I240fe94590b592a983d0a9f37addf2b0cd081c1e Signed-off-by: Elly Jones <ellyjones@chromium.org> Reviewed-on: http://gerrit.chromium.org/gerrit/10173 Reviewed-by: Will Drewry <wad@chromium.org>
2011-10-11libchromeos: Add Get{User,Root}Path.Elly Jones3-1/+123
BUG=chromium-os:20778, chromium-os:16681 TEST=None yet Change-Id: I211274b2abe961ae60a3402d5dd67fc2e7a5d21d Signed-off-by: Elly Jones <ellyjones@chromium.org> Reviewed-on: http://gerrit.chromium.org/gerrit/8571 Reviewed-by: Gaurav Shah <gauravsh@chromium.org>
2011-09-22dbus: Remove func that sends signal with no argsSimon Que2-31/+0
SendSignalWithNoArgumentsToSystemBus() is no longer being used. Delete. BUG=chromium-os:20115 TEST=none Change-Id: Ia928bdc466ba4e2d128859b37717931e41f0e523 Signed-off-by: Simon Que <sque@chromium.org> Reviewed-on: http://gerrit.chromium.org/gerrit/8174 Reviewed-by: Satoru Takabayashi <satorux@chromium.org>
2011-09-21dbus: Add function to issue no-reply method callSimon Que2-0/+19
Analogous to the existing SendSignalWithNoArgumentsToSystemBus(). BUG=chromium-os:20115 TEST=none Change-Id: I37bff8827c77c2abd7cd5528cca5e3a627b74698 Signed-off-by: Simon Que <sque@chromium.org> Reviewed-on: http://gerrit.chromium.org/gerrit/8093 Reviewed-by: Satoru Takabayashi <satorux@chromium.org>
2011-09-21Changed the project to use the proto files from the protofiles project.Julian Pastarmov3-365/+1
These used to be copied internally for solving the needed dependency on chromes-chrome. BUG=chromium-os:18342 TEST=The project should still build happily afterwards. Change-Id: If6680179524a73f0c808d7c763606355adaca31a Reviewed-on: http://gerrit.chromium.org/gerrit/4925 Tested-by: Julian Pastarmov <pastarmovj@chromium.org> Commit-Ready: Julian Pastarmov <pastarmovj@chromium.org> Reviewed-by: Julian Pastarmov <pastarmovj@chromium.org>
2011-09-09Reduced the amount of output from the policy lib.chromium.org/factory-1020.BJulian Pastarmov2-3/+1
It used to be way to verbose for situations that are not considered fatal errors for the OOBE stage in ChromeOS. BUG=chromium-os:20043 TEST=Less frowns on the faces of QA. Change-Id: I1dd0ab7ccc08f7cc496ffce95566e02082f05a9c Reviewed-on: http://gerrit.chromium.org/gerrit/7259 Reviewed-by: Ken Mixter <kmixter@chromium.org> Tested-by: Julian Pastarmov <pastarmovj@chromium.org>
2011-08-16Remove dbus/service_constants.h from libchromeos.git.chromium.org/test-982.Bchromium.org/release-1011.Bchromium.org/factory-980.BSatoru Takabayashi1-517/+0
This file is now maintained in system_api.git. BUG=chromium-os:19054 TEST=emerge-x86-alex libchromeos system_api chromeos-login Change-Id: I39aa63d1b1402c4aae284a8c65f83aa71ca5aa56 Reviewed-on: http://gerrit.chromium.org/gerrit/6120 Tested-by: Satoru Takabayashi <satorux@chromium.org> Reviewed-by: Chris Masone <cmasone@chromium.org>
2011-08-16libchromeos: add session-service constants.Elly Jones2-0/+5
BUG=chromium-os:19040 TEST=None (no functional change) Change-Id: I8213e29c2114344155498ce6a552f50c252d6bed Signed-off-by: Elly Jones <ellyjones@chromium.org> Reviewed-on: http://gerrit.chromium.org/gerrit/5756 Reviewed-by: Gaurav Shah <gauravsh@chromium.org>
2011-08-12Move definitions of D-Bus string contants from .cc file to .h file.Satoru Takabayashi3-880/+387
This will make it easier to use the constants. All you have to do is just to include the header file. No need to link libchromeos. The goal is to share the constants with Chrome. The patch was created by a Python script, which has been uploaded to crosbug.com/19054 This change will reduce the binary size, as the compiler will be able to eliminate unused constants, whereas all the constants were embedded into the binary as part of libchromeos.a, regardless of whether they are used or not, before this change. The following is the result from libcros and session_manager (chromeos-login). -rwxr-xr-x 1 satorux eng 690048 Aug 11 11:22 libcros.so.before -rwxr-xr-x 1 satorux eng 655788 Aug 11 11:53 libcros.so.after -rwxr-xr-x 1 satorux eng 865108 Aug 11 16:02 session_manager.before -rwxr-xr-x 1 satorux eng 855428 Aug 11 16:04 session_manager.after BUG=chromium-os:19054 TEST=emerge packages that use service_constants.h: libchromeos cromo cros-disks libcros chromeos-cryptohome chromeos-imageburner chromeos-login power_manager shill speech_synthesis chromeos-wm Change-Id: I83d360a201f8936d76731de255bc8caf2e3ee0be Reviewed-on: http://gerrit.chromium.org/gerrit/5854 Tested-by: Satoru Takabayashi <satorux@chromium.org> Reviewed-by: Chris Masone <cmasone@chromium.org>
2011-08-11Remove the #include of error_constants.h from service_constants.h.Satoru Takabayashi1-4/+0
All source files that reference the error constants have been modified to include error_constants.h. BUG=chromium-os:19054 TEST=emerge libchromeos and chromeos-login Change-Id: Id7996e7736e21f685f0bc2bbc56768dfbaba1dde Reviewed-on: http://gerrit.chromium.org/gerrit/5826 Tested-by: Satoru Takabayashi <satorux@chromium.org> Reviewed-by: Chris Masone <cmasone@chromium.org>
2011-08-11Separate error constants from service_constants.h.Satoru Takabayashi5-27/+48
The error constants are not D-Bus service constants like service names. We'll remove #include "error_constants.h" from system_constants.h, once all files that needs the error constants are modified. BUG=chromium-os:19054 TEST=emerge libchromeos and chromeos-login Change-Id: Ie6a0bfb63d1000fa2effc8f11a3c58cf8290b70b Reviewed-on: http://gerrit.chromium.org/gerrit/5798 Tested-by: Satoru Takabayashi <satorux@chromium.org> Reviewed-by: Chris Masone <cmasone@chromium.org>
2011-08-03Add release channel device policy to libpolicy.chromium.org/firmware-u-boot-v1chromium.org/firmware-881-u-boot-v1chromium.org/0.15.877.BPatrick Dubroy5-1/+28
BUG=chromium-os:17015 TEST=Added one new test to check that the method returns false when the release channel is not specified in the policy. Change-Id: I3c8b4ea9d7d21b685802bcaf60b4394f91709756 Reviewed-on: http://gerrit.chromium.org/gerrit/5068 Tested-by: Julian Pastarmov <pastarmovj@chromium.org> Reviewed-by: Julian Pastarmov <pastarmovj@chromium.org>
2011-07-22Added MonitorConnection template with 4 arguments.chromium.org/0.14.811.Btbarzic1-1/+46
BUG=chromium-os:17673 TEST=NONE Change-Id: Icd3d6aa65f8696f9b2dd12b28d638c0cf8f58302 Reviewed-on: http://gerrit.chromium.org/gerrit/4447 Reviewed-by: Zelidrag Hornung <zelidrag@chromium.org> Tested-by: Toni Barzic <tbarzic@chromium.org>
2011-07-22Fix libchromeos build script to work on arm as well.Julian Pastarmov1-4/+6
BUG=chromium-os:17011 TEST=Build on arm should not fail. Change-Id: I8f0b32565e5d55fc91b00cbf5e1672c3f983aa48 Reviewed-on: http://gerrit.chromium.org/gerrit/4572 Reviewed-by: Ken Mixter <kmixter@chromium.org> Tested-by: Ken Mixter <kmixter@chromium.org> Tested-by: Julian Pastarmov <pastarmovj@chromium.org>
2011-07-21Added libpolicy to the repo.Julian Pastarmov14-2/+1245
BUG=chromium-os:17011 TEST=libpolicy_unittest Change-Id: I2bc0bdecbb421ad72ceb5c4edde9436417ebf7c3 Reviewed-on: http://gerrit.chromium.org/gerrit/3130 Reviewed-by: Ken Mixter <kmixter@chromium.org> Tested-by: Julian Pastarmov <pastarmovj@chromium.org>
2011-06-28Add definitions related to controlling the keyboard backlight.chromium.org/780.BDoug Anderson2-0/+8
BUG=chrome-os-partner:3482 TEST=Along with other changes, validated that dbus signal to powerd can control keylight. Change-Id: I491173aefd5781ec36572e31859297d601467517 Reviewed-on: http://gerrit.chromium.org/gerrit/3210 Tested-by: Doug Anderson <dianders@chromium.org> Reviewed-by: Daniel Erat <derat@chromium.org>
2011-06-21[libchromeos] Add way more flimflam property namesChris Masone2-34/+450
BUG=chromium-os:16343 TEST=build it, and all dependent packages Change-Id: I762ef8359332b8f08bba6358fe53baa81c4da4ff Reviewed-on: http://gerrit.chromium.org/gerrit/2660 Reviewed-by: Chris Masone <cmasone@chromium.org> Tested-by: Chris Masone <cmasone@chromium.org>
2011-06-21Add constants for user policy calls.Mattias Nissler2-0/+4
BUG=chromium-os:15189 TEST=none R=cmasone Change-Id: Ic37ab55c864b152c60df07481c1bdb1e14993b16 Reviewed-on: http://gerrit.chromium.org/gerrit/2843 Tested-by: Mattias Nissler <mnissler@chromium.org> Reviewed-by: Chris Masone <cmasone@chromium.org>
2011-06-08[libchromeos] Add flimflam, cashew, modemmanager constantsChris Masone2-0/+286
BUG=chromium-os:16303 TEST=emerge libchromeos, libcros to ensure new libchromeos header can co-exist with existing libcros headers Change-Id: I1a61406484a6e8814fd17fa9ec8557d8c369ec14 Reviewed-on: http://gerrit.chromium.org/gerrit/2313 Reviewed-by: Vince Laviano <vlaviano@chromium.org> Tested-by: Chris Masone <cmasone@chromium.org>
2011-06-08[common] remove shockingly obsolete debian stuffChris Masone6-84/+0
BUG=None TEST=emerge-BOARD libchromeos Change-Id: I9b8a0ea45264038a9dc5329908263a2320f036d1 Reviewed-on: http://gerrit.chromium.org/gerrit/2297 Reviewed-by: Daniel Erat <derat@chromium.org> Tested-by: Chris Masone <cmasone@chromium.org>
2011-05-27libchromeos: add kSessionManagerRetrieveSessionState.chromium.org/0.13.587.BDaniel Erat2-154/+157
BUG=chromium-os:15294 TEST=none Change-Id: Ic557f772acc9c1b56e6c4978fd88060bbb356073 Reviewed-on: http://gerrit.chromium.org/gerrit/1727 Tested-by: Benson Leung <bleung@chromium.org> Reviewed-by: Benson Leung <bleung@chromium.org> Tested-by: Daniel Erat <derat@chromium.org>
2011-05-24[libchromeos] Take advantage of new params in logging callback, handle VLOG()chromium.org/0.13.558.BChris Masone1-11/+6
When we moved to the newer libbase stuff, the base::logging callbacks added a param called |message_start| This points to the same place in the log message that we used to heurisitcally search for, so now just go ahead and use it. Also, VLOG() calls (which we can now do) pass a value for |severity| that we couldn't handle. Now, set it to syslog's LOG_DEBUG level. BUG=None TEST=build shill with new libchromeos.a, run it and see verbose messages get logged correctly, along with normal LOG(INFO) stuff Change-Id: Idcea88ba45add901685b94d157db788e9e2d5162 Reviewed-on: http://gerrit.chromium.org/gerrit/1510 Reviewed-by: Robert Ginda <rginda@chromium.org> Tested-by: Chris Masone <cmasone@chromium.org>
2011-05-14[libchromeos] Roll forward to libchrome 84780(ish)Chris Masone2-3/+9
Header files have moved. BUG=chromium-os:14304 TEST=build Change-Id: Ied759c2f84fcdaa7aa7e9a77fd84a6dfffb92ee0 Reviewed-on: http://gerrit.chromium.org/gerrit/811 Reviewed-by: Robert Ginda <rginda@chromium.org> Tested-by: Chris Masone <cmasone@chromium.org>
2011-05-12Change GID of the child process first before changing the UID.chromium.org/0.13.509.BGaurav Shah1-4/+4
When dropping privileges, once the EUID of the process changes, it may no longer have the permissions to changes its EGID. BUG=none TEST=manual Change-Id: Iba1be351331a1579fce9f5ccad82a375b5d59e5e Reviewed-on: http://gerrit.chromium.org/gerrit/575 Tested-by: Gaurav Shah <gauravsh@chromium.org> Reviewed-by: Ken Mixter <kmixter@chromium.org>
2011-05-12Add a SafeMemcmp function to the common libraryGaurav Shah2-0/+21
The safe memory comparison performs the operation in time independent of the relationship between the 2 strings compared. BUG=chromium-os:5295 TEST=emerge-{x86|arm}-generic chromeos-base/libchromeos Change-Id: Ibb6a4b6b14ca72e41e5442691364dcd192036a63 Reviewed-on: http://gerrit.chromium.org/gerrit/796 Reviewed-by: Chris Masone <cmasone@chromium.org> Tested-by: Gaurav Shah <gauravsh@chromium.org>