Commit Graph

21943 Commits

Author SHA1 Message Date
Francesco Giudici
0f6fe2a38a core: move bridge port min/max/default values to core-internal
We have bridge min/max/default values in core-internal. Do the same
for bridge port ones.
We will soon use those values to enforce limits when assuming a
bridge port configuration.
2019-01-10 09:52:02 +01:00
Francesco Giudici
cad905fce2 core: remove NM_SETTING_PARAM_INFERRABLE flag from bridge-port.path-cost
In NetworkManager we have a default port path-cost equal to 100.
In the linux kernel the default port cost depends upon the interface
speed: 2 for 10Gb, 4 for 1Gb, 19 for 100Mb and 100 for 10Mb (or when the
interface speed is not available, like current virtio_net driver).
Allow NetworkManager to assume bridge port connections also when the
path-cost differs: this will allow us to assume bridge ports created
outside NetworkManager (e.g. in initrd) that will likely have a different
"cost" value.
2019-01-10 09:52:02 +01:00
Thomas Haller
eae86a4823 platform: merge branch 'th/wireguard-pt2'
Add platform code to configure WireGuard links.

https://github.com/NetworkManager/NetworkManager/pull/274
2019-01-09 16:48:32 +01:00
Thomas Haller
a5c894c35f platform: create wireguard netdev interface
The netlink code for WG_CMD_SET_DEVICE is strongly inspired by
WireGuard ([1]) and systemd ([2]).

Currently, nm_platform_link_wireguard_change() always aims to reset
all peers and allowed-ips settings. I think that should be improved
in the future, to support only partial updates.

[1] https://git.zx2c4.com/WireGuard/tree/contrib/examples/embeddable-wg-library/wireguard.c?id=5e99a6d43fe2351adf36c786f5ea2086a8fe7ab8#n1073
[2] 04ca4d191b/src/network/netdev/wireguard.c (L48)
2019-01-09 16:46:41 +01:00
Thomas Haller
7b935c8940 device: use NM_IN_STRSET() in nm_connection_is_virtual() 2019-01-09 16:46:41 +01:00
Thomas Haller
fb79c79d87 netlink: add nla_put() helpers to set integers 2019-01-09 16:46:41 +01:00
Thomas Haller
7a105c2191 netlink: don't require a callback argument in nl_recvmsgs() 2019-01-09 16:46:41 +01:00
Thomas Haller
0713a6996c platform: track wireguard endpoint as sockaddr struct
We need to track the IPv6 endpoint as struct sockaddr_in6, so that
we have access to the scope-id.
2019-01-09 16:46:41 +01:00
Thomas Haller
2e48f6419f netlink: don't heap allocate struct ucred during nla_recv()
Instead, fill a preallocated output buffer provided by the caller.
2019-01-09 16:46:41 +01:00
Thomas Haller
e5fb1dd6e7 netlink: track ucred via a boolean field in struct nl_msg
Also, accept NULL in nlmsg_set_creds() to clear the set credentials.
2019-01-09 16:46:41 +01:00
Thomas Haller
fce3243f12 shared/trivial: rename nm_utils_mem_all_zero() to nm_utils_memeqzero()
in systemd/systemd, systemd/casync, and rustyrussel/ccan (github) this
function is called "memeqzero()". Rename, to use a more popular name.
2019-01-09 16:46:41 +01:00
Thomas Haller
af67b4520f shared: refactor nm_utils_mem_all_zero() to use memcmp() 2019-01-09 16:46:41 +01:00
Thomas Haller
aab3e14883 shared: add nm_utils_getpagesize() and use it in netlink code
Since we already cached the result of getpagesize() in a static variable (at
two places), move the code to nm-shared-utils, so it is reusable.

