1. 28 May, 2020 10 commits
  2. 27 May, 2020 2 commits
  3. 19 May, 2020 12 commits
    • Slava Monich's avatar
      Merge branch 'assertion' into 'master' · bce97744
      Slava Monich authored
      Fix glib assertion 'datetime != NULL'
      See merge request mer-core/connman!272
    • Slava Monich's avatar
    • Jussi Laakkonen's avatar
      Merge branch 'jb49436' into 'master' · 3a42b79d
      Jussi Laakkonen authored
      [connman] Fix WLAN issues in user change and device bootup. Fixes JB#49436
      See merge request mer-core/connman!266
    • vvavrychuk's avatar
      devices: Fix Connect OperationAborted if it was issued during some moment of autoscan · af9e2f8a
      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
      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 > ...
    • Jonas Bonn's avatar
      device: Fix enable/disable return code · be349576
      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's avatar
      [unit] Add missing stub for systemd login unit test. JB#49436 · 5cfbfb27
      Jussi Laakkonen authored
      Add stub for __connman_technology_disable_all() to systemd login unit
    • Jussi Laakkonen's avatar
      [systemd login] Disable all techs when user is opening session. JB#49436 · 9fabf3ee
      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's avatar
      [unit] Correct return values of storage unit test. JB#49436 · 60dc667b
      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's avatar
      [storage] Handle manually removed and added services. JB#49436 · 2e94a1b8
      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's avatar
      [technology] Disable all techs regardless of the keyfile. JB#49436 · 63130294
      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's avatar
      [technology] Add a generic rfkill-agnostic state changed func. JB#49436 · e3b53b13
      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's avatar
      [technology] Delay enabling if tech is rfkill enabled or busy. JB#49436 · 5bd0931e
      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
  4. 08 May, 2020 2 commits
  5. 07 May, 2020 2 commits
  6. 06 May, 2020 2 commits
  7. 30 Apr, 2020 6 commits
    • Jussi Laakkonen's avatar
      Merge branch 'jb49504' into 'master' · 256aeed3
      Jussi Laakkonen authored
      Improve VPN management in multiuser environment.
      See merge request mer-core/connman!265
    • Jussi Laakkonen's avatar
    • Jussi Laakkonen's avatar
      [unit] Fix vpn-settings username/uid tests. JB#49504 · 16e83672
      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's avatar
      vpn-settings: Improve binary username and override checks · 74dacd03
      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's avatar
      vpn: Use get_connections() as connmand finalize func. · e411558d
      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's avatar
      storage: Use uid and user data in finalize. · 837fb556
      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
      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.
  8. 29 Apr, 2020 4 commits