- 28 May, 2020 10 commits
-
-
Slava Monich authored
It's needed by Sailfish OS wifi plugin to determine which networks are pre-configured and have to be reported to the connman core immediately after they've been seen in the air.
-
Slava Monich authored
This also removes GObject from the interface and gets rid of glib deprecation warning about G_ADD_PRIVATE.
-
Slava Monich authored
-
Jussi Laakkonen authored
[connman] Fix STORAGEDIR uses. Fixes JB#49651 See merge request mer-core/connman!271
-
Jussi Laakkonen authored
-
Jussi Laakkonen authored
-
Jussi Laakkonen authored
-
Jussi Laakkonen authored
-
Jussi Laakkonen authored
When user dir is in use return that to provide correct path for configs. Change the function to return const char* as there is no need to allocate a new variable at each call.
-
Jussi Laakkonen authored
The new function allows to get the storage dir for the service using the identifier. This is required in multiuser environment, as some services are saved to STORAGEDIR and some are to USER_STORAGEDIR. This function makes it easier and cleaner to use. Internally, the existing storagedir_for() is used. If the service identifier is invalid NULL is returned as storagedir (TODO: should STORAGEDIR be the default instead of NULL?).
-
- 27 May, 2020 2 commits
-
-
Slava Monich authored
Link with gio-2.0 and gobject-2.0 when necessary See merge request mer-core/connman!274
-
Slava Monich authored
Those were being pulled in as a depedency of libgsupplicant which recently switched to Requires.private dependency in its pkgconfig to avoid overlinking.
-
- 19 May, 2020 12 commits
-
-
Slava Monich authored
Fix glib assertion 'datetime != NULL' See merge request mer-core/connman!272
-
Slava Monich authored
-
Jussi Laakkonen authored
[connman] Fix WLAN issues in user change and device bootup. Fixes JB#49436 See merge request mer-core/connman!266
-
vvavrychuk authored
Suppose there is Wi-Fi network X that is saved in connman. Consider the following scenario: 1. Autoscan is started by connman. 2. Network X will be marked as unavailable as result of connman_device_set_scanning(true). 3. Application issue connect to network X. 4. Connect to X starts and interface_state(G_SUPPLICANT_STATE_AUTHENTICATING) is received. 5. As result of this stop_autoscan > connman_device_set_scanning(false) > __connman_device_cleanup_networks is issued that free_network X because it was marked as unavailable. 6. It leads to network_remove > __connman_service_remove_from_network > connman_service_unref_debug > __connman_service_disconnect > ... reply_pending(ECONNABORTED)
-
Jonas Bonn authored
The powered_pending status is an indication that the powered status is in the process of being changed; the correct return code here should be "in progress". Without this patch, setting a technology "Powered" for a slow ofono device in the process of powering up results in an immediate DBus response even though the device is far from being ready. With this patch, setting a technology "Powered" returns first when the property has actually changed which is the desired behaviour.
-
Jussi Laakkonen authored
Add stub for __connman_technology_disable_all() to systemd login unit test.
-
Jussi Laakkonen authored
When user login is changed via systemd login monitor in some occasions root user, the default system user, may have technologies enabled which may be confusing to the user and system components when the user is opening up session. This change ensures that prior to user change happening after the session is active the technologies are disabled. This allows some technolgies, such as rfkill enabled WiFi, to be put down in time before it is enabled again by the user configuration. This can be the case in both boot and user change. The reason is that when user is logging out root user is enabled, and the technologies enabled on the root user are thus enabled as well.
-
Jussi Laakkonen authored
The return values were incorrect because of incorrect use added to technology_affect_devices(). This was corrected in one previous commits and these values needed to be changed as well. Also fix __connman_technology_disable_all() return value with nonexistent settings file.
-
Jussi Laakkonen authored
Add use of unload() and load() callbacks to be able to properly notify about removed and new services/providers. Removal and adding of the services can also be manual and in this case the information should be also forwarded. When a service is removed it is only required to be unloaded since one cannot remove what is already deleted. Only the removed service is given as the sole item in the service list for unload callback. Loading callbacks should behave in a way that if the identifier is already present just ignore the service, thus load() should be possible to call multiple times. This does not interfere with service/provider removal via connmand/vpnd, since the removal in service.c and vpn-provider.c also calls __connman_storage_remove_service() which removes the actual files. After that the inotify indication about removed ones is received and in then the subdirs are only cleared for the entry, unload() callbacks should ignore a missing service. In loading the detection of new services does another initializtion call but this cannot be avoided since the functionality for load() is to get all available services. Move load and post action callback use at the end of the change_storage_dir(). No need to have them both in the switch.
-
Jussi Laakkonen authored
Disable all technologies even when keyfile is missing. Even though missing keyfile usually means that there shouldn't be any technologies enabled it can be that the keyfile has been already manually removed or deleted prior to calling the __connman_technology_disable_all(). Utilize the return value as a indication of failing to disable a tech instead.
-
Jussi Laakkonen authored
Implement technology_changed_state() to make it easier to indicate a state change on a technology regardless of the rfkill use. This takes the functionality from __connman_technology_{enabled,disabled}(). Main reason is to use this when changing the user to get all proper indications sent via D-Bus. Also when using delayed enabling this is to be used to make the code less obfuscated.
-
Jussi Laakkonen authored
Use delayed enabling if the tech to be enabled is rfkill enabled when re-enabling in multiuser environment or when the enabling reports being busy. A technology can be busy because of pending reply, that is being handled by the timeout function, or because of other component / lower layer. The delay is set to 300ms and timeout function attempts to enable until enabled (0 or EALREADY is returned). For the need to reply to a pending power change request a generic error handler is implemented. This allows to send a reply to the pending power request with proper error code and reduce duplicate code. Sending ETIMEDOUT error in other error cases is not proper way to do it, better to send ECANCELED when the action is canceled. Also, use EINTR when canceling scans. This seems to be the correct error code that is to be passed when canceling request. Do the canceling of the scan before sending pending reply to power change call in the tech disabling when user is changed - as it is done in other places in technology.c.
-
- 08 May, 2020 2 commits
-
-
Slava Monich authored
Don't schedule a scan when hidden network reappears See merge request mer-core/connman!269
-
Slava Monich authored
Bump build requirements See merge request mer-core/connman!268
-
- 07 May, 2020 2 commits
-
-
Slava Monich authored
If a hidden network has recovered (disappeared and then re-appeared) there's no need to schedule a scan, we already know what it is.
-
Slava Monich authored
glib 2.62 is required by g_date_time_format_iso8601() gsupplicant 1.0.17 by gsupplicant_interface_add_eap_status_handler()
-
- 06 May, 2020 2 commits
-
-
Jussi Laakkonen authored
Immediately notify about service change in service unload See merge request mer-core/connman!267
-
Jussi Laakkonen authored
Unloading of the services is done as the last step before the user paths are changed when changing user. After unloading the services the changes must be immediatelly sent (signaled). This is required because if there are identical services used (e.g. two different users use the same WiFi network) then the delayed change signal can contain same identifier in both changed and removed lists. This would otherwise cause confusion in other components relying on these changed signals.
-
- 30 Apr, 2020 6 commits
-
-
Jussi Laakkonen authored
Improve VPN management in multiuser environment. See merge request mer-core/connman!265
-
Jussi Laakkonen authored
-
Jussi Laakkonen authored
Add tests for the binary user override improvements to test cases where override is not in effect because of VPN user being in the system users. Updated test to clean out the test dir properly. Add mock for getpwuid().
-
Jussi Laakkonen authored
[vpn-settings] Improve binary username and override checks. JB#49504 Support both uid as string and username in both system binary user and users. Add checking of both types, uid as string and username in setting and getting the override. Change the finalize function (__vpn_settings_set_binary_user_override()) according to storage.c changes.
-
Jussi Laakkonen authored
[vpn] Use get_connections() as connmand finalize func. JB#49504 Implemented vpn_finalize() function to register as callback to storage.c to be ran as the last function in the user change process. This function simply calls the get_connections() as if connmand notices vpnd being up. The purpose of this is to get the users' VPN services from the vpnd when connmand has dealt its part in the user change process. Since the message to vpnd is sent first, vpnd should have loaded all VPNs when the request sent by get_connections() arrives.
-
Jussi Laakkonen authored
[storage] Use uid and user data in finalize. JB#49504 Implement connman_storage_update_finalize_cb() to allow setting of the finalize callback to user change after initialization. This function is called last in the process. Giving NULL as cb will reset the finalize callback. It is useful for the vpn plugin in connmand to set a callback for requesting the VPN connections from the vpnd. The vpnd could send the signals after the VPNs are loaded from keyfiles but it will come too early to connmand. It may be that the D-Bus signals are processed before the user change is completed. Allowing to register a callback to be executed and to explicitly request the VPNs from vpnd is a better, more synchronized solution for connmand. In addition, removed the use of username in the finalize callback and in storage.c alltogether. Use of uid_t is sufficient.
-
- 29 Apr, 2020 4 commits
-
-
Jussi Laakkonen authored
[storage] Get correct storagedir for VPN config. JB#49504 Use storagedir_for() instead of direct usage of VPN_STORAGEDIR. In multiuser environment the VPN storage differs from the system default/configured dir.
-
Jussi Laakkonen authored
[service] Unload VPN services and always reply from GetProperties. JB#49504 Unload also the VPN services when changing user in multiuser environment. This is to cover situations when the user change from vpnd hasn't yet signaled about removed VPNs. Always send a reply from GetProperties. This may not be reached but returning NULL and leaving the pending call awaiting will make D-Bus daemon unhappy as the default maximum amount of pending call replies is set to 128.
-
Jussi Laakkonen authored
Implement systemd-logind listener for monitoring user change See merge request mer-core/connman!262
-
Jussi Laakkonen authored
-