Also, use sysconf() instead of getpagesize(), like suggested by `man
getpagesize`.
2019-01-09 16:46:41 +01:00
Thomas Haller
6ae04654f7 shared: avoid compiler warning in nm_strndup_a()
Using strncpy() in the macro directly can result in a compiler warning.
We don't want to replace this with memcpy(), because strncpy() aborts
on the first NUL and fills the rest with NUL. Since nm_strndup_a() is a
replacement for g_strndup(), we want to do that here as well.

    In file included from ../shared/nm-default.h:294,
                     from ../libnm-core/nm-utils.c:22:
    ../libnm-core/nm-utils.c: In function nm_sock_addr_endpoint_new:
    ../shared/nm-utils/nm-shared-utils.h:281:4: error: strncpy output truncated before terminating nul copying as many bytes from a string as its length [-Werror=stringop-truncation]
        strncpy (_s, _str, _len); \
        ^~~~~~~~~~~~~~~~~~~~~~~~
    ../libnm-core/nm-utils.c:154:26: note: in expansion of macro nm_strndup_a
      host = _parse_endpoint (nm_strndup_a (200, endpoint, l_endpoint - 1, &host_clone),
                              ^~~~~~~~~~~~
    ../libnm-core/nm-utils.c:152:15: note: length computed here
      l_endpoint = strlen (endpoint) + 1;
                   ^~~~~~~~~~~~~~~~~
2019-01-09 16:46:41 +01:00
Thomas Haller
1cd167c774 platform: fix hash/cmp for NMPObjectLnkWireGuard
It's totally bogus.

Luckily, NMPlatformLnkVlan is smaller than NMPlatformLnkWireGuard, hence there
was no crash, just wrong results.

Fixes: 0827d4c2e4
2019-01-09 16:46:41 +01:00
Lubomir Rintel
c8560bcc4a po: translations from the Red Hat translators 2019-01-08 19:06:56 +01:00
Lubomir Rintel
a8c58baffc po: update-po for the translations that are going to be updated
Just so that we get a nicer diff when pulling from the Red Hat Zanata.
2019-01-08 19:06:56 +01:00
Thomas Haller
4d1b8edb73 libnm/tests: compare D-Bus and keyfile serialization in roundtrip-conversion test 2019-01-08 16:16:18 +01:00
Thomas Haller
e844984a34 dhcp: merge branch 'th/dhcp-client-id-infiniband-rh1658057'
- fix DHCP client-id generatation on infiniband devices
- change default ipv4.dhcp-client-id of internal DHCP plugin to "mac"

https://bugzilla.redhat.com/show_bug.cgi?id=1658057
https://bugzilla.redhat.com/show_bug.cgi?id=1661165

https://github.com/NetworkManager/NetworkManager/pull/263
2019-01-08 07:29:59 +01:00
Thomas Haller
1ffa40872f contrib/rpm: remove unused 00-server-dhcp-client-id.conf configuration snippet
Now that the default for the internal client is "mac", we don't need
this snippet anymore. Drop it.

Don't renumber the source files but leave the gap at Source3. Everytime
we add config snippets the numbers need to be shuffled, so don't fill
the gap and maybe use it in the future.

https://bugzilla.redhat.com/show_bug.cgi?id=1661165
2019-01-07 17:13:23 +01:00
Thomas Haller
cfd696cc3c dhcp: default ipv4.dhcp-client-id of internal plugin to "mac"
The "ipv4.dhcp-client-id" is configurable per-profile and the default
value can be overwritten via connection defaults in NetworkManager.conf.

For "dhclient" DHCP plugin, the ultimate default for "ipv4.dhcp-client-id"
is determined by dhclient itself, or possibly by user configuration from
"/etc/dhcp".

For the "internal" DHCP plugin, the default must be decided by
NetworkManager. Also, the default here is important, as we preferably
won't change it anymore. That is because a changing the client-id
will result in different IP addresses after upgrade of NetworkManager
version. That should be avoided.

Still, change it now. If a downstream does not want this, it either needs
to patch the sources or add a configuration snippet like:

    [connection-internal-dhcp-client-id-duid]
    match-device=dhcp-plugin:internal
    ipv4.dhcp-client-id=duid

The reason to change from the previous default "duid" to "mac" are the
following:

- "duid" is an RFC 4361 compatible client-id ([1]) and "mac" is defined
in RFC 2132.

- "duid" cannot (easily) be predicated a-priori as it is a hash of the
interface-name and "/etc/machine-id". In particular in cloud and server
environments, admins often prefer "mac" as they do know the MAC address
and pre-configure the DHCP server accordingly.

- with "dhclient" plugin, the default is decided by dhclient package or
user configuration in "/etc/dhcp". However, in fact the default is often
"client-identifier hardware" (for example on RHEL/CentOS).

- for RHEL/CentOS we require a way to select "mac" as default. That was
done by installing a configuration snippet via the NetworkManager-config-server
package. It's confusing to have the default depend on a package. Avoid
that. Also, users required "mac" in certain scenarios, but no users
explicitly asked for "duid" as default.

- our "duid" implementation generates a 32 bit IAID based on a hash of the
interface-name, and only 8 bytes entropy that contains a hash
of "/etc/machine-id". The point is, that is not a lot of entropy to
avoid conflicting client-ids. Another point is, that the choosen algorithm
for "duid" is suitable for RFC 4361, but it's only one of many possibly
implementations. Granted, each possibility has up and downsides but selecting
one of them as default seems wrong (given that it has obvious downsides
already). For "mac" there is only one straight-forward way to implement
it.

- RFC 7844 (Anonymity Profiles for DHCP Clients) is not yet supported by
NetworkManager. But we should not select a default client-id which
counteracts anonymit. Choosing "mac" does not reveal information which
is not already exposed.

[1] https://tools.ietf.org/html/rfc4361#section-4

https://bugzilla.redhat.com/show_bug.cgi?id=1661165
2019-01-07 17:05:17 +01:00
Thomas Haller
2ef9a089eb dhcp: move nm_utils_dhcp_client_id_mac() to "nm-core-utils.c"
We will need it outside of "src/devices/nm-device.c".
2019-01-07 17:05:17 +01:00
Thomas Haller
3bce451c60 core/trivial: rename nm_utils_detect_arp_type_from_addrlen() to nm_utils_arp_type_detect_from_hwaddrlen()
Rename the function so that the function name's prefix is
the topic what this is about: arp-type.
2019-01-07 17:05:17 +01:00
Thomas Haller
6f0cb0bf4f dhcp/trivial: add comment about requiring DHCP client-id for infiniband 2019-01-07 17:05:17 +01:00
Thomas Haller
4523a376cc dhcp: fix generating MAC based client-id for infiniband
For infiniband, only the last 8 bytes for the 20 bytes hardware address
are relevant. At least, with respect to the settings

  - ipv4.dhcp-client-id=mac
  - ipv4.dhcp-client-id=perm-mac
  - ipv6.dhcp-duid=ll
  - ipv6.dhcp-duid=llt
  - ipv6.dhcp-duid=stable-ll
  - ipv6.dhcp-duid=stable-llt

This is also what ISC dhclient on Fedora/RHEL does ([1], [2]).

[1] https://bugzilla.redhat.com/show_bug.cgi?id=660681
[2] 3ccf3c8d81/f/dhcp-lpf-ib.patch

https://bugzilla.redhat.com/show_bug.cgi?id=1658057
2019-01-07 17:05:17 +01:00
Thomas Haller
e99deb3912 libnm: fix introspection for NMSettingWirelessSecurityWpsMethod
This is a flags type, not an enum.

This affects the generated glib-mkenums type, changing it from GEnum to
GFlags. That is possibly a change in behavior for language bindings, but
hopefully nobody is badly affected by this.

Fixes: e6f95b50c8
2019-01-07 16:25:26 +01:00
Thomas Haller
0fdcbc6bfa libnm: merge branch 'th/keyfile-fixes'
https://github.com/NetworkManager/NetworkManager/pull/273
2019-01-07 11:39:46 +01:00
Thomas Haller
a5b20ba211 libnm-core: add _nm_setting_secret_flags_valid() helper
Secret-flags are flags, but most combinations don't actually make sense
and maybe should be rejected. Anyway, that is not done, and most places
just check that there are no unknown flags set.

Add _nm_setting_secret_flags_valid() to perform the check at one place
instead of having the implementation at various places.
2019-01-07 11:20:56 +01:00
Thomas Haller
038d509695 libnm/keyfile: don't use nm_setting_enumerate_values() in keyfile reader/writer
- nm_setting_enumerate_values() cannot handle non-GObject based
  properties as it cannot abstract them. That means, for gendata
  based settings, we need already a special case, and future ways
  of handling settings (WireGuard peers) also won't work without
  special casing.

- nm_setting_enumerate_values() needs to fetch all properties, although
  some properties will not be actually used. E.g. secret properties will
  be ignored depending on the flag.

  Or compare the read-side with read_one_setting_value(). The reader doesn't
  care about the (unset) GObject property. It really just cares about the
  GType of the proeprty. Still, nm_setting_enumerate_values() fetches all
  (empty) properties.

  Or consider, route_writer() as called by nm_setting_enumerate_values()
  always needs to deep-clone the entire list of routes in the property
  getter for NM_SETTING_IP_CONFIG_ROUTES, then unpack it. This is
  unnecesary overhead. This is not yet fixed, but would now be easy to
  improve.

- a for-each function like nm_setting_enumerate_values() does make code
  harder to read, gives less possibility for optimization, and is in
  general less flexible. Don't use it.
2019-01-07 11:20:56 +01:00
Thomas Haller
0e09da4ec0 libnm: rework nm_setting_duplicate() without nm_setting_enumerate_values()
Drop another use of nm_setting_enumerate_values().

Using nm_setting_enumerate_values() to duplicate a setting already
didn't work for gendata based settings.

Also, nm_setting_enumerate_values() would iterate the properties
in a particular order. We don't need that, the default order
(asciibetical sorted) is fine.
2019-01-07 11:13:52 +01:00
Thomas Haller
7cc2462915 libnm: move sorting of settings out of nm_setting_enumerate_values() and cache it
The property infos are already sorted by name. As nm_setting_enumerate_values()
now uses that information, in most cases there is nothing to sort.

The only instance is NMSettingConnection, which has a different
sort-order. At least for some purposes, not all:

  - nm_setting_enumerate_values(), obviously.

  - nm_setting_enumerate_values() is called by keyfile writer. That
    means, keyfile writer will persist properties in a sorted way.

Cache the property list with alternative sorting also in the
setting-meta data, instead of calculating it each time.

Beside caching the information, this has the additional benefit that
this kind of sorting is now directly available, without calling
nm_setting_enumerate_values(). Meaning, we can implement keyfile writer
without using nm_setting_enumerate_values().
2019-01-07 11:13:19 +01:00
Thomas Haller
7771473f46 libnm,core: add _nm_connection_aggregate() to replace nm_connection_for_each_setting_value()
We should no longer use nm_connection_for_each_setting_value() and
nm_setting_for_each_value(). It's fundamentally broken as it does
not work with properties that are not backed by a GObject property
and it cannot be fixed because it is public API.

Add an internal function _nm_connection_aggregate() to replace it.

Compare the implementation of the aggregation functionality inside
libnm with the previous two checks for secret-flags that it replaces:

- previous approach broke abstraction and require detailed knowledge of
  secret flags. Meaning, they must special case NMSettingVpn and
  GObject-property based secrets.
  If we implement a new way for implementing secrets (like we will need
  for WireGuard), then this the new way should only affect libnm-core,
  not require changes elsewhere.

- it's very inefficient to itereate over all settings. It involves
  cloning and sorting the list of settings, and retrieve and clone all
  GObject properties. Only to look at secret properties alone.

_nm_connection_aggregate() is supposed to be more flexible then just
the two new aggregate types that perform a "find-any" search. The
@arg argument and boolean return value can suffice to implement
different aggregation types in the future.

Also fixes the check of NMAgentManager for secret flags for VPNs
(NM_CONNECTION_AGGREGATE_ANY_SYSTEM_SECRET_FLAGS). A secret for VPNs
is a property that either has a secret or a secret-flag. The previous
implementation would only look at present secrets and
check their flags. It wouldn't check secret-flags that are
NM_SETTING_SECRET_FLAG_NONE, but have no secret.
2019-01-07 10:54:28 +01:00
Thomas Haller
4a5514dc0f libnm: cleanup secret-flags setter and getter
There are 3 kinds of secret flag implementations:

1) regular properties have a GObject property and a corresponding
  "-flags" property.

2) NMSettingVpn handles this entirely differently

3) NMSettingWirelessSecurity's WEP keys, where the secret keys
   share a flags property that does not follow the same naming
   scheme as 1).

The getter and setter had a boolean "verifiy_secret", only to
handle 3). Drop that parameter. Don't let NMSettingWirelessSecurity
call the parent's implementation for WEP keys. Just let it handle
it directly.
2019-01-07 10:42:33 +01:00
Thomas Haller
9c139b2c47 libnm: cleanup NMSettingVpn's get_secret_flags()
- most of the time, the secret-name is short and fits in a
  stack-allocated buffer.
  Optimize for that by using nm_construct_name_a().

- use _nm_utils_ascii_str_to_int64() instead of strtoul().

       tmp = strtoul ((const char *) val, NULL, 10);
       if ((errno != 0) || (tmp > NM_SETTING_SECRET_FLAGS_ALL)) {

  is not the right way to check for errors of strtoul().

- refactor the code to return-early on errors.

- since commit 9b96bfaa72 "setting-vpn: whatever is in vpn.secrets always
  is a secrets", we accept secrets without secret-flags as valid too.
  However, only do that, when we at least have a corresponding key in
  priv->secrets hash. If the secret name is not used at all, it's
  clearly not a secret.

- if the secret flags are not a valid number, pretend that the flags
  are still set to "none" (zero). That is because we use the presence
  of the "*-flags" data item as indication that this is in fact a
  secret. The user cannot use data items with such a name for another
  purpose, so on failure, we still claim that this is in fact a secret.
2019-01-07 10:41:00 +01:00
Thomas Haller
88da1375ef libnm: use property metadata in nm-settings.c instead of GObject property list
We have a concept of setting and property meta-data that extends plain
GObject properties. While most properties are indeed backed by an
implemented as a GObject property, some are not.

Reuse the object property meta-data instead of fetching the list of
properties. Note that there is not much change in behavior, because
at all places where this is done, properties which are not backed by a
GObject property are skipped for the moment.

If nothing else, we save needlessly cloning the property list.

Later possibly we may no longer want to do that and add virtual
functions that can handle all properties.
2019-01-07 10:41:00 +01:00
Thomas Haller
75e4284781 keyfile: rework handling of GObject properties from keyfile
- previously, writer would use nm_keyfile_plugin_kf_set_integer() for
  G_TYPE_UINT types.
  That means, values larger than G_MAXINT would be stored as negative
  values. On the other hand, the reader would always reject negative
  values.
  Fix that, by parsing the integer ourself.
  Note that we still reject the old (negative) values and there is no
  compatibility for accepting such values. They were not accepted by
  reader in the past and so they are still rejected.
  This affects for example ethernet.mtu setting (arguably, the MTU
  is usually set to small values where the issue was not apparent).
  This is also covered by a test.

- no longer use nm_keyfile_plugin_kf_set_integer().
  nm_keyfile_plugin_kf_set_integer() calls g_key_file_get_integer(), which
  uses g_key_file_parse_integer_as_value(). That one has the odd
  behavior of accepting "<number><whitespace><bogus>" as valid. Note how that
  differs from g_key_file_parse_value_as_double() which rejects trailing data.
  Implement the parsing ourself. There are some changes here:

  - g_key_file_parse_value_as_integer() uses strtol() with base 10.
    We no longer require a certain the base, so '0x' hex values are allowed
    now as well.

  - bogus suffixes are now rejected but were accepted by g_key_file_parse_value_as_integer().
    We however still accept leading and trailing whitespace, as before.

- use nm_g_object_set_property*(). g_object_set() asserts that the value
  is in range. We cannot pass invalid values without checking that they
  are valid.

- emit warnings when values cannot be parsed. Previously they would
  have been silently ignored or fail an assertion during g_object_set().

- don't use "helpers" like nm_keyfile_plugin_kf_set_uint64(). These
  merely call GKeyFile's setters (taking care of aliases). The setters
  of GKeyFile don't do anything miraculously, they merely call
  g_key_file_set_value() with the string that one would expect.
  Convert the numbers/boolean ourselfs. For one, we don't require
  a heap allocation to convert a number to string. Also, there is
  no point in leaving this GKeyFile API, because even if GKeyFile
  day would change, we still must continue to support the present
  format, as that is what users have on disk. So, even if a new
  way would be implemented by GKeyFile, the current way must forever
  be accepted too. Hence, we don't need this abstraction.
2019-01-07 10:41:00 +01:00
Thomas Haller
6d9bea09a7 libnm/tests: add tests for converting profiles to keyfile and back 2019-01-07 10:09:10 +01:00
Thomas Haller
7cd6c175e4 keyfile: add _secret_flags_persist_secret() function for skipping secrets based on flags 2019-01-07 10:09:10 +01:00
Thomas Haller
70fab489db keyfile: add nm_keyfile_plugin_kf_get_int64() helper 2019-01-07 10:09:10 +01:00
Thomas Haller
e8bf89a906 libnm: pass serialization flags to settings synth_func()
We will need access to the serialization flags from within the synth_func().

That will be for WireGuard's peers. Peers are a list of complex, structured
elements, and some fields (the peer's preshared-key) are secret and
others are not. So when serializing the peers, we need to know whether
to include secrets or not.

Instead of letting _nm_setting_to_dbus() check the flags, pass them
down.

While at it, don't pass the property_name argument. Instead, pass the
entire meta-data information we have. Most synth functions don't care
about the property or the name either way. But we should not pre-filter
information that we have at hand. Just pass it to the synth function.
If the synth function would be public API, that would be a reason to be
careful about what we pass. But it isn't and it only has one caller.
So passing it along is fine. Also, do it now when adding the flags
argument, as we touch all synth implementations anyway.
2019-01-07 10:09:10 +01:00
Thomas Haller
1b361aaea9 Revert "libnm-core: don't serialize synthetic properties in nm_setting_to_string()"
We shall not shortcut the synth function. If the synth function is
unhappy about a missing NMConnection argument, then that needs to be
fixed.

So, revert 395c385b9 and fix the issue in nm_setting_wireless_get_security()
differently. I presume that is the only place that caused problems,
since the history of the patch does not clealy show what the problem
was.

This reverts commit 395c385b9b.
2019-01-07 10:09:10 +01:00
Thomas Haller
33bf73f252 shared: add typed nm_g_object_set_property*() helpers
Add helper wrappers around nm_g_object_set_property() that take a
native value, construct a GValue of the according type, and call
nm_g_object_set_property().
2019-01-07 10:09:10 +01:00
Thomas Haller
04c6c912b0 shared/tests: add nmtst_keyfile_assert_data() test util 2019-01-07 10:09:10 +01:00
Thomas Haller
b93a2cf728 shared/tests: add nmtst_rand_select() test util 2019-01-07 10:09:10 +01:00
Thomas Haller
e3ea8ecd33 shared: add NM_STR_HAS_PREFIX() macro
Commonly, the prefix is a string constant. We don't need to call
g_str_has_prefix() for that, which first requires strlen() on
the prefix. All the information is readily available.

Add a macro for that.
2019-01-07 10:09:10 +01:00
Thomas Haller
1f906d9214 shared/glib: add compat implementation for g_value_unset() to allow unintialized GValue 2019-01-07 10:09:10 +01:00
Thomas Haller
22dc82724c systemd: merge branch systemd into master 2019-01-07 08:47:17 +01:00
Thomas Haller
19a64c09a9 systemd: update code from upstream (2019-01-06)
This is a direct dump from systemd git.

======

SYSTEMD_DIR=../systemd
COMMIT=4a2c3dc318fab4e3cbe33e9835372f67e5114d54

(
  cd "$SYSTEMD_DIR"
  git checkout "$COMMIT"
  git reset --hard
  git clean -fdx
)

git ls-files -z :/src/systemd/src/ \
                :/shared/systemd/src/ \
                :/shared/nm-utils/unaligned.h | \
  xargs -0 rm -f

nm_copy_sd_shared() {
    mkdir -p "./shared/systemd/$(dirname "$1")"
    cp "$SYSTEMD_DIR/$1" "./shared/systemd/$1"
}

nm_copy_sd_core() {
    mkdir -p "./src/systemd/$(dirname "$1")"
    cp "$SYSTEMD_DIR/$1" "./src/systemd/$1"
}

nm_copy_sd_nmutils() {
    mkdir -p "./shared/nm-utils/"
    cp "$SYSTEMD_DIR/$1" "./shared/nm-utils/${1##*/}"
}

nm_copy_sd_core "src/libsystemd-network/arp-util.c"
nm_copy_sd_core "src/libsystemd-network/arp-util.h"
nm_copy_sd_core "src/libsystemd-network/dhcp-identifier.c"
nm_copy_sd_core "src/libsystemd-network/dhcp-identifier.h"
nm_copy_sd_core "src/libsystemd-network/dhcp-internal.h"
nm_copy_sd_core "src/libsystemd-network/dhcp-lease-internal.h"
nm_copy_sd_core "src/libsystemd-network/dhcp-network.c"
nm_copy_sd_core "src/libsystemd-network/dhcp-option.c"
nm_copy_sd_core "src/libsystemd-network/dhcp-packet.c"
nm_copy_sd_core "src/libsystemd-network/dhcp-protocol.h"
nm_copy_sd_core "src/libsystemd-network/dhcp6-internal.h"
nm_copy_sd_core "src/libsystemd-network/dhcp6-lease-internal.h"
nm_copy_sd_core "src/libsystemd-network/dhcp6-network.c"
nm_copy_sd_core "src/libsystemd-network/dhcp6-option.c"
nm_copy_sd_core "src/libsystemd-network/dhcp6-protocol.h"
nm_copy_sd_core "src/libsystemd-network/lldp-internal.h"
nm_copy_sd_core "src/libsystemd-network/lldp-neighbor.c"
nm_copy_sd_core "src/libsystemd-network/lldp-neighbor.h"
nm_copy_sd_core "src/libsystemd-network/lldp-network.c"
nm_copy_sd_core "src/libsystemd-network/lldp-network.h"
nm_copy_sd_core "src/libsystemd-network/network-internal.c"
nm_copy_sd_core "src/libsystemd-network/network-internal.h"
nm_copy_sd_core "src/libsystemd-network/sd-dhcp-client.c"
nm_copy_sd_core "src/libsystemd-network/sd-dhcp-lease.c"
nm_copy_sd_core "src/libsystemd-network/sd-dhcp6-client.c"
nm_copy_sd_core "src/libsystemd-network/sd-dhcp6-lease.c"
nm_copy_sd_core "src/libsystemd-network/sd-ipv4acd.c"
nm_copy_sd_core "src/libsystemd-network/sd-ipv4ll.c"
nm_copy_sd_core "src/libsystemd-network/sd-lldp.c"
nm_copy_sd_core "src/libsystemd/sd-event/event-source.h"
nm_copy_sd_core "src/libsystemd/sd-event/event-util.c"
nm_copy_sd_core "src/libsystemd/sd-event/event-util.h"
nm_copy_sd_core "src/libsystemd/sd-event/sd-event.c"
nm_copy_sd_core "src/libsystemd/sd-id128/id128-util.c"
nm_copy_sd_core "src/libsystemd/sd-id128/id128-util.h"
nm_copy_sd_core "src/libsystemd/sd-id128/sd-id128.c"
nm_copy_sd_core "src/shared/dns-domain.c"
nm_copy_sd_core "src/shared/dns-domain.h"
nm_copy_sd_core "src/systemd/_sd-common.h"
nm_copy_sd_core "src/systemd/sd-dhcp-client.h"
nm_copy_sd_core "src/systemd/sd-dhcp-lease.h"
nm_copy_sd_core "src/systemd/sd-dhcp6-client.h"
nm_copy_sd_core "src/systemd/sd-dhcp6-lease.h"
nm_copy_sd_core "src/systemd/sd-event.h"
nm_copy_sd_core "src/systemd/sd-id128.h"
nm_copy_sd_core "src/systemd/sd-ipv4acd.h"
nm_copy_sd_core "src/systemd/sd-ipv4ll.h"
nm_copy_sd_core "src/systemd/sd-lldp.h"
nm_copy_sd_core "src/systemd/sd-ndisc.h"
nm_copy_sd_nmutils "src/basic/unaligned.h"
nm_copy_sd_shared "src/basic/alloc-util.c"
nm_copy_sd_shared "src/basic/alloc-util.h"
nm_copy_sd_shared "src/basic/async.h"
nm_copy_sd_shared "src/basic/env-file.c"
nm_copy_sd_shared "src/basic/env-file.h"
nm_copy_sd_shared "src/basic/env-util.c"
nm_copy_sd_shared "src/basic/env-util.h"
nm_copy_sd_shared "src/basic/escape.c"
nm_copy_sd_shared "src/basic/escape.h"
nm_copy_sd_shared "src/basic/ether-addr-util.c"
nm_copy_sd_shared "src/basic/ether-addr-util.h"
nm_copy_sd_shared "src/basic/extract-word.c"
nm_copy_sd_shared "src/basic/extract-word.h"
nm_copy_sd_shared "src/basic/fd-util.c"
nm_copy_sd_shared "src/basic/fd-util.h"
nm_copy_sd_shared "src/basic/fileio.c"
nm_copy_sd_shared "src/basic/fileio.h"
nm_copy_sd_shared "src/basic/fs-util.c"
nm_copy_sd_shared "src/basic/fs-util.h"
nm_copy_sd_shared "src/basic/hash-funcs.c"
nm_copy_sd_shared "src/basic/hash-funcs.h"
nm_copy_sd_shared "src/basic/hashmap.c"
nm_copy_sd_shared "src/basic/hashmap.h"
nm_copy_sd_shared "src/basic/hexdecoct.c"
nm_copy_sd_shared "src/basic/hexdecoct.h"
nm_copy_sd_shared "src/basic/hostname-util.c"
nm_copy_sd_shared "src/basic/hostname-util.h"
nm_copy_sd_shared "src/basic/in-addr-util.c"
nm_copy_sd_shared "src/basic/in-addr-util.h"
nm_copy_sd_shared "src/basic/io-util.c"
nm_copy_sd_shared "src/basic/io-util.h"
nm_copy_sd_shared "src/basic/list.h"
nm_copy_sd_shared "src/basic/log.h"
nm_copy_sd_shared "src/basic/macro.h"
nm_copy_sd_shared "src/basic/mempool.c"
nm_copy_sd_shared "src/basic/mempool.h"
nm_copy_sd_shared "src/basic/missing_type.h"
nm_copy_sd_shared "src/basic/parse-util.c"
nm_copy_sd_shared "src/basic/parse-util.h"
nm_copy_sd_shared "src/basic/path-util.c"
nm_copy_sd_shared "src/basic/path-util.h"
nm_copy_sd_shared "src/basic/prioq.c"
nm_copy_sd_shared "src/basic/prioq.h"
nm_copy_sd_shared "src/basic/process-util.c"
nm_copy_sd_shared "src/basic/process-util.h"
nm_copy_sd_shared "src/basic/random-util.c"
nm_copy_sd_shared "src/basic/random-util.h"
nm_copy_sd_shared "src/basic/refcnt.h"
nm_copy_sd_shared "src/basic/set.h"
nm_copy_sd_shared "src/basic/signal-util.h"
nm_copy_sd_shared "src/basic/siphash24.h"
nm_copy_sd_shared "src/basic/socket-util.c"
nm_copy_sd_shared "src/basic/socket-util.h"
nm_copy_sd_shared "src/basic/sparse-endian.h"
nm_copy_sd_shared "src/basic/stat-util.c"
nm_copy_sd_shared "src/basic/stat-util.h"
nm_copy_sd_shared "src/basic/stdio-util.h"
nm_copy_sd_shared "src/basic/string-table.c"
nm_copy_sd_shared "src/basic/string-table.h"
nm_copy_sd_shared "src/basic/string-util.c"
nm_copy_sd_shared "src/basic/string-util.h"
nm_copy_sd_shared "src/basic/strv.c"
nm_copy_sd_shared "src/basic/strv.h"
nm_copy_sd_shared "src/basic/time-util.c"
nm_copy_sd_shared "src/basic/time-util.h"
nm_copy_sd_shared "src/basic/tmpfile-util.c"
nm_copy_sd_shared "src/basic/tmpfile-util.h"
nm_copy_sd_shared "src/basic/umask-util.h"
nm_copy_sd_shared "src/basic/utf8.c"
nm_copy_sd_shared "src/basic/utf8.h"
nm_copy_sd_shared "src/basic/util.c"
nm_copy_sd_shared "src/basic/util.h"
2019-01-07 08:42:13 +01:00
Thomas Haller
6976094603 systemd: merge branch systemd into master
After reorganizing the systemd sources, merge again with systemd's
import branch.
2019-01-07 08:38:10 +01:00
Thomas Haller
0062875847 systemd: reorganize source files
This is a direct dump from systemd git.

======

SYSTEMD_DIR=../systemd
COMMIT=8eab766804ef4fa21d26c00fd0baab3f1a47bb5c

(
  cd "$SYSTEMD_DIR"
  git checkout "$COMMIT"
  git reset --hard
  git clean -fdx
)

git ls-files -z :/src/systemd/src/ \
                :/shared/systemd/src/ \
                :/shared/nm-utils/unaligned.h | \
  xargs -0 rm -f

nm_copy_sd_shared() {
    mkdir -p "./shared/systemd/$(dirname "$1")"
    cp "$SYSTEMD_DIR/$1" "./shared/systemd/$1"
}

nm_copy_sd_core() {
    mkdir -p "./src/systemd/$(dirname "$1")"
    cp "$SYSTEMD_DIR/$1" "./src/systemd/$1"
}

nm_copy_sd_nmutils() {
    mkdir -p "./shared/nm-utils/"
    cp "$SYSTEMD_DIR/$1" "./shared/nm-utils/${1##*/}"
}

nm_copy_sd_core "src/libsystemd-network/arp-util.c"
nm_copy_sd_core "src/libsystemd-network/arp-util.h"
nm_copy_sd_core "src/libsystemd-network/dhcp-identifier.c"
nm_copy_sd_core "src/libsystemd-network/dhcp-identifier.h"
nm_copy_sd_core "src/libsystemd-network/dhcp-internal.h"
nm_copy_sd_core "src/libsystemd-network/dhcp-lease-internal.h"
nm_copy_sd_core "src/libsystemd-network/dhcp-network.c"
nm_copy_sd_core "src/libsystemd-network/dhcp-option.c"
nm_copy_sd_core "src/libsystemd-network/dhcp-packet.c"
nm_copy_sd_core "src/libsystemd-network/dhcp-protocol.h"
nm_copy_sd_core "src/libsystemd-network/dhcp6-internal.h"
nm_copy_sd_core "src/libsystemd-network/dhcp6-lease-internal.h"
nm_copy_sd_core "src/libsystemd-network/dhcp6-network.c"
nm_copy_sd_core "src/libsystemd-network/dhcp6-option.c"
nm_copy_sd_core "src/libsystemd-network/dhcp6-protocol.h"
nm_copy_sd_core "src/libsystemd-network/lldp-internal.h"
nm_copy_sd_core "src/libsystemd-network/lldp-neighbor.c"
nm_copy_sd_core "src/libsystemd-network/lldp-neighbor.h"
nm_copy_sd_core "src/libsystemd-network/lldp-network.c"
nm_copy_sd_core "src/libsystemd-network/lldp-network.h"
nm_copy_sd_core "src/libsystemd-network/network-internal.c"
nm_copy_sd_core "src/libsystemd-network/network-internal.h"
nm_copy_sd_core "src/libsystemd-network/sd-dhcp-client.c"
nm_copy_sd_core "src/libsystemd-network/sd-dhcp-lease.c"
nm_copy_sd_core "src/libsystemd-network/sd-dhcp6-client.c"
nm_copy_sd_core "src/libsystemd-network/sd-dhcp6-lease.c"
nm_copy_sd_core "src/libsystemd-network/sd-ipv4acd.c"
nm_copy_sd_core "src/libsystemd-network/sd-ipv4ll.c"
nm_copy_sd_core "src/libsystemd-network/sd-lldp.c"
nm_copy_sd_core "src/libsystemd/sd-event/event-source.h"
nm_copy_sd_core "src/libsystemd/sd-event/event-util.c"
nm_copy_sd_core "src/libsystemd/sd-event/event-util.h"
nm_copy_sd_core "src/libsystemd/sd-event/sd-event.c"
nm_copy_sd_core "src/libsystemd/sd-id128/id128-util.c"
nm_copy_sd_core "src/libsystemd/sd-id128/id128-util.h"
nm_copy_sd_core "src/libsystemd/sd-id128/sd-id128.c"
nm_copy_sd_core "src/shared/dns-domain.c"
nm_copy_sd_core "src/shared/dns-domain.h"
nm_copy_sd_core "src/systemd/_sd-common.h"
nm_copy_sd_core "src/systemd/sd-dhcp-client.h"
nm_copy_sd_core "src/systemd/sd-dhcp-lease.h"
nm_copy_sd_core "src/systemd/sd-dhcp6-client.h"
nm_copy_sd_core "src/systemd/sd-dhcp6-lease.h"
nm_copy_sd_core "src/systemd/sd-event.h"
nm_copy_sd_core "src/systemd/sd-id128.h"
nm_copy_sd_core "src/systemd/sd-ipv4acd.h"
nm_copy_sd_core "src/systemd/sd-ipv4ll.h"
nm_copy_sd_core "src/systemd/sd-lldp.h"
nm_copy_sd_core "src/systemd/sd-ndisc.h"
nm_copy_sd_nmutils "src/basic/unaligned.h"
nm_copy_sd_shared "src/basic/alloc-util.c"
nm_copy_sd_shared "src/basic/alloc-util.h"
nm_copy_sd_shared "src/basic/async.h"
nm_copy_sd_shared "src/basic/env-file.c"
nm_copy_sd_shared "src/basic/env-file.h"
nm_copy_sd_shared "src/basic/env-util.c"
nm_copy_sd_shared "src/basic/env-util.h"
nm_copy_sd_shared "src/basic/escape.c"
nm_copy_sd_shared "src/basic/escape.h"
nm_copy_sd_shared "src/basic/ether-addr-util.c"
nm_copy_sd_shared "src/basic/ether-addr-util.h"
nm_copy_sd_shared "src/basic/extract-word.c"
nm_copy_sd_shared "src/basic/extract-word.h"
nm_copy_sd_shared "src/basic/fd-util.c"
nm_copy_sd_shared "src/basic/fd-util.h"
nm_copy_sd_shared "src/basic/fileio.c"
nm_copy_sd_shared "src/basic/fileio.h"
nm_copy_sd_shared "src/basic/fs-util.c"
nm_copy_sd_shared "src/basic/fs-util.h"
nm_copy_sd_shared "src/basic/hash-funcs.c"
nm_copy_sd_shared "src/basic/hash-funcs.h"
nm_copy_sd_shared "src/basic/hashmap.c"
nm_copy_sd_shared "src/basic/hashmap.h"
nm_copy_sd_shared "src/basic/hexdecoct.c"
nm_copy_sd_shared "src/basic/hexdecoct.h"
nm_copy_sd_shared "src/basic/hostname-util.c"
nm_copy_sd_shared "src/basic/hostname-util.h"
nm_copy_sd_shared "src/basic/in-addr-util.c"
nm_copy_sd_shared "src/basic/in-addr-util.h"
nm_copy_sd_shared "src/basic/io-util.c"
nm_copy_sd_shared "src/basic/io-util.h"
nm_copy_sd_shared "src/basic/list.h"
nm_copy_sd_shared "src/basic/log.h"
nm_copy_sd_shared "src/basic/macro.h"
nm_copy_sd_shared "src/basic/mempool.c"
nm_copy_sd_shared "src/basic/mempool.h"
nm_copy_sd_shared "src/basic/missing_type.h"
nm_copy_sd_shared "src/basic/parse-util.c"
nm_copy_sd_shared "src/basic/parse-util.h"
nm_copy_sd_shared "src/basic/path-util.c"
nm_copy_sd_shared "src/basic/path-util.h"
nm_copy_sd_shared "src/basic/prioq.c"
nm_copy_sd_shared "src/basic/prioq.h"
nm_copy_sd_shared "src/basic/process-util.c"
nm_copy_sd_shared "src/basic/process-util.h"
nm_copy_sd_shared "src/basic/random-util.c"
nm_copy_sd_shared "src/basic/random-util.h"
nm_copy_sd_shared "src/basic/refcnt.h"
nm_copy_sd_shared "src/basic/set.h"
nm_copy_sd_shared "src/basic/signal-util.h"
nm_copy_sd_shared "src/basic/siphash24.h"
nm_copy_sd_shared "src/basic/socket-util.c"
nm_copy_sd_shared "src/basic/socket-util.h"
nm_copy_sd_shared "src/basic/sparse-endian.h"
nm_copy_sd_shared "src/basic/stat-util.c"
nm_copy_sd_shared "src/basic/stat-util.h"
nm_copy_sd_shared "src/basic/stdio-util.h"
nm_copy_sd_shared "src/basic/string-table.c"
nm_copy_sd_shared "src/basic/string-table.h"
nm_copy_sd_shared "src/basic/string-util.c"
nm_copy_sd_shared "src/basic/string-util.h"
nm_copy_sd_shared "src/basic/strv.c"
nm_copy_sd_shared "src/basic/strv.h"
nm_copy_sd_shared "src/basic/time-util.c"
nm_copy_sd_shared "src/basic/time-util.h"
nm_copy_sd_shared "src/basic/tmpfile-util.c"
nm_copy_sd_shared "src/basic/tmpfile-util.h"
nm_copy_sd_shared "src/basic/umask-util.h"
nm_copy_sd_shared "src/basic/utf8.c"
nm_copy_sd_shared "src/basic/utf8.h"
nm_copy_sd_shared "src/basic/util.c"
nm_copy_sd_shared "src/basic/util.h"
2019-01-07 08:36:52 +01:00