1. 15 Jan, 2020 2 commits
  2. 24 Dec, 2019 1 commit
  3. 20 Dec, 2019 1 commit
  4. 13 Sep, 2019 1 commit
  5. 05 Aug, 2019 1 commit
  6. 01 Aug, 2019 4 commits
  7. 23 Jul, 2019 1 commit
  8. 22 Jul, 2019 1 commit
  9. 18 Jul, 2019 1 commit
    • Thomas Haller's avatar
      device: fix reapplying changes to connection ID and UUID · b1209e37
      Thomas Haller authored
      4 properties are not really relevant for an already activated connection
      or it makes not sense to change them. These are connection.id, connection.uuid,
      connection.autoconnect and connection.stable-id.
      For convenience, we allow to reapply these. This way, one can take
      a different setting (e.g. with a different connection.id or
      connection.uuid) and reapply them, but such changes are silently
      However this was done wrongly. Instead of reverting the change to the new
      applied connection, we would change the input connection.
      This is bad, for example with
        nmcli connection up uuid cb922f18-e99a-49c6-b200-1678b5070a82
        nmcli connection modify cb922f18-e99a-49c6-b200-1678b5070a82 con-name "bogus"
        nmcli device reapply eth0
      the last re-apply would reset the settings-connection's connection ID to
      what was before, while accepting the new name on the applied-connection
      (while it should have been rejected).
      Fixes: bf3b3d44 ('device: avoid changing immutable properties during reapply')
      (cherry picked from commit adb51c2a)
      (cherry picked from commit 09f37d5b)
      (cherry picked from commit 9c72ca5e)
  10. 09 Jul, 2019 1 commit
  11. 04 Jul, 2019 1 commit
  12. 03 Jul, 2019 1 commit
  13. 27 Jun, 2019 1 commit
  14. 11 Jun, 2019 2 commits
  15. 20 May, 2019 1 commit
  16. 19 May, 2019 1 commit
  17. 14 May, 2019 1 commit
    • Thomas Haller's avatar
      core: fix file permissions for "/var/lib/NetworkManager/secret_key" · 869ac551
      Thomas Haller authored
      Ooherwise, the file has wrong permissions:
        # ls -la /var/lib/NetworkManager/secret_key
        ----r-xr-x. 1 root root 50 May 14 13:52 /var/lib/NetworkManager/secret_key
      Luckily, /var/lib/NetworkManager should be already
        # ls -lad /var/lib/NetworkManager
        drwx------. 2 root root 8192 May 14 13:57 /var/lib/NetworkManager
      which mitigates this a bit.
      Fixes: dbcb1d6d ('core: let nm_utils_secret_key_read() handle failures internally')
      (cherry picked from commit dc3a2f9b)
      (cherry picked from commit 2d46247c)
      (cherry picked from commit 7a0f8520)
  18. 10 May, 2019 2 commits
    • Thomas Haller's avatar
      settings/d-bus: fix boolean return value of "LoadConnections" · 703864e2
      Thomas Haller authored
      The boolean value is intended to indicate success. It would indicated
      failure due to a bug.
      Fixes: 297d4985 ('core/dbus: rework D-Bus implementation to use lower layer GDBusConnection API'):
      (cherry picked from commit 22e830f0)
      (cherry picked from commit e73a5058)
      (cherry picked from commit 1337ebd9)
    • Thomas Haller's avatar
      settings: avoid assertion for LoadConnections D-Bus method with relative paths · 6052b863
      Thomas Haller authored
        $ busctl call org.freedesktop.NetworkManager /org/freedesktop/NetworkManager/Settings org.freedesktop.NetworkManager.Settings LoadConnections as 1 relative/filename
      triggers a g_critical() assertion in nm_utils_file_is_in_path():
        #3  0x00007ffff7a19e7d in g_return_if_fail_warning
            (log_domain=log_domain@entry=0x55555586c333 "NetworkManager", pretty_function=pretty_function@entry=0x55555586c0a0 <__FUNCTION__.38585> "nm_utils_file_is_in_path", expression=expression@entry=0x55555586c010 "abs_filename && abs_filename[0] == '/'") at ../glib/gmessages.c:2767
        #4  0x00005555555f1128 in nm_utils_file_is_in_path (abs_filename=abs_filename@entry=0x555555b56670 "dfd", abs_path=<optimized out>) at src/NetworkManagerUtils.c:1077
        #5  0x00005555555a4779 in load_connection (config=<optimized out>, filename=0x555555b56670 "dfd") at src/settings/plugins/keyfile/nms-keyfile-plugin.c:522
        #6  0x00005555557ce291 in nm_settings_plugin_load_connection (self=0x5555559fd400 [NMSKeyfilePlugin], filename=0x555555b56670 "dfd") at src/settings/nm-settings-plugin.c:70
        #7  0x000055555559ccdf in impl_settings_load_connections
            (obj=<optimized out>, interface_info=<optimized out>, method_info=<optimized out>, connection=<optimized out>, sender=<optimized out>, invocation=0x7fffe0015ed0 [GDBusMethodInvocation], parameters=<optimized out>) at src/settings/nm-settings.c:1439
        #8  0x00005555555a9bf9 in dbus_vtable_method_call
            (connection=0x5555559b91b0 [GDBusConnection], sender=sender@entry=0x555555b5c360 ":1.32283", object_path=object_path@entry=0x7fffe0019070 "/org/freedesktop/NetworkManager/Settings", interface_name=<optimized out>, interface_name@entry=0x7fffe002aa70 "org.freedesktop.NetworkManager.Settings", method_name=<optimized out>,
            method_name@entry=0x7fffe00276b0 "LoadConnections", parameters=parameters@entry=0x555555c4a690, invocation=0x7fffe0015ed0 [GDBusMethodInvocation], user_data=0x5555559a1a00)
            at src/nm-dbus-manager.c:947
        #9  0x00007ffff7c506c4 in call_in_idle_cb (user_data=user_data@entry=0x7fffe0015ed0) at ../gio/gdbusconnection.c:4874
        #10 0x00007ffff7a0e8eb in g_idle_dispatch (source=source@entry=0x7fffe00208a0, callback=0x7ffff7c50590 <call_in_idle_cb>, user_data=0x7fffe0015ed0) at ../glib/gmain.c:5627
        #11 0x00007ffff7a11fd0 in g_main_dispatch (context=0x555555994d00) at ../glib/gmain.c:3189
        #12 0x00007ffff7a11fd0 in g_main_context_dispatch (context=context@entry=0x555555994d00) at ../glib/gmain.c:3854
        #13 0x00007ffff7a12368 in g_main_context_iterate (context=0x555555994d00, block=block@entry=1, dispatch=dispatch@entry=1, self=<optimized out>) at ../glib/gmain.c:3927
        #14 0x00007ffff7a126b3 in g_main_loop_run (loop=0x555555995e60) at ../glib/gmain.c:4123
        #15 0x000055555558a741 in main (argc=<optimized out>, argv=<optimized out>) at src/main.c:444
      Filter out relative filenames early.
      (cherry picked from commit a1b102ea)
      (cherry picked from commit c21171e0)
      (cherry picked from commit 8fe900d3)
  19. 18 Apr, 2019 1 commit
    • Thomas Haller's avatar
      platform: fix nm_platform_lnk_gre_to_string() for tap links · 88c9767d
      Thomas Haller authored
      Why didn't we get a compiler warning about this bug?
      At least clang (3.8.0-2ubuntu4, Ubuntu 16.04) warns:
          CC       src/platform/src_libNetworkManagerBase_la-nm-platform.lo
        ../src/platform/nm-platform.c:5389:14: error: data argument not used by format string [-Werror,-Wformat-extra-args]
                            lnk->remote ? nm_sprintf_buf (str_remote, " remote %s", nm_utils_inet4_ntop (lnk->remote, str_remote1)) : "",
      Fixes: 4c2862b9 ('platform: add gretap tunnels support')
      (cherry picked from commit dfb899f4)
      (cherry picked from commit ed88c71f)
      (cherry picked from commit 400293d3)
  20. 10 Apr, 2019 1 commit
  21. 09 Apr, 2019 1 commit
    • Beniamino Galvani's avatar
      libnm-core: fix invalid memory access · 76c283ae
      Beniamino Galvani authored
      When we delete the runner.name property, the runner object itself gets
      deleted if that was the only property, and @runner becomes invalid.
       ==13818== Invalid read of size 1
       ==13818==    at 0x55EAF4: nm_streq (nm-macros-internal.h:869)
       ==13818==    by 0x55EAF4: _json_team_normalize_defaults (nm-utils.c:5573)
       ==13818==    by 0x566C89: _nm_utils_team_config_set (nm-utils.c:6057)
       ==13818==    by 0x5498A6: _nm_utils_json_append_gvalue (nm-utils-private.h:228)
       ==13818==    by 0x5498A6: set_property (nm-setting-team.c:1622)
       ==13818==  Address 0x182a9330 is 0 bytes inside a block of size 13 free'd
       ==13818==    at 0x4839A0C: free (vg_replace_malloc.c:530)
       ==13818==    by 0x4857868: json_delete_string (value.c:763)
       ==13818==    by 0x4857868: json_delete (value.c:975)
       ==13818==    by 0x4851FA1: UnknownInlinedFun (jansson.h:129)
       ==13818==    by 0x4851FA1: hashtable_do_del (hashtable.c:131)
       ==13818==    by 0x4851FA1: hashtable_del (hashtable.c:289)
       ==13818==    by 0x55DFDD: _json_del_object (nm-utils.c:5384)
       ==13818==    by 0x55EA70: _json_delete_object_on_string_match (nm-utils.c:5532)
       ==13818==    by 0x55EADB: _json_team_normalize_defaults (nm-utils.c:5549)
       ==13818==    by 0x566C89: _nm_utils_team_config_set (nm-utils.c:6057)
       ==13818==    by 0x5498A6: _nm_utils_json_append_gvalue (nm-utils-private.h:228)
       ==13818==    by 0x5498A6: set_property (nm-setting-team.c:1622)
       ==13818==  Block was alloc'd at
       ==13818==    at 0x483880B: malloc (vg_replace_malloc.c:299)
       ==13818==    by 0x4852E8C: lex_scan_string (load.c:389)
       ==13818==    by 0x4852E8C: lex_scan (load.c:620)
       ==13818==    by 0x4853458: parse_object (load.c:738)
       ==13818==    by 0x4853458: parse_value (load.c:862)
       ==13818==    by 0x4853466: parse_object (load.c:739)
       ==13818==    by 0x4853466: parse_value (load.c:862)
       ==13818==    by 0x4853655: parse_json.constprop.7 (load.c:899)
       ==13818==    by 0x48537CF: json_loads (load.c:959)
       ==13818==    by 0x566780: _nm_utils_team_config_set (nm-utils.c:5961)
       ==13818==    by 0x5498A6: _nm_utils_json_append_gvalue (nm-utils-private.h:228)
       ==13818==    by 0x5498A6: set_property (nm-setting-team.c:1622)
      Fixes: a5642fd9 ('libnm-core: team: rework defaults management on runner properties')
      (cherry picked from commit 80a3031a)
      (cherry picked from commit 3fa39f61)
  22. 02 Apr, 2019 1 commit
  23. 31 Mar, 2019 1 commit
    • Beniamino Galvani's avatar
      build: fix searching dlopen in configure · 13ac745b
      Beniamino Galvani authored
      The 4th argument of AC_SEARCH_LIBS is a list of additional libraries,
      not the name of the variable to hold the result which is always
      ac_cv_search_$function. Also, we should ignore the result when it is
      "none required".
      Fixes: 1f2eeb85 ('build: rename $(LIBDL) to $(DL_LIBS) and modify detection')
      (cherry picked from commit bd4957fc)
      (cherry picked from commit 1fa0914b)
  24. 26 Mar, 2019 1 commit
  25. 15 Mar, 2019 1 commit
  26. 11 Mar, 2019 1 commit
    • Thomas Haller's avatar
      shared/systemd: fix gettid() compat implementation shadowing function from glibc · d160b7b9
      Thomas Haller authored
      On Fedora rawhide we get the following build failure:
          In file included from shared/systemd/src/basic/alloc-util.c:3:
          ./shared/systemd/sd-adapt-shared/nm-sd-adapt-shared.h:114:21: error: static declaration of 'gettid' follows non-static declaration
            114 | static inline pid_t gettid(void) {
                |                     ^~~~~~
          In file included from /usr/include/unistd.h:1170,
                           from /usr/include/glib-2.0/gio/gcredentials.h:32,
                           from /usr/include/glib-2.0/gio/gio.h:46,
                           from ./shared/nm-utils/nm-macros-internal.h:31,
                           from ./shared/nm-default.h:293,
                           from ./shared/systemd/sd-adapt-shared/nm-sd-adapt-shared.h:22,
                           from shared/systemd/src/basic/alloc-util.c:3:
          /usr/include/bits/unistd_ext.h:34:16: note: previous declaration of 'gettid' was here
             34 | extern __pid_t gettid (void) __THROW;
                |                ^~~~~~
      glibc supports now gettid() call ([1]) which conflicts with our compat
      implementation. Rename it.
      [1] https://sourceware.org/git/?p=glibc.git;a=commit;h=1d0fc213824eaa2a8f8c4385daaa698ee8fb7c92
      (cherry picked from commit 10276322)
      (cherry picked from commit cfb970b2)
  27. 08 Mar, 2019 1 commit
  28. 07 Mar, 2019 2 commits
    • Lubomir Rintel's avatar
      platform/linux: fix detection of IFA_FLAGS support · 27b75bea
      Lubomir Rintel authored
      The condition got accidentally reversed, which means we're always
      undecided and thus wrongly assuming support and never being able to set
      any addresses.
      This would bother the few that are struck with 3.4 android kernels. Very
      few indeed, given this got unnoticed since 1.10.
      Fixes: 8670aacc ('platform: cleanup detecting kernel support for IFA_FLAGS and IPv6LL')
      (cherry picked from commit d551a089)
      (cherry picked from commit c411b890)
    • Marco Trevisan's avatar
      nm: Fix syntax on introspection annotations · 3e24e328
      Marco Trevisan authored and Thomas Haller's avatar Thomas Haller committed
      Various annotations were added using multiple colons, while only one has
      to be added or g-ir-introspect will consider them part of the description
      (cherry picked from commit 73005fcf)
      (cherry picked from commit b5bbf8ed)
  29. 05 Mar, 2019 2 commits
  30. 04 Mar, 2019 1 commit
  31. 27 Feb, 2019 1 commit
  32. 26 Feb, 2019 1 commit