Age | Commit message (Collapse) | Author |
|
/data is not guaranteed to be mounted when 'boot' triggers.
'post-fs-data' guarantees that. Also, move the daemon to class
'late_start', since post-fs-data will not happen in time for class
'main'.
Bug: 25373880
Change-Id: I524f0a3e20696f502e534669aebb4d388c6822ea
|
|
For Brillo devices, it is required to use the AP mode interface
that's setup using the HAL API. So explicitly setup an AP mode
interface using the HAL API, and wait for the interface to
enumerated before starting the AP service.
This is achieved by handling the Start request asynchronously.
Also explicitly update the AP Config to use the newly created
AP interface, to avoid the Config from auto selecting a wrong
interface in the case when multiple AP-capable interfaces are
presented.
Bug: 25113165
TEST=Device setup works on both Brillo boards
Change-Id: Icdee32e8bab9cf41a467058aef5ea081562a3442
|
|
This allows us to handle this D-Bus call asynchronously for Brillo
devices. Since we want to wait for the newly created AP interface
to be enumerated before starting the service.
For now, this handler will return synchronously on both Chrome OS
and Brillo. A separate CL (CL:178864) will update this handler to
return asynchronously on Brillo.
While there, remove the unnecessary mock function for Service.Start
and Service.Stop, since these are D-Bus method handlers. Even though
the MockService class is now empty, we might still need it when we
remove the D-Bus dependency from the Service class (b/24194427),
so keep it for now.
Bug: 25113165
TEST=Unittest on both Chrome OS and Brillo
TEST=Manual test on both Chrome OS and Brillo
Change-Id: If0ba13ae89a25bdf9207803d7d6b008e9ad6165e
|
|
This avoids a race condition where weaved tries to start an AP service
before WiFi driver is initialized.
Bug: 25341872
TEST=Device setup on both Brillo boards
Change-Id: Iadaa7a6b18dab5adb21ba02d12d7704dabb40332
|
|
|
|
BUG: 24872993
Change-Id: I750c137a9dab339a9ec9629fb906eddd1109e4b7
|
|
Android complains about memory leakage when using singleton
for mock objects, and it is not really necessary to use
singleton for mock objects either. So remove the singleton
from those objects.
While there, update the binary path for "sleep" on Android,
which is used for starting a dummy process in the test.
Bug: 25186794
TEST=Run apmanager_test on Brillo board
TEST=Run unittests for Chrome OS
Change-Id: Ifb5a5c6876aa67a94411d823109c14a209a46d86
|
|
This is needed to allow apmanager to setup an AP/station mode
interface when starting/stopping an AP service.
Bug: 25113165
TEST=Device setup on Brillo boards
Change-Id: I2b5b708409fe1c59e0333b1e4347d46ba0162847
|
|
This removes the IPC specific (D-Bus) dependencies from FirewallManager
and ShillManager.
Bug: 24194427
TEST=Verify wifi bootstrapping on both dragonboard (Android) and wolf
TEST=(Chrome OS)
Change-Id: Iac3b91300f938e8080d6ab4513fe84dea2880693
|
|
Only define/implement APIs for creating proxies for now.
Bug: 24194427
TEST=Compile for both Android and Chrome OS
Change-Id: I55d387abd0104ab808343f244be5acaa8a4c8549
|
|
libchromeos is transitioning to libbrillo and chromeos namespaces
and include directory is changing to brillo.
Bug: 24872993
TEST=built for aosp and brillo, all unit tests pass on dragonboard
Change-Id: I4c6efbc5bbf80d251e5d91bc3db49f02bc0e4732
|
|
We're using different user/group and file path on Android, so update
these expectations in unittest for Android.
While there, rename apmanager_unittest to apmanager_test, which seems
to be the convention for unittest target name on Android.
Bug: 24707201
TEST=Run unittest on dragonboard
TEST=Run unittest for Chrome OS
Change-Id: Ibd6880a713117578b68c814edc7e1cefe9170c75
|
|
Bug: None
Change-Id: I28500105c27014c7bfd490bfa84faf83bc5580d1
|
|
Bug:24575517
TEST=Verify apmanager is running after dragonboard started
Change-Id: I43070b3dcb5e03dfc54bc54c05859f0af25b71ad
|
|
Switch to use ShillDBusProxy now that libshill-client is ready.
Bug: None
TEST=Start AP service with shill running
Change-Id: I53eb12c80badb8855684caa25cdd1a3bd9f2f493
|
|
dnsmasq normally creates a pid file in /var/run/dnsmasq.pid, which
doesn't exist on Android. So specify the pid file to a valid file
path on Android.
Bug: 22828115
TEST=Manual test on dragonboard
Change-Id: Ibd1db2d4df71d2693204307ad6886132da4187b7
|
|
We currently do not have a dedicated user/group for apmanager on
Android. So update the code to use "system" user/group for now.
Bug: 22828115
TEST=Manual test on dragonboard
Change-Id: I5d327f3d42ff9fe8895e4e9f4fb8477c904d43df
|
|
Android is using <service>.rc instead of init.<service>.rc.
While there, include the init file in the build target and
remove the seclabel from the init file.
Bug: 22828115
TEST=Manual test on dragonboard
Change-Id: Ia29cb197ec1ebca5d3003d62e9f24060bffd073a
|
|
When starting apmanager through Android's init system, the daemon
will be started under "system" user, and that's currently targeted
user for running apmanager. So there is no need to use minijail to
drop the user privileges to "system" user" again.
So skip this for now until we create a new user/group to run apmanager
under.
Bug: 22828115
TEST=Manual test on dragonboard
Change-Id: Ib37553126f9a9a4024a16f68d91d240ca855f55c
|
|
Logger utility doesn't exist on Android, so do not run it on Android.
Bug: 24451556
TEST=Manual test on dragonboard
TEST=Test AP setup on Chrome OS device
Change-Id: I4014f5ca3ab91b348a98169cb355c6841d6530fd
|
|
When starting the daemon using an init system, the environment setup
is already being handled by the init system, so there is no need
to daemonize the daemon process create such setup.
By daemonizing the daemon process, it spawns off a new process to
run the daemon and terminates the current process. This causes
a problem with the init system, where it thinks that the daemon
failed to start. We were able to work around it on Chrome OS's
upstart script by adding the forking expectation in the init
scritp ("expect fork"), but there is not such workaround on
Android's init system.
Fix it by removing the daemonize call (daemon()) and remove the
the forking expectation on Chrome OS's init script.
Bug: 24412675
TEST=Manual test on dragonboard
TEST=start/stop apmanager on Chrome OS device
Change-Id: I4dff678946801310982c3af366ab6182f5864a81
|
|
On Android, the executables are stored under /system/bin and the
data files (e.g. config file) will be stored under
/data/misc/apmanager/. So conditionally use those paths for
Android.
Bug: 22828115
TEST=Manual test on dragonboard
TEST=Run unittest for Chrome OS
Change-Id: I7db70c93cb1b8c206742a788e356dcc195160f43
|
|
Noticeable changes to get apmanager to compile on Android:
- Conditional include headers for D-Bus service constants
based on the target platform.
- Use firewalld proxy instead of permission_broker proxy on
Android.
- Use stub shill proxy instead of the real one until libshill-client
is ready.
Bug: 24164800
TEST=Compile apmanager on both Android and Chrome OS
TEST=Run apmanager on Chrome OS device
Change-Id: I7885323796e0043a1e3cc46c129e2736faf4fced
|
|
Provide an abstraction interface for shill proxy, to allow different
proxy implementations.
Bug: 24164800
TEST=Start an AP service using apmanager on a wolf device, verify
TEST="wlan0" is not managed by shill using "list-devices" test script.
TEST=Then restart shill, verify "wlan0" is still not managed by shill.
Change-Id: Ib1aec58b8b2b130a8746cb3fb819ffbee79f70b5
|
|
The end goal is to provide an abstration interface for shill proxy,
to allow different implementations for the proxy.
One immediate beneifit is that we can use a stub implementation
to temporarily remove the dependency for libshill-client while
compiling apmanager on Android. In the future, we might provide an
implementation based on Binder for Android.
Bug: 24164800
TEST=emerge-$BOARD apmanager
Change-Id: I4b241aee97252704862eb77419cdce4a858e19a1
|
|
Android build system expects DBus definition file name to end
with .dbus-xml extension. So rename DBus definition files
to make it consistent for both platforms.
Also update the output directory for adaptor headers, so that
it will be the same on both platforms.
Bug: 24164800
TEST=emerge-$BOARD --unmerge apmanager
TEST=sudo rm -rf /build/$BOARD/var/cache/portage/chromeos-base/apmanager
TEST=emerge-$BOARD apmanager
Change-Id: I808983591d0633fe37b83e54237575419476e2b5
|
|
This implementation wiil be used on Android, where permission_broker
doesn't exist.
Bug: 23757625
TEST=Manually update apmanager.gyp to compile firewalld_dbus_proxy.cc
Change-Id: I7bf0ee2377bcb89730587ee4ab4c5d8b21badf53
|
|
Provide an abstraction for firewall proxy, to allow different proxy
implementations. Chrome OS will continue to use the implementation
based on permission_broker.
Bug: 23757625
TEST=Build an image with "wifi_bootstrapping" USE flag, boot it up
TEST=on a device. Verify a provisioning AP is up "Developer xxx"
TEST=and a client can connect to it.
Change-Id: I7d902d8741bb12f79b3b1458e114d6305cfb6339
|
|
The apmanager ebuild recreates the old directory structure placing
apmanager as a subdirectory of platform2 in the build environment.
This structure doesn't match the current location of the code and
breaks incremental builds creating symlinks to apmanager in
platform2/ and even in the new apmanager directory.
This patch modifies the .gyp file to reference platform2 sources via
the platform2_root gyp variable and builds apmanager from the new
path. This fixes incremental builds.
For this change to take effect in Chrome OS, the ebuild file is updated
in a separated CL.
Bug: 23619937
TEST=emerge-$BOARD apmanager; cros_workon_make apmanager
Change-Id: I44d5afd2b47ff6508e98b583a25fd92126484d90
|
|
Bug: None
TEST=repo upload . --cbr
Change-Id: I1bfe01124f2dffa1676847f618237f2a487b93ab
|
|
The generated dbus-proxies.h and dbus-proxy-mocks.h are now created by
by the daemon that exposses the interface, instead of letting the
daemon using the interface generate them. This creates then a client
library that other daemons can use.
This patch installs these libraries for login_manager, power_manager,
debugd, apmanager and shill, and makes all their callers use these
interfaces instead of using the xml directly.
This patch moves the code dependency on the .xml files to an ebuild
dependency.
This patch only contains the apmanager changes. The original CL is here:
https://chromium-review.googlesource.com/296026
BUG=23619937
TEST=./build_packages
Change-Id: I80855787fb22438bcc2e36eede987e8cc0d083e4
|
|
This is a grammar nit, but it seems wise to deal with it before there
are too many clients depending on it.
BUG=none
TEST=FEATURES=test emerge-gizmo apmanager
Change-Id: I94ff5635c2ab878feed5ef91e418cdf1b19cc290
Reviewed-on: https://chromium-review.googlesource.com/296790
Commit-Ready: Garret Kelly <gdk@chromium.org>
Tested-by: Garret Kelly <gdk@chromium.org>
Reviewed-by: Zeping Qiu <zqiu@chromium.org>
|
|
This patch automatically replaced the license on all text files from
Chromium OS (BSD style) to AOSP (Apache2), keeping the original year as
a reference.
The license header was added to .gyp, the NOTICE was replaced with a copy
of the Apache2 license and MODULE_LICENSE_* file was updated.
BUG=23619937
TEST=grep 'Chromium OS Authors' doesn't find anything.
Change-Id: I4ade0a15ff18ab159d4a2f99525b62c780b13c89
|
|
BUG=23619937
Change-Id: Ice4210a650db1afc4d6f4545663514efa1bfbcc2
|
|
BUG:23620021
|
|
|
|
This allows us to change the import path of libminijail.h easily.
BUG=None
TEST=`emerge-gizmo apmanager attestation cromo cros-disks debugd
libchromeos lorgnette minijail tpm_manager trunks webserver` works.
CQ-DEPEND=CL:293580
Change-Id: I4b44174ae115a93fb9d4299ca24002f9ad37ba6c
Reviewed-on: https://chromium-review.googlesource.com/293483
Reviewed-by: Bertrand Simonnet <bsimonnet@chromium.org>
Commit-Queue: Bertrand Simonnet <bsimonnet@chromium.org>
Trybot-Ready: Bertrand Simonnet <bsimonnet@chromium.org>
Tested-by: Bertrand Simonnet <bsimonnet@chromium.org>
|
|
There were a couple issues with apmanager starting too early,
before even wireless devices have started. In that case,
no soft AP would be even started. This was fixed to change the
startup sequence to launch apmanager only after iptables (since
those jobs start only after network-services have started).
That change fixed a race between apmanager and wifi devices.
However another race surfaced between shill and apmanager.
In this case, apmanager would add an IP address to wlan0 and then
shill would start up and remove it.
Adding conditional dependency on shill startup seems to have fixed
that race too.
BUG=None
TEST=`FEATURES=test emerge-gizmo apmanager`
TEST=tested on gizmo to make sure it goes into wifi bootstrapping
mode after reboot. Tried 5 times and each time soft AP started
correctly and an IP address was assigned to the network interface.
Change-Id: Ic26123683ba9246b15886fb1d035d205eb1723a7
Reviewed-on: https://chromium-review.googlesource.com/293024
Reviewed-by: Paul Stewart <pstew@chromium.org>
Tested-by: Alex Vakulenko <avakulenko@chromium.org>
Commit-Queue: Alex Vakulenko <avakulenko@chromium.org>
|
|
shill no longer depends on libgenl / libnl in any meaningful
ways. This CL removes the last incidental dependencies and
removes the link line for it:
- Use of nla_total_len / nla_attr_size can be restated
trivially using constants from linux/netlink.h.
- The NLA_* type values no longer need to match up with
libnl, since we don't use this for policy anymore.
The NetlinkAttribute::Type is actually marginally more
descriptive.
- Remove defunct includes, references and comments.
BUG=chromium:512152
TEST=Unit tests
Change-Id: I8cb7d28f8382a0cfac0a3fe82acb1736ba321e27
Reviewed-on: https://chromium-review.googlesource.com/289236
Reviewed-by: Paul Stewart <pstew@chromium.org>
Commit-Queue: Paul Stewart <pstew@chromium.org>
Tested-by: Paul Stewart <pstew@chromium.org>
|
|
libchrome r334380 has the following breaking changes that need to be fixed:
- base::JSONWriter::Write() and base::JSONWriter::WriteWithOptions() take
"const base::Value&" instead of "const base::Value*"
- base::JSONReader::Read() and base::JSONReader::ReadAndReturnError()
return a scoped_ptr<base::Value> instead of base::Value*
- base/safe_strerror_posix.h is moved to base/posix/safe_strerror.h
- safe_strerror() is now in "base" namespace
- StartsWithASCII(), EndsWith(), StringToUpperASCII(), LowerCaseEqualsASCII()
are now in "base" namespace
- ObserverList<T> is now in "base" namespace
- base::PrintTo(base::FilePath) used in gtest is now moved to libchrome-test
library and as such, unit test runners need to link to this library now.
- crypto::RSAPrivateKey::CreateSensitive() is now removed from //crypto, so
some of tests in chromeos-login that used that function had to be changed
to use crypto::GenerateRSAKeyPairNSS() directly.
- UnixDomanSocket class is now in "base" namespace
- Pickle class is now in "base" namespace
BUG=chromium:496469
TEST=`./build_packages`
CQ-DEPEND=CL:277662
Change-Id: I36e5fbf2e36a92068873ffbd44020c862a3ed9e3
Reviewed-on: https://chromium-review.googlesource.com/277671
Reviewed-by: Alex Vakulenko <avakulenko@chromium.org>
Commit-Queue: Alex Vakulenko <avakulenko@chromium.org>
Trybot-Ready: Alex Vakulenko <avakulenko@chromium.org>
Tested-by: Alex Vakulenko <avakulenko@chromium.org>
|
|
apmanager depends on cfg80211 for communication with WiFi device,
so make sure it is loaded before starting.
BUG=brillo:1168
TEST=start apmanager without error when cfg80211 is not loaded
Change-Id: I6fbcdd47d15fc367a7cfdc05bcbc1015199be102
Reviewed-on: https://chromium-review.googlesource.com/274966
Trybot-Ready: Zeping Qiu <zqiu@chromium.org>
Tested-by: Zeping Qiu <zqiu@chromium.org>
Reviewed-by: Paul Stewart <pstew@chromium.org>
Commit-Queue: Zeping Qiu <zqiu@chromium.org>
|
|
The updated dnsmasq (version 2.72) uses additional system call
(writev). So add this syscall to the seccomp filter file for each
platform.
BUG=brillo:1122
TEST=Verify IP connectivity with AP service started using apmanager
Change-Id: I1c2079138364baccec8c5bc95d6fad37ccd48dfa
Reviewed-on: https://chromium-review.googlesource.com/273320
Trybot-Ready: Zeping Qiu <zqiu@chromium.org>
Tested-by: Zeping Qiu <zqiu@chromium.org>
Reviewed-by: Paul Stewart <pstew@chromium.org>
Reviewed-by: Vitaly Buka <vitalybuka@chromium.org>
Reviewed-by: Jorge Lucangeli Obes <jorgelo@chromium.org>
Commit-Queue: Zeping Qiu <zqiu@chromium.org>
|
|
Changed callbacks to use std::unique_ptr in D-Bus method handlers instead of
scoped_ptr, now that we can do this with base::Callback.
This eliminates the need to mix scoped_ptr and std::unique_ptr in the same
translation unit.
Sweep the code in the rest of platform2 that used libchromeos's D-Bus framework.
BUG=None
TEST=`FEATURES=test emerge-link libchromeos apmanager attestation buffet chromeos-dbus-bindings`
Change-Id: I50289198ef9ab183d5bc7d0c8cc7a8f53085e5a4
Reviewed-on: https://chromium-review.googlesource.com/267337
Tested-by: Alex Vakulenko <avakulenko@chromium.org>
Trybot-Ready: Alex Vakulenko <avakulenko@chromium.org>
Reviewed-by: Christopher Wiley <wiley@chromium.org>
Commit-Queue: Alex Vakulenko <avakulenko@chromium.org>
|
|
Allow clients of the RtnlHandler to explicitly define which groups
they want to listen to. This will allow more flexibility in the clients
without causing everyone to have to listen to all groups.
BUG=none
TEST=FEATURES=test emerge-$BOARD apmanager shill
Change-Id: I2682f6bcfda3a50dade2d1a2b34a2bc1254d7fde
Reviewed-on: https://chromium-review.googlesource.com/265460
Reviewed-by: Nathan Bullock <nathanbullock@google.com>
Commit-Queue: Nathan Bullock <nathanbullock@google.com>
Tested-by: Nathan Bullock <nathanbullock@google.com>
|
|
This patch replaces "LOG() << ... << strerror(errno)" by "PLOG() << ..."
when possible, which provides equivalent functionality.
BUG=None
TEST=cbuildbot amd64-generic-full
Change-Id: I760689818a3647efa980c96305a0bc8cf0bb4ac0
Reviewed-on: https://chromium-review.googlesource.com/264834
Reviewed-by: Alex Vakulenko <avakulenko@chromium.org>
Commit-Queue: Alex Deymo <deymo@chromium.org>
Trybot-Ready: Alex Deymo <deymo@chromium.org>
Tested-by: Alex Deymo <deymo@chromium.org>
|
|
The current revision of libchrome is removing CommandLine class
from global namespace and only retain the one in base::.
Sweep the code to use the correct namespace in anticpation of
libchrome revision roll.
BUG=None
TEST=./build_packages
Change-Id: Ib7ca448dac1204c1e36ab053e775a5a5214997ac
Reviewed-on: https://chromium-review.googlesource.com/263785
Trybot-Ready: Alex Vakulenko <avakulenko@chromium.org>
Tested-by: Alex Vakulenko <avakulenko@chromium.org>
Reviewed-by: Alex Deymo <deymo@chromium.org>
Commit-Queue: Alex Vakulenko <avakulenko@chromium.org>
|
|
BUG=chromium:466013
TEST=Start an AP using apmanager on a MIPS board (mBuB), and verify
a wifi client can connect to it with IP connectivity.
Change-Id: I87d1a4145a887d47cc8ee6389f627ad0945d9c6a
Reviewed-on: https://chromium-review.googlesource.com/262454
Reviewed-by: Jorge Lucangeli Obes <jorgelo@chromium.org>
Commit-Queue: Zeping Qiu <zqiu@chromium.org>
Tested-by: Zeping Qiu <zqiu@chromium.org>
|
|
The default D-Bus policy is to deny method calls, but allow signals and
replies.
Adding clauses to block messages sent to a daemon has the perverse side
effect of blocking signals and message replies unless explicitly noted
otherwise in the firewall config.
This breaks certain interfaces, for instance, the signals that make
object manager and property interfaces work.
BUG=brillo:571,brillo:572
TEST=manual, register device using privet and check is privet/info has
"online" in gcd.status.
Change-Id: I82604ef2b755fda28d8e54984f67380072fb3aa3
Reviewed-on: https://chromium-review.googlesource.com/260301
Reviewed-by: Alex Vakulenko <avakulenko@chromium.org>
Reviewed-by: Christopher Wiley <wiley@chromium.org>
Commit-Queue: Vitaly Buka <vitalybuka@chromium.org>
Tested-by: Vitaly Buka <vitalybuka@chromium.org>
|
|
Add a Config property "FullDeviceControl" for controlling the wifi device
when starting an AP service on it. This property is set to true by default.
When it is set to true, apmanager will claim all interfaces resided on the
wifi device used for starting an AP service.
When it is set to false, apmanager will only claim the actual interface on
the wifi device used for starting an AP service. This will allow shill to
maintain the control of the managed mode interface when an AP service is
started on the same wifi device, which will allow the wifi device to support
both client mode and AP mode operation simultaneously (when dedicated interfaces
are created for each operation mode by the driver).
BUG=brillo:541
TEST=USE="asan clang" FEATURES=test emerge-$BOARD apmanager
Manual Test:
1. Grab a peach_pit device, which supports both client mode and AP
mode operation simultaneously with constraint of both needs to
operate on the same channel.
2. Start an AP service with default settings, verify shill is not
managing the managed mode interface "mlan0" anymore via
"./usr/local/lib/flimflam/test/list-devices".
3. Tear down the AP service, and then connect the device to a wifi
network ("ChromeOS-Test-AP").
4. Start an AP service with "FullDeviceControl" set to false and
"Channel" set to the same channel number as the client connection,
verify shill is still in control of the managed mode interface
"mlan0" via "./usr/local/lib/flimflam/test/list-devices" and "ifconfig".
5. Verify another client device can connect to that AP with IP connectivity.
Change-Id: I71f58e4b50b3a8f92f1be339157850c37772e29a
Reviewed-on: https://chromium-review.googlesource.com/257611
Trybot-Ready: Zeping Qiu <zqiu@chromium.org>
Tested-by: Zeping Qiu <zqiu@chromium.org>
Reviewed-by: Paul Stewart <pstew@chromium.org>
Commit-Queue: Zeping Qiu <zqiu@chromium.org>
|
|
This prevents AP services from becoming orphans when their respective
owner crashed.
BUG=brillo:398
TEST=Run apmanager_CheckAPProcesses and privetd_BasicDBusAPI test
Manual Test:
1. Start an AP service with privetd
2. Simulate privetd crash using SIGKILL signal
3. Verify the AP service is terminated
Change-Id: I191a3651dd9cc8cc0a3607cea60448417310f991
Reviewed-on: https://chromium-review.googlesource.com/254608
Reviewed-by: Zeping Qiu <zqiu@chromium.org>
Commit-Queue: Zeping Qiu <zqiu@chromium.org>
Trybot-Ready: Zeping Qiu <zqiu@chromium.org>
Tested-by: Zeping Qiu <zqiu@chromium.org>
|