1. 12 Feb, 2019 2 commits
  2. 01 Dec, 2018 1 commit
  3. 30 Apr, 2018 1 commit
  4. 15 Dec, 2017 1 commit
    • Thomas Haller's avatar
      all: don't use NM_FLAGS_HAS() with non-constant argument · c696a226
      Thomas Haller authored
      NM_FLAGS_HAS() uses a static-assert that the second argument is a
      single flag (power of two). With a single flag, NM_FLAGS_HAS(),
      NM_FLAGS_ANY() and NM_FLAGS_ALL() are all identical.
      The second argument must be a compile time constant, and if that is
      not the case, one must not use NM_FLAGS_HAS().
      Use NM_FLAGS_ANY() in these cases.
  5. 24 Mar, 2017 1 commit
  6. 06 Mar, 2017 1 commit
  7. 21 Nov, 2016 1 commit
    • Thomas Haller's avatar
      build: don't add subdirectories to include search path but require qualified include · 44ecb415
      Thomas Haller authored
      Keep the include paths clean and separate. We use directories to group source
      files together. That makes sense (I guess), but then we should use this
      grouping also when including files. Thus require to #include files with their
      path relative to "src/".
      Also, we build various artifacts from the "src/" tree. Instead of having
      individual CFLAGS for each artifact in Makefile.am, the CFLAGS should be
      unified. Previously, the CFLAGS for each artifact differ and are inconsistent
      in which paths they add to the search path. Fix the inconsistency by just
      don't add the paths at all.
  8. 11 Oct, 2016 1 commit
  9. 04 Oct, 2016 1 commit
    • Thomas Haller's avatar
      core: refactor private data in "src" · 4d37f7a1
      Thomas Haller authored
      - use _NM_GET_PRIVATE() and _NM_GET_PRIVATE_PTR() everywhere.
      - reorder statements, to have GObject related functions (init, dispose,
        constructed) at the bottom of each file and in a consistent order w.r.t.
        each other.
      - unify whitespaces in signal and properties declarations.
      - use NM_GOBJECT_PROPERTIES_DEFINE() and _notify()
      - drop unused signal slots in class structures
      - drop unused header files for device factories
  10. 17 Aug, 2016 1 commit
  11. 20 Apr, 2016 1 commit
    • Beniamino Galvani's avatar
      audit: log changed properties when updating a connection · 34964273
      Beniamino Galvani authored
      The main purpose of audit logging is to understand who did what to the
      system configuration, so it is useful to log also the list of changed
      properties when a connection is updated:
       args="pppoe.username,pppoe.password"         <========
  12. 04 Mar, 2016 1 commit
  13. 19 Feb, 2016 1 commit
    • Thomas Haller's avatar
      all: cleanup includes and let "nm-default.h" include "config.h" · 8bace23b
      Thomas Haller authored
      - All internal source files (except "examples", which are not internal)
        should include "config.h" first. As also all internal source
        files should include "nm-default.h", let "config.h" be included
        by "nm-default.h" and include "nm-default.h" as first in every
        source file.
        We already wanted to include "nm-default.h" before other headers
        because it might contains some fixes (like "nm-glib.h" compatibility)
        that is required first.
      - After including "nm-default.h", we optinally allow for including the
        corresponding header file for the source file at hand. The idea
        is to ensure that each header file is self contained.
      - Don't include "config.h" or "nm-default.h" in any header file
        (except "nm-sd-adapt.h"). Public headers anyway must not include
        these headers, and internal headers are never included after
        "nm-default.h", as of the first previous point.
      - Include all internal headers with quotes instead of angle brackets.
        In practice it doesn't matter, because in our public headers we must
        include other headers with angle brackets. As we use our public
        headers also to compile our interal source files, effectively the
        result must be the same. Still do it for consistency.
      - Except for <config.h> itself. Include it with angle brackets as suggested by
  14. 12 Feb, 2016 1 commit
    • Thomas Haller's avatar
      build: cleanup default includes · 2c2d9d2e
      Thomas Haller authored
      - "gsystem-local-alloc.h" and <gio/gio.h> are already included via
        "nm-default.h". No need to include them separately.
      - include "nm-macros-internal.h" via "nm-default.h" and drop all
        explict includes.
      - in the modified files, ensure that we always include "config.h"
        and "nm-default.h" first. As second, include the header file
        for the current source file (if applicable). Then follow external
        includes and finally internal nm includes.
      - include nm headers inside source code files with quotes
      - internal header files don't need to include default headers.
        They can savely assume that "nm-default.h" is already included
        and with it glib, nm-glib.h, nm-macros-internal.h, etc.
  15. 10 Jan, 2016 1 commit
  16. 18 Sep, 2015 2 commits
    • Lubomir Rintel's avatar
      core: separate active and applied connection · 06da3532
      Lubomir Rintel authored
      Clone the connection upon activation. This makes it safe for the user
      to modify the original connection while it is activated.
      This involves several changes:
      - NMActiveConnection gets @settings_connection and @applied_connection.
        To support add-and-activate, we constructing a NMActiveConnection with
        no connection set. Previously, we would set the "connection" field to
        a temporary NMConnection. Now NMManager piggybacks this temporary
        connection as object-data (TAG_ACTIVE_CONNETION_ADD_AND_ACTIVATE).
      - get rid of the functions nm_active_connection_get_connection_type()
        and nm_active_connection_get_connection_uuid(). From their names
        it is unclear whether this returns the settings or applied connection.
        The (few) callers should figure that out themselves.
      - rename nm_active_connection_get_id() to
        nm_active_connection_get_settings_connection_id(). This function
        is only used internally for logging.
      - dispatcher calls now get two connections as well. The
        applied-connection is used for the connection data, while
        the settings-connection is used for the connection path.
      - needs special handling for properties that apply immediately
        when changed (nm_device_reapply_settings_immediately()).
      Co-Authored-By: Thomas Haller's avatarThomas Haller <thaller@redhat.com>
    • Lubomir Rintel's avatar
      audit-manager: don't log connection whose addition fails · f589c66b
      Lubomir Rintel authored
      In AddAndActivate the uuid and id make no sense until authorization succeeds
      and the connection is saved.
  17. 07 Aug, 2015 1 commit
  18. 04 Aug, 2015 2 commits
    • Thomas Haller's avatar
      audit-manager: enable logging.audit by default when libaudit support is available · c4c0bbb2
      Thomas Haller authored
      Previously, when compiling NetworkManager with libaudit support, it
      was disabled by default and only used after setting logging.audit=true.
      Turn that around. If we compile NetworkManager with audit support, we also
      enable it by default. The user can then explicitly disable it by
      configuring logging.audit in NetworkManager.conf.
      But also, add a configure option 'yes-disabled-by-default' to compile
      with audit support, but have it disabled by default. This would be the
      previous behavior, but it must be enabled explicitly.
      Fixes: be49a59f
    • Beniamino Galvani's avatar
      core: add audit support · be49a59f
      Beniamino Galvani authored
      Introduce some primitives to deliver messages about relevant
      configuration changes to the Linux audit subsystem through libaudit
      (if enabled at build time) and to the logging system.