summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAge
* basic: introduce generic ascii_strlower_n() call and make use of it everywhereLennart Poettering2017-05-17
|
* basic: add string table macros for "extended boolean" enumsLennart Poettering2017-05-17
| | | | | | | | | | In a couple of cases we maintain configuration settings that know an on and off state, like a boolean, plus some additional states. We generally parse them as booleans first, and if that fails check for specific additional values. This adds a generalized set of macros for parsing such settings, and ports one use in resolved and another in networkd over to it.
* resolved: explicitly handle case when the trust anchor is emptyLennart Poettering2017-05-17
| | | | | | | | | | | | | | | | | | Since we honour RFC5011 revoked keys it might happen we end up with an empty trust anchor, or one where there's no entry for the root left. With this patch the logic is changed what to do in this case. Before this patch we'd end up requesting the root DS, which returns with NODATA but a signed NSEC we cannot verify, since the trust anchor is empty after all. Thus we'd return a DNSSEC result of "missing-key", as we lack a verified version of the key. With this patch in place, look-ups for the root DS are explicitly recognized, and not passed on to the DNS servers. Instead, if downgrade-ok mode is on an unsigned NODATA response is synthesized, so that the validator code continues under the assumption the root zone was unsigned. If downgrade-ok mode is off a new transaction failure is generated, that makes this case recognizable.
* resolved: introduce a proper bus error for DNSSEC validation errorsLennart Poettering2017-05-17
|
* basic: modernize conf-files.c a bitLennart Poettering2017-05-17
|
* core: socket options fix SCTP_NODELAYSusant Sahani2017-05-17
| | | | | SCTP_NODELAY is diffrent to TCP_NODELAY. Apply proper options in case of SCTP.
* resolved: properly handle SRV RRs with the DNS root as hostnameLennart Poettering2017-05-17
|
* resolved: add errno mapping for BUS_ERROR_CONNECTION_FAILURELennart Poettering2017-05-17
| | | | | This was missing when the error type was added in ac720200b7e5b80cc4985087e38f3452e5b3b080.
* resolved: change mapping of BUS_ERROR_NO_NAME_SERVERS to ESRCHLennart Poettering2017-05-17
| | | | EIO is really too generic, and indicates transmission problems.
* bus-util: print "systemctl --user" on user service managerWaLyong Cho2017-05-17
| | | | | | When a unit was started with "systemctl --user" and it failed, error messages is printed as "systemctl status". But it should be "systemctl --user status".
* man: fix typosJakub Wilk2017-05-17
|
* basic: add missing word in commentZbigniew Jędrzejewski-Szmek2017-05-17
|
* resolved: generate an explicit transaction error when we cannot reach server ↵Lennart Poettering2017-05-17
| | | | | | | | | | via TCP Previously, if we couldn't reach a server via UDP we'd generate an MAX_ATTEMPTS transaction result, but if we couldn't reach it via TCP we'd generate a RESOURCES transaction result. While it is OK to generate two different errors I think, "RESOURCES" is certainly a misnomer. Introduce a new transaction result "CONNECTION_FAILURE" instead.
* mount-setup.c: fix handling of symlink Smack labelling in cgroup setupPatrick Ohly2017-05-17
| | | | | | | | | | | | | | | | The code introduced in f8c1a81c51 (= elogind 227) failed for me with: Failed to copy smack label from net_cls to /sys/fs/cgroup/net_cls: No such file or directory There is no need for a symlink in this case because source and target are identical. The symlink() call is allowed to fail when the target already exists. When that happens, copying the Smack label must be skipped. But the code also failed when there is a symlink, like "cpu -> cpu,cpuacct", because mac_smack_copy() got called with src="cpu,cpuacct" which fails to find the entry because the current directory is not inside /sys/fs/cgroup. The absolute path to the existing entry must be used instead.
* sd-event: improve debugging of event source errorsDaniel Mack2017-05-17
| | | | | | | Printing the pointer variable really doesn't help, so drop that. Instead, add a string lookup table for the EventSourceType enum, and print the type of event source in case of errors.
* Fix typo on logind-dbus.cJoost Bremmer2017-05-17
| | | | | | | | | method_schedule_shutdown referenced org.freedesktop.login1.poweroff* which is never registered in polkit. Now refers to org.freedesktop.login1.power-off* Signed-off-by: Joost Bremmer <toost.b@gmail.com>
* utf8.[ch] et al: use char32_t and char16_t instead of int, int32_t, int16_tShawn Landden2017-05-17
| | | | | | | | | | | | rework C11 utf8.[ch] to use char32_t instead of uint32_t when referring to unicode chars, to make things more expressive. [ @zonque: * rebased to current master * use AC_CHECK_DECLS to detect availibility of char{16,32}_t * make utf8_encoded_to_unichar() return int ]
* basic: ENABLE_DEBUG_HASHMAP needs <pthread.h>Henrik Kaare Poulsen2017-05-17
| | | | this is a follow-up for commit 11c3a36649e5e5e77db499c92f3
* sd-event: instrument sd_event_run() for profiling delaysVito Caputo2017-05-17
| | | | | | | | | | | | | Set SD_EVENT_PROFILE_DELAYS to activate accounting and periodic logging of the distribution of delays between sd_event_run() calls. Time spent in dispatching as well as time spent outside of sd_event_run() is measured and accounted for. Every 5 seconds a logarithmic histogram loop iteration delays since 5 seconds previous is logged. This is useful in identifying the frequency and magnitude of latencies affecting the event loop, which should be kept to a minimum.
* login: make sure /run/nologin has correct SELinux labelMichal Sekletar2017-05-17
|
* shared: include what we useThomas Hindoe Paaboel Andersen2017-05-17
| | | | | The next step of a general cleanup of our includes. This one mostly adds missing includes but there are a few removals as well.
* journal: unbreak sd_journal_sendvZbigniew Jędrzejewski-Szmek2017-05-17
| | | | | | | | | | | | Borked since commit 3ee897d6c2401effbc82f5eef35fce405781d6c8 Author: Lennart Poettering <lennart@poettering.net> Date: Wed Sep 23 01:00:04 2015 +0200 tree-wide: port more code to use send_one_fd() and receive_one_fd() because here our fd is not connected and we need to specify the address.
* basic: re-sort includesThomas Hindoe Paaboel Andersen2017-05-17
| | | | | My previous patch to only include what we use accidentially placed the added inlcudes in non-sorted order.
* journal-remote: split-mode=host, remove port from journal filenameKlearchos Chaloulos2017-05-17
| | | | | When constructing the journal filename to store logs from a remote host, remove the port of the tcp connection, as the port will change with every reboot/connection loss between sender/reveiver machines. Having the port in the filename will cause a new journal file to be created for every reboot or connection loss. For the implementation, a new argument "bool include_port" is added to the getpeername_pretty() function. This is passed to the sockaddr_pretty() function. The value of the include_port argument is set to true in all calls of getpeername_pretty(), except for 2 calls in journal-remote.c, where it is set to false.
* basic: include only what we useThomas Hindoe Paaboel Andersen2017-05-17
| | | | | This is a cleaned up result of running iwyu but without forward declarations on src/basic.
* acl-util: only set the mask if not presentZbigniew Jędrzejewski-Szmek2017-05-17
| | | | | | | | | | | | | | | | | When we have non-owner user or group entries, we need the mask for the acl to be valid. But acl_calc_mask() calculates the mask to include all permissions, even those that were masked before. Apparently this happens when we inherit *:r-x permissions from a parent directory — the kernel sets *:r-x, mask:r--, effectively masking the executable bit. acl_calc_mask() would set the mask:r-x, effectively enabling the bit. To avoid this, be more conservative when to add the mask entry: first iterate over all entries, and do nothing if a mask. This returns the code closer to J.A.Steffens' original version in v204-90-g23ad4dd884. Should fix https://github.com/elogind/elogind/issues/1977.
* core: expose soft limits on the busEvgeny Vereshchagin2017-05-17
| | | | | | This is a follow-up for https://github.com/elogind/elogind/pull/1994 See https://github.com/elogind/elogind/pull/1994#issuecomment-160087219
* tree-wide: expose "p"-suffix unref calls in public APIs to make gcc cleanup easyLennart Poettering2017-05-17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | GLIB has recently started to officially support the gcc cleanup attribute in its public API, hence let's do the same for our APIs. With this patch we'll define an xyz_unrefp() call for each public xyz_unref() call, to make it easy to use inside a __attribute__((cleanup())) expression. Then, all code is ported over to make use of this. The new calls are also documented in the man pages, with examples how to use them (well, I only added docs where the _unref() call itself already had docs, and the examples, only cover sd_bus_unrefp() and sd_event_unrefp()). This also renames sd_lldp_free() to sd_lldp_unref(), since that's how we tend to call our destructors these days. Note that this defines no public macro that wraps gcc's attribute and makes it easier to use. While I think it's our duty in the library to make our stuff easy to use, I figure it's not our duty to make gcc's own features easy to use on its own. Most likely, client code which wants to make use of this should define its own: #define _cleanup_(function) __attribute__((cleanup(function))) Or similar, to make the gcc feature easier to use. Making this logic public has the benefit that we can remove three header files whose only purpose was to define these functions internally. See #2008.
* core: rename Random* to RandomizedDelay*Zbigniew Jędrzejewski-Szmek2017-05-17
| | | | | | | The name RandomSec is too generic: "Sec" just specifies the default unit type, and "Random" by itself is not enough. Rename to something that should give the user general idea what the setting does without looking at documentation.
* util-lib: add ordered_set_ensure_allocated()Lennart Poettering2017-05-17
| | | | | ordered_set_ensure_allocated() does for an OrderedSet, what set_ensure_allicated() does for a Set.
* bash-completion: list valid signal namesEvgeny Vereshchagin2017-05-17
| | | | this is a follow-up for commit 18540892d18addc4dcb81
* escape: add cescape_length() call as generalization of cescape()Lennart Poettering2017-05-17
|
* virt: add comment about order in virtualization detectionChristian Hesse2017-05-17
|
* virt: detect dmi before cpuidChristian Hesse2017-05-17
| | | | | | | | | | | | | | Virtualbox should be detected as 'oracle'. This used to work but broke with commit: commit 75f86906c52735c98dc0aa7e24b773edb42ee814 Author: Lennart Poettering <lennart@poettering.net> Date: Mon Sep 7 13:42:47 2015 +0200 basic: rework virtualization detection API We swap detection for dmi and cpuid, this fixes Virtualbox with KVM. Hopefully it does not break anything else.
* man: include the target name when linking to man pages in html outputZbigniew Jędrzejewski-Szmek2017-05-17
| | | | | | | | | | | | | | | | | | | | | Links like http://www.freedesktop.org/software/elogind/man/elogind.socket.html are changed to http://www.freedesktop.org/software/elogind/man/elogind.socket.html#Accept=. This implementation is quick & dirty, and misses various corner cases. A fairly important one is that when a few directives share the same anchor (which happens when multiple directives are described in the same paragraph), generated links for everything except the first one link to an invalid anchor. Another shortcoming is that the formatting does not use the proper generateID machinery, so the anchor name could be wrong in some cases. But it seems to work for a large percentage of links, so seems to be an improvement in usability. When the anchor is missing, we land at the top of the page, which is the same as before. If the anchor were to point to different spot, this would be more confusing... Not sure if that ever happens. Anyway, the user should be able to recover from landing on the wrong place in the page. (Mostly) fixes https://github.com/elogind/elogind/issues/1956.
* translations: update-poDaniele Medri2017-05-17
|
* sd-event: use prioq_ensure_allocated where possibleEvgeny Vereshchagin2017-05-17
|
* man: fully document sd-event interfacesLennart Poettering2017-05-17
| | | | | | | | | This completes the set of man pages for sd-event and contains some minor other fixes for other man pages too. The sd_event_set_name(3) man page is renamed to sd_event_source_set_description(3), which is the correct name of the concept today.
* sd-event: define a new PREPARING stateLennart Poettering2017-05-17
| | | | | | | | | | We already have a state RUNNING and EXITING when we dispatch regular and exit callbacks. Let's introduce a new state called PREPARING that is active while we invoke preparation callbacks. This way we have a state each for all three kinds of event handlers. The states are currently not documented, hence let's add a new state to the end, before we start documenting this.
* gitignore: only ignore .html files in man/Martin Pitt2017-05-17
| | | | | src/journal-remote/browse.html is git-tracked source and should not be ignored. Avoid accidentally ignoring similar ones in the future.
* tree-wide: sort includes in *.hThomas Hindoe Paaboel Andersen2017-05-17
| | | | | This is a continuation of the previous include sort patch, which only sorted for .c files.
* core: add new RandomSec= setting for time unitsLennart Poettering2017-05-17
| | | | | This allows configuration of a random time on top of the elapse events, in order to spread time events in a network evenly across a range.
* bus-util: make sure --property=RemainAfterElapse=1 worksLennart Poettering2017-05-17
|
* bus-util: add in forgotten error messagesLennart Poettering2017-05-17
|
* hostname-util: fix code commentBeniamino Galvani2017-05-17
|
* siphash: minor coding style fixes and modernizationsLennart Poettering2017-05-17
| | | | Only cosmetics really, doesn't change any actual logic.
* calendarspec: sub-second support, v3Hristo Venev2017-05-17
|
* journald: allow additional payload in server_driver_messageZbigniew Jędrzejewski-Szmek2017-05-17
| | | | | | | | | | | | | The code to format the iovec is shared with log.c. All call sites to server_driver_message are changed to include the additional "MESSAGE=" part, but the new functionality is not used and change in functionality is not expected. iovec is preallocated, so the maximum number of messages is limited. In server_driver_message N_IOVEC_PAYLOAD_FIELDS is currently set to 1. New code is not oom safe, it will fail if memory cannot be allocated. This will be fixed in subsequent commit.
* test-tables: ellide boring parts of sparse mappingsZbigniew Jędrzejewski-Szmek2017-05-17
|
* resolved: add alignment to base64Zbigniew Jędrzejewski-Szmek2017-05-17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We try to fit the lengthy key data into available space. If the other fields take less than half of the available columns, we use align everything in the remaining columns. Otherwise, we put everything after a newline, indented with 8 spaces. This is similar to dig and other tools do. $ COLUMNS=78 ./elogind-resolve -t any . . IN SOA a.root-servers.net nstld.verisign-grs.com 2016012701 1800 900 604800 86400 . IN RRSIG SOA RSASHA256 0 86400 20160206170000 20160127160000 54549 S1uhUoBAReAFi5wH/KczVDgwLb+B9Zp57dSYj9aX4XxBhKuzccIducpg0wWXhjCRAWuzY fQ/J2anm4+C4BLUTdlytPIemd42SUffQk2WGuuukI8e67nkrNF3WFtoeXQ4OchsyO24t2 rxi682Zo9ViqmXZ+MSsjWKt1jdem4noaY= . IN NS h.root-servers.net . IN NS k.root-servers.net . IN NS e.root-servers.net . IN NS c.root-servers.net . IN NS b.root-servers.net . IN NS g.root-servers.net . IN NS d.root-servers.net . IN NS f.root-servers.net . IN NS i.root-servers.net . IN NS j.root-servers.net . IN NS m.root-servers.net . IN NS a.root-servers.net . IN NS l.root-servers.net . IN RRSIG NS RSASHA256 0 518400 20160206170000 20160127160000 54549 rxhmTVKUgs72G3VzL+1JRuD0nGLIrPM+ISfmUx0eYUH5wZD5XMu2X+8PfkAsEQT1dziPs ac+zK1YZPbNgr3yGI5H/wEbK8S7DmlvO+/I9WKTLp/Zxn3yncvnTOdjFMZxkAqHbjVOm+ BFz7RjQuvCQlEJX4PQBFphgEnkiOnmMdI= . IN NSEC aaa ( NS SOA RRSIG NSEC DNSKEY ) . IN RRSIG NSEC RSASHA256 0 86400 20160206170000 20160127160000 54549 HY49/nGkUJJP1zLmH33MIKnkNH33jQ7bsAHE9itEjvC4wfAzgq8+Oh9fjYav1R1GDeJ2Z HOu3Z2uDRif10R8RsmZbxyZXJs7eHui9KcAMot1U4uKCCooC/5GImf+oUDbvaraUCMQRU D3mUzoa0BGWfxgZEDqZ55raVFT/olEgG8= . IN DNSKEY 257 3 RSASHA256 AwEAAagAIKlVZrpC6Ia7gEzahOR+9W29euxhJhVVLOyQbSEW0 O8gcCjFFVQUTf6v58fLjwBd0YI0EzrAcQqBGCzh/RStIoO8g0 NfnfL2MTJRkxoXbfDaUeVPQuYEhg37NZWAJQ9VnMVDxP/VHL4 96M/QZxkjf5/Efucp2gaDX6RS6CXpoY68LsvPVjR0ZSwzz1ap AzvN9dlzEheX7ICJBBtuA6G3LQpzW5hOA2hzCTMjJPJ8LbqF6 dsV6DoBQzgul0sGIcGOYl7OyQdXfZ57relSQageu+ipAdTTJ2 5AsRTAoub8ONGcLmqrAmRLKBP1dfwhYB4N7knNnulqQxA+Uk1 ihz0= . IN DNSKEY 256 3 RSASHA256 AwEAAbr/RV0stAWYbmKOldjShp4AOQGOyY3ATI1NUpP4X1qBs 6lsXpc+1ABgv6zkg02IktjZrHnmD0HsElu3wqXMrT5KL1W7Sp mg0Pou9WZ8QttdTKXwrVXrASsaGI2z/pLBSnK8EdzqUrTVxY4 TEGZtxV519isM06CCMihxTn5cfFBF . IN RRSIG DNSKEY RSASHA256 0 172800 20160204235959 20160121000000 19036 XYewrVdYKRDfZptAATwT+W4zng04riExV36+z04kok09W0RmOtDlQrlrwHLlD2iN/zYpg EqGgDF5T2xlrQdNpn+PFHhypHM7NQAgLTrwmiw6mGbV0bsZN3rhFxHwW7QVUFAvo9eNVu INrjm+sArwxq3DnPkmA+3K4ikKD2iiT/jT91VYr9SHFqXXURccLjI+nmaE7m31hXcirX/ r5i3J+B4Fx4415IavSD72r7cmruocnCVjcp+ZAUKeMyW+RwigzevLz3oEcCZ4nrTpGLEj wFaVePYoP+rfdmfLfTdmkkm4APRJa2My3XOdGFlgNS1pW1pH4az5LapLE2vMO7p1aQ== -- Information acquired via protocol DNS in 14.4ms. -- Data is authenticated: no