summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2015-08-21resolved: only maintain one question RR key per transactionLennart Poettering
Let's simplify things and only maintain a single RR key per transaction object, instead of a full DnsQuestion. Unicast DNS and LLMNR don't support multiple questions per packet anway, and Multicast DNS suggests coalescing questions beyond a single dns query, across the whole system.
2015-08-21resolved: add extra check for family when doing LLMNR TCP connectionsLennart Poettering
It shouldn't happen that we try to resolve IPv4 addresses via LLMNR on IPv6 and vice versa, but let's explicitly verify that we don't turn an IPv4 LLMNR lookup into an IPv6 TCP connection.
2015-08-21resolved: add reference to negative caching RFCLennart Poettering
2015-08-21Merge pull request #1002 from poettering/resolved-variousTom Gundersen
resolved: synthesize more RRs locally and other fixes
2015-08-21resolved: rework synthesizing logicLennart Poettering
With this change we'll now also generate synthesized RRs for the local LLMNR hostname (first label of system hostname), the local mDNS hostname (first label of system hostname suffixed with .local), the "gateway" hostname and all the reverse PTRs. This hence takes over part of what nss-myhostname already implemented. Local hostnames resolve to the set of local IP addresses. Since the addresses are possibly on different interfaces it is necessary to change the internal DnsAnswer object to track per-RR interface indexes, and to change the bus API to always return the interface per-address rather than per-reply. This change also patches the existing clients for resolved accordingly (nss-resolve + systemd-resolve-host). This also changes the routing logic for queries slightly: we now ensure that the local hostname is never resolved via LLMNR, thus making it trustable on the local system.
2015-08-21resolved: make DnsQuestion logic handle NULL arrays as empty arraysLennart Poettering
Following our usual logic of treating NULL arrays as empty arrays (for example, see strv.c) do the same for questions too.
2015-08-21resolved: minor typo comment fixLennart Poettering
2015-08-21dns-domain: add call for concatenating two domain namesLennart Poettering
This is specifically useful for appending the mDNS ".local" suffix to a single-label hostname in the most correct way. (used in later commit)
2015-08-21Merge pull request #924 from pfl/systemd-dhcp6Tom Gundersen
sd-dhcpv6: support DNS and NTP information
2015-08-21Merge pull request #1001 from major/add-bonding-docsTom Gundersen
man: networkd - adding bonding examples for systemd-networkd
2015-08-21hostname-util: introduce new is_gateway_hostname() callLennart Poettering
This moves is_gateway() from nss-myhostname into the basic APIs, and makes it more like is_localhost(). Also, we rename it to is_gateway_hostname() to make it more expressive. Sharing this function in src/basic/ allows us to reuse the function for routing name requests in resolved (in a later commit).
2015-08-21network: Save DNS and NTP data for a DHCPv6 linkPatrik Flykt
Append DNS and NTP data obtained via DHCPv6 when the Link is saved.
2015-08-21network: Add function to serialize an IPv6 addressPatrik Flykt
2015-08-21test-dhcp6-client: Add tests for DNS and NTP optionsPatrik Flykt
Test option setting and getting in test_advertise_option(). Verify that the information provided in DHCPv6 Reply messages is also available in the Information and Solicit callbacks.
2015-08-21sd-dhcp6: Support deprecated SNTP Configuration OptionPatrik Flykt
Although the SNTP option specified in RFC 4075 has been deprecated, some servers are still sending NTP information with this option. Use the SNTP information provided only if the NTP option is not present. Update the test case as SNTP information is also requested.
2015-08-21sd-dhcp6: Add support for DHCPv6 NTP Server OptionPatrik Flykt
Support NTP server and multicast addresses and NTP server domain names as specified in RFC 5908.
2015-08-21sd-dhcp6: Add support for DHCPv6 DNS Domain Search List optionPatrik Flykt
Support DHCPv6 DNS search list option as specified in RFC 3646. This option contains a list of DNS search domains encoded without compression as specified in Section 8. of RFC 3315.
2015-08-21sd-dhcp6: Add support for DHCPv6 DNS Recursive Name Server optionPatrik Flykt
Support DHCPv6 DNS server option as specified in RFC 3646. This option contains a list of IPv6 DNS server addresses.
2015-08-21dhcp6-option: Add helper function for uncompressed domain namesPatrik Flykt
Add a helper function containing a modified version of dns_packet_read_name() that does not use DnsPacket to extract a string array of domain names from the provided option data. The domain names are stored uncompressed as defined in Section 8. of RFC 3315.
2015-08-21dhcp6-option: Add helper function for fetching IPv6 addressesPatrik Flykt
Add a helper function that extracts a block of IPv6 addresses from the provided option data.
2015-08-21sd-dhcp6-client: Save a DHCPv6 lease also with Information ReplyPatrik Flykt
As the lease structure contains interesting information, save it also for the Information Reply.
2015-08-21sd-dhcp6-client: Fix unreferencing DHCPv6 lease on client resetPatrik Flykt
When the DHCPv6 client is started by the library user or stopped for any reason, unref the DHCPv6 lease when resetting the DHCPv6 client data structure. This makes the DHCPv6 client always start from a clean state and not keep unnecessary an lease structure around when stopped. If this is not done, a previously existing lease information can be interpreted to be from another server when restarting DHCPv6.
2015-08-21Merge pull request #996 from kostrowski/man-systemd-specialDaniel Mack
man: fix typo in description of system.slice
2015-08-21Merge pull request #995 from poettering/timedate-utcDaniel Mack
timedatectl: when no timezone is set consider UTC the default
2015-08-20Adding bonding examples for systemd-networkdMajor Hayden
This commit provides some basic bonding configuration examples for .netdev and .network files.
2015-08-20man: fix typo in description of system.sliceEric Kostrowski
2015-08-20update TODOLennart Poettering
2015-08-20timedatectl: when no timezone is set consider UTC the defaultLennart Poettering
This fixes #993, and ensures that the libc does not consider any old timezone information into account, that was set earlier.
2015-08-19Merge pull request #990 from owtaylor/issue-989David Herrmann
Issue 989 - logind: VT is not properly reset on session close
2015-08-19Merge pull request #993 from xnox/timedateDaniel Mack
timedatectl: assert timezone is not null in setenv() call.
2015-08-19timedatectl: assert timezone is not null in setenv() call.Dimitri John Ledkov
setenv is declared as: extern int setenv (const char *__name, const char *__value, int __replace) __THROW __nonnull ((2)); And i->timezone can be NULL, if for example /etc/localtime is missing. Previously that worked, but now result in a libc dumping core, as seen with gcc 2.22, due to: https://sourceware.org/ml/glibc-cvs/2015-q2/msg00075.html
2015-08-19Merge pull request #988 from spartacus06/update-completion-machinectl-v2Lennart Poettering
Update completion machinectl (part 2)
2015-08-19Merge pull request #992 from zonque/journal-jsonLennart Poettering
journal: fix json output of unicode characters
2015-08-18logind: get a fresh file descriptor to clean up a VTOwen W. Taylor
When the controlling process exits, any existing file descriptors for that FD will be marked as hung-up and ioctls on them will file with EIO. To work around this, open a new file descriptor for the VT we want to clean up. Thanks to Ray Strode for help in sorting out the problem and coming up with a fix! https://github.com/systemd/systemd/issues/989
2015-08-18logind: use open_terminal() instead of open()Owen W. Taylor
The open_terminal() function adds retries in case a terminal is in the process of being closed when we open it, and should generally be used to open a terminal. We especially need it for code that a subsequent commit adds that reopens the terminal at session shut-down time; such races would be more likely in that case. Found by Ray Strode.
2015-08-18shell-completion: bash: make list-transfers and cancel-transfer STANDALONESeth Jennings
list-transfers and cancel-transfers don't take machine arguments.
2015-08-18shell-completion: bash: add image transfer subcommandsSeth Jennings
2015-08-18journal: fix json output of unicode charactersDaniel Mack
2015-08-18Merge pull request #984 from whot/hwdb-updatesLennart Poettering
hwdb: fix capitalization of product version for the Macbooks
2015-08-18Merge pull request #983 from phomes/journal_dead_checkLennart Poettering
journal: remove error check that never happens
2015-08-18hwdb: fix capitalization of product version for the MacbooksPeter Hutterer
We need uppercase hex here. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2015-08-18journal: remove error check that never happensThomas Hindoe Paaboel Andersen
remove_directory will always return 0 so this can never happen. Besides that, d->path and d are freed so we would end up with a null pointer dereference anyway.
2015-08-17Merge pull request #982 from evverx/add-systemd-cglsDaniel Mack
man: add systemd-cgls as tool that shows the cgroup hierarchy
2015-08-17man: add systemd-cgls as tool that shows the cgroup hierarchyEvgeny Vereshchagin
2015-08-17Merge pull request #977 from richardmaw-codethink/machinectl-userns-login-v2Lennart Poettering
Fix machinectl login with containers in user namespaces (v2)
2015-08-17Merge pull request #976 from elfring/Remove_unnecessary_checks2Lennart Poettering
Delete unnecessary checks before some function calls
2015-08-17Merge pull request #958 from stefwalter/fix-journalctl-f-regressionLennart Poettering
Regression: 'journalctl -f -t unmatched' doesn't block properly
2015-08-17namespace helpers: Allow entering a UID namespaceRichard Maw
To be able to use `systemd-run` or `machinectl login` on a container that is in a private user namespace, the sub-process must have entered the user namespace before connecting to the container's D-Bus, otherwise the UID and GID in the peer credentials are garbage. So we extend namespace_open and namespace_enter to support UID namespaces, and we enter the UID namespace in bus_container_connect_{socket,kernel}. namespace_open will degrade to a no-op if user namespaces are not enabled in the kernel. Special handling is required for the setns call in namespace_enter with a user namespace, since transitioning to your own namespace is forbidden, as it would result in re-entering your user namespace as root. Arguably it may be valid to check this at the call site, rather than inside namespace_enter, but it is less code to do it inside, and if the intention of calling namespace_enter is to *be* in the target namespace, rather than to transition to the target namespace, it is a reasonable approach. The check for whether the user namespace is the same must happen before entering namespaces, as we may not be able to access /proc during the intermediate transition stage. We can't instead attempt to enter the user namespace and then ignore the failure from it being the same namespace, since the error code is not distinct, and we can't compare namespaces while mid-transition.
2015-08-17Bug #944: Deletion of unnecessary checks before a few calls of systemd functionsMarkus Elfring
The following functions return immediately if a null pointer was passed. * calendar_spec_free * link_address_free * manager_free * sd_bus_unref * sd_journal_close * udev_monitor_unref * udev_unref It is therefore not needed that a function caller repeats a corresponding check. This issue was fixed by using the software Coccinelle 1.0.1.
2015-08-17Merge pull request #953 from poettering/ebadfDaniel Mack
tree-wide: generate EBADF when we get invalid fds