chiark / gitweb /
elogind.git
2 years agobasic: split hash functions into their own header files
Lennart Poettering [Fri, 8 Jan 2016 00:10:45 +0000 (01:10 +0100)]
basic: split hash functions into their own header files

The hash operations are not really that specific to hashmaps, hence split them into a .c module of their own.

2 years agobasic: introduce generic ascii_strlower_n() call and make use of it everywhere
Lennart Poettering [Thu, 7 Jan 2016 18:43:26 +0000 (19:43 +0100)]
basic: introduce generic ascii_strlower_n() call and make use of it everywhere

2 years agobasic: add string table macros for "extended boolean" enums
Lennart Poettering [Tue, 5 Jan 2016 16:10:17 +0000 (17:10 +0100)]
basic: add string table macros for "extended boolean" enums

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.

2 years agoresolved: explicitly handle case when the trust anchor is empty
Lennart Poettering [Mon, 4 Jan 2016 21:35:54 +0000 (22:35 +0100)]
resolved: explicitly handle case when the trust anchor is empty

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.

2 years agoresolved: introduce a proper bus error for DNSSEC validation errors
Lennart Poettering [Mon, 4 Jan 2016 21:35:17 +0000 (22:35 +0100)]
resolved: introduce a proper bus error for DNSSEC validation errors

2 years agobasic: modernize conf-files.c a bit
Lennart Poettering [Sat, 2 Jan 2016 20:32:45 +0000 (21:32 +0100)]
basic: modernize conf-files.c a bit

2 years agocore: socket options fix SCTP_NODELAY
Susant Sahani [Thu, 31 Dec 2015 06:35:57 +0000 (12:05 +0530)]
core: socket options fix SCTP_NODELAY

SCTP_NODELAY is diffrent to TCP_NODELAY.
Apply proper options in case of SCTP.

2 years agoresolved: properly handle SRV RRs with the DNS root as hostname
Lennart Poettering [Tue, 29 Dec 2015 17:58:05 +0000 (18:58 +0100)]
resolved: properly handle SRV RRs with the DNS root as hostname

2 years agoresolved: add errno mapping for BUS_ERROR_CONNECTION_FAILURE
Lennart Poettering [Tue, 29 Dec 2015 17:55:58 +0000 (18:55 +0100)]
resolved: add errno mapping for BUS_ERROR_CONNECTION_FAILURE

This was missing when the error type was added in
ac720200b7e5b80cc4985087e38f3452e5b3b080.

2 years agoresolved: change mapping of BUS_ERROR_NO_NAME_SERVERS to ESRCH
Lennart Poettering [Tue, 29 Dec 2015 17:55:17 +0000 (18:55 +0100)]
resolved: change mapping of BUS_ERROR_NO_NAME_SERVERS to ESRCH

EIO is really too generic, and indicates transmission problems.

2 years agobus-util: print "systemctl --user" on user service manager
WaLyong Cho [Tue, 29 Dec 2015 05:15:04 +0000 (14:15 +0900)]
bus-util: print "systemctl --user" on user service manager

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".

2 years agoman: fix typos
Jakub Wilk [Sat, 26 Dec 2015 17:25:49 +0000 (18:25 +0100)]
man: fix typos

2 years agobasic: add missing word in comment
Zbigniew Jędrzejewski-Szmek [Fri, 25 Dec 2015 21:29:09 +0000 (16:29 -0500)]
basic: add missing word in comment

2 years agoresolved: generate an explicit transaction error when we cannot reach server via TCP
Lennart Poettering [Fri, 25 Dec 2015 11:54:27 +0000 (12:54 +0100)]
resolved: generate an explicit transaction error when we cannot reach server 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.

2 years agomount-setup.c: fix handling of symlink Smack labelling in cgroup setup
Patrick Ohly [Mon, 21 Dec 2015 13:56:00 +0000 (14:56 +0100)]
mount-setup.c: fix handling of symlink Smack labelling in cgroup setup

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.

2 years agosd-event: improve debugging of event source errors
Daniel Mack [Mon, 21 Dec 2015 12:03:24 +0000 (13:03 +0100)]
sd-event: improve debugging of event source errors

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.

2 years agoFix typo on logind-dbus.c
Joost Bremmer [Sat, 19 Dec 2015 11:46:09 +0000 (12:46 +0100)]
Fix typo on logind-dbus.c

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>
2 years agoutf8.[ch] et al: use char32_t and char16_t instead of int, int32_t, int16_t
Shawn Landden [Sun, 13 Dec 2015 22:26:43 +0000 (14:26 -0800)]
utf8.[ch] et al: use char32_t and char16_t instead of int, int32_t, int16_t

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
]

2 years agobasic: ENABLE_DEBUG_HASHMAP needs <pthread.h>
Henrik Kaare Poulsen [Sun, 13 Dec 2015 18:31:05 +0000 (19:31 +0100)]
basic: ENABLE_DEBUG_HASHMAP needs <pthread.h>

this is a follow-up for commit 11c3a36649e5e5e77db499c92f3

2 years agosd-event: instrument sd_event_run() for profiling delays
Vito Caputo [Mon, 7 Dec 2015 19:28:18 +0000 (11:28 -0800)]
sd-event: instrument sd_event_run() for profiling delays

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.

2 years agologin: make sure /run/nologin has correct SELinux label
Michal Sekletar [Fri, 4 Dec 2015 21:29:38 +0000 (22:29 +0100)]
login: make sure /run/nologin has correct SELinux label

2 years agoshared: include what we use
Thomas Hindoe Paaboel Andersen [Thu, 3 Dec 2015 20:13:37 +0000 (21:13 +0100)]
shared: include what we use

The next step of a general cleanup of our includes. This one mostly
adds missing includes but there are a few removals as well.

2 years agojournal: unbreak sd_journal_sendv
Zbigniew Jędrzejewski-Szmek [Thu, 3 Dec 2015 07:20:39 +0000 (02:20 -0500)]
journal: unbreak sd_journal_sendv

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.

2 years agobasic: re-sort includes
Thomas Hindoe Paaboel Andersen [Tue, 1 Dec 2015 22:22:03 +0000 (23:22 +0100)]
basic: re-sort includes

My previous patch to only include what we use accidentially placed
the added inlcudes in non-sorted order.

2 years agojournal-remote: split-mode=host, remove port from journal filename
Klearchos Chaloulos [Tue, 1 Dec 2015 17:29:59 +0000 (19:29 +0200)]
journal-remote: split-mode=host, remove port from journal filename

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.

2 years agobasic: include only what we use
Thomas Hindoe Paaboel Andersen [Mon, 30 Nov 2015 20:43:37 +0000 (21:43 +0100)]
basic: include only what we use

This is a cleaned up result of running iwyu but without forward
declarations on src/basic.

2 years agoacl-util: only set the mask if not present
Zbigniew Jędrzejewski-Szmek [Sat, 28 Nov 2015 23:41:08 +0000 (18:41 -0500)]
acl-util: only set the mask if not present

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.

2 years agocore: expose soft limits on the bus
Evgeny Vereshchagin [Sat, 28 Nov 2015 16:49:13 +0000 (16:49 +0000)]
core: expose soft limits on the bus

This is a follow-up for https://github.com/elogind/elogind/pull/1994

See https://github.com/elogind/elogind/pull/1994#issuecomment-160087219

2 years agotree-wide: expose "p"-suffix unref calls in public APIs to make gcc cleanup easy
Lennart Poettering [Fri, 27 Nov 2015 18:13:45 +0000 (19:13 +0100)]
tree-wide: expose "p"-suffix unref calls in public APIs to make gcc cleanup easy

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.

2 years agocore: rename Random* to RandomizedDelay*
Zbigniew Jędrzejewski-Szmek [Thu, 26 Nov 2015 21:32:41 +0000 (16:32 -0500)]
core: rename Random* to RandomizedDelay*

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.

2 years agoutil-lib: add ordered_set_ensure_allocated()
Lennart Poettering [Tue, 24 Nov 2015 20:54:22 +0000 (21:54 +0100)]
util-lib: add ordered_set_ensure_allocated()

ordered_set_ensure_allocated() does for an OrderedSet, what
set_ensure_allicated() does for a Set.

2 years agobash-completion: list valid signal names
Evgeny Vereshchagin [Tue, 24 Nov 2015 16:05:42 +0000 (16:05 +0000)]
bash-completion: list valid signal names

this is a follow-up for commit 18540892d18addc4dcb81

2 years agoescape: add cescape_length() call as generalization of cescape()
Lennart Poettering [Mon, 23 Nov 2015 20:13:59 +0000 (21:13 +0100)]
escape: add cescape_length() call as generalization of cescape()

2 years agovirt: add comment about order in virtualization detection
Christian Hesse [Mon, 23 Nov 2015 18:15:25 +0000 (19:15 +0100)]
virt: add comment about order in virtualization detection

2 years agovirt: detect dmi before cpuid
Christian Hesse [Mon, 23 Nov 2015 12:55:04 +0000 (13:55 +0100)]
virt: detect dmi before cpuid

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.

2 years agoman: include the target name when linking to man pages in html output
Zbigniew Jędrzejewski-Szmek [Mon, 23 Nov 2015 04:43:36 +0000 (23:43 -0500)]
man: include the target name when linking to man pages in html output

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.

2 years agotranslations: update-po
Daniele Medri [Sun, 22 Nov 2015 15:43:39 +0000 (16:43 +0100)]
translations: update-po

2 years agosd-event: use prioq_ensure_allocated where possible
Evgeny Vereshchagin [Sun, 22 Nov 2015 06:41:31 +0000 (06:41 +0000)]
sd-event: use prioq_ensure_allocated where possible

2 years agoman: fully document sd-event interfaces
Lennart Poettering [Thu, 19 Nov 2015 22:38:54 +0000 (23:38 +0100)]
man: fully document sd-event interfaces

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.

2 years agosd-event: define a new PREPARING state
Lennart Poettering [Thu, 19 Nov 2015 22:33:55 +0000 (23:33 +0100)]
sd-event: define a new PREPARING state

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.

2 years agogitignore: only ignore .html files in man/
Martin Pitt [Thu, 19 Nov 2015 09:51:19 +0000 (10:51 +0100)]
gitignore: only ignore .html files in man/

src/journal-remote/browse.html is git-tracked source and should not be ignored.
Avoid accidentally ignoring similar ones in the future.

2 years agotree-wide: sort includes in *.h
Thomas Hindoe Paaboel Andersen [Wed, 18 Nov 2015 21:46:33 +0000 (22:46 +0100)]
tree-wide: sort includes in *.h

This is a continuation of the previous include sort patch, which
only sorted for .c files.

2 years agocore: add new RandomSec= setting for time units
Lennart Poettering [Wed, 18 Nov 2015 12:37:30 +0000 (13:37 +0100)]
core: add new RandomSec= setting for time units

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.

2 years agobus-util: make sure --property=RemainAfterElapse=1 works
Lennart Poettering [Wed, 18 Nov 2015 11:19:42 +0000 (12:19 +0100)]
bus-util: make sure --property=RemainAfterElapse=1 works

2 years agobus-util: add in forgotten error messages
Lennart Poettering [Wed, 18 Nov 2015 11:19:15 +0000 (12:19 +0100)]
bus-util: add in forgotten error messages

2 years agohostname-util: fix code comment
Beniamino Galvani [Tue, 17 Nov 2015 13:08:37 +0000 (14:08 +0100)]
hostname-util: fix code comment

2 years agosiphash: minor coding style fixes and modernizations
Lennart Poettering [Tue, 17 Nov 2015 00:08:44 +0000 (01:08 +0100)]
siphash: minor coding style fixes and modernizations

Only cosmetics really, doesn't change any actual logic.

2 years agocalendarspec: sub-second support, v3
Hristo Venev [Mon, 16 Nov 2015 08:15:05 +0000 (10:15 +0200)]
calendarspec: sub-second support, v3

2 years agojournald: allow additional payload in server_driver_message
Zbigniew Jędrzejewski-Szmek [Sun, 8 Nov 2015 19:05:55 +0000 (14:05 -0500)]
journald: allow additional payload in server_driver_message

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.

2 years agotest-tables: ellide boring parts of sparse mappings
Zbigniew Jędrzejewski-Szmek [Mon, 2 Feb 2015 01:24:31 +0000 (20:24 -0500)]
test-tables: ellide boring parts of sparse mappings

2 years agoresolved: add alignment to base64
Zbigniew Jędrzejewski-Szmek [Mon, 4 Aug 2014 22:59:31 +0000 (18:59 -0400)]
resolved: add alignment to base64

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

2 years agoVersion 228.3 Release v228.3
Sven Eden [Wed, 17 May 2017 13:17:03 +0000 (15:17 +0200)]
Version 228.3 Release

2 years agoMerge pull request #12 from Gottox/fix-musl-228.1
Sven Eden [Wed, 17 May 2017 13:15:55 +0000 (15:15 +0200)]
Merge pull request #12 from Gottox/fix-musl-228.1

Merged: 228.1: fix musl

2 years agoVersion 228.2 Release v228.2
Sven Eden [Wed, 17 May 2017 06:02:27 +0000 (08:02 +0200)]
Version 228.2 Release

2 years agoReset pending actions after returning from possible suspend/sleep actions.
Sven Eden [Wed, 17 May 2017 05:56:39 +0000 (07:56 +0200)]
Reset pending actions after returning from possible suspend/sleep actions.

This should fix any "suspension loops".

2 years agofix musl libc build errors
Enno Boland [Tue, 16 May 2017 08:21:17 +0000 (10:21 +0200)]
fix musl libc build errors

2 years agoVersion 228.1 Release v228.1
Sven Eden [Sun, 14 May 2017 08:16:46 +0000 (10:16 +0200)]
Version 228.1 Release

2 years agoMerge pull request #7 from elogind/dev_v228-r1
Sven Eden [Thu, 4 May 2017 11:46:18 +0000 (13:46 +0200)]
Merge pull request #7 from elogind/dev_v228-r1

Candidate for v228.1 release

2 years agoPrep v228: Ignore local Code::Blocks Layout files
Sven Eden [Mon, 24 Apr 2017 08:43:15 +0000 (10:43 +0200)]
Prep v228: Ignore local Code::Blocks Layout files

2 years agoPrep v228: Silence uninitialized usage warnings.
Sven Eden [Thu, 13 Apr 2017 11:47:48 +0000 (13:47 +0200)]
Prep v228: Silence uninitialized usage warnings.

2 years agoPrep v228: Full diff to master revealed more functions that are unused.
Sven Eden [Thu, 13 Apr 2017 05:44:02 +0000 (07:44 +0200)]
Prep v228: Full diff to master revealed more functions that are unused.

2 years agoPrep v228: With most functions split out, clean up the enormous includes list in...
Sven Eden [Thu, 13 Apr 2017 05:43:39 +0000 (07:43 +0200)]
Prep v228: With most functions split out, clean up the enormous includes list in util.c

2 years agoPrep v228: Remove left-over BTRFS bits.
Sven Eden [Thu, 13 Apr 2017 05:42:15 +0000 (07:42 +0200)]
Prep v228: Remove left-over BTRFS bits.

2 years agoPrep v228: Revert d882e06 on Makefile-man.am
Sven Eden [Wed, 12 Apr 2017 13:30:50 +0000 (15:30 +0200)]
Prep v228: Revert d882e06 on Makefile-man.am

2 years agoPrep v228: Condense elogind source masks (5/5)
Sven Eden [Tue, 11 Apr 2017 15:28:25 +0000 (17:28 +0200)]
Prep v228: Condense elogind source masks (5/5)

2 years agoPrep v228: Condense elogind source masks (4/5)
Sven Eden [Tue, 11 Apr 2017 15:28:18 +0000 (17:28 +0200)]
Prep v228: Condense elogind source masks (4/5)

2 years agoPrep v228: Condense elogind source masks (3/5)
Sven Eden [Tue, 11 Apr 2017 15:28:14 +0000 (17:28 +0200)]
Prep v228: Condense elogind source masks (3/5)

2 years agoPrep v228: Condense elogind source masks (2/5)
Sven Eden [Tue, 11 Apr 2017 15:28:10 +0000 (17:28 +0200)]
Prep v228: Condense elogind source masks (2/5)

2 years agoPrep v228: Condense elogind source masks (1/5)
Sven Eden [Tue, 11 Apr 2017 15:26:30 +0000 (17:26 +0200)]
Prep v228: Condense elogind source masks (1/5)

Although having a two line mask like

  /// UNNEEDED by elogind
  #if 0

it is much more easier to read (and patch!) if those two lines were
condense into a one-line mask start like

  #if 0 /// UNNEEDED by elogind

2 years agoPrep v228: Substitute declaration masks (4/4)
Sven Eden [Tue, 11 Apr 2017 15:08:00 +0000 (17:08 +0200)]
Prep v228: Substitute declaration masks (4/4)

2 years agoPrep v228: Substitute declaration masks (3/4)
Sven Eden [Tue, 11 Apr 2017 15:07:51 +0000 (17:07 +0200)]
Prep v228: Substitute declaration masks (3/4)

2 years agoPrep v228: Substitute declaration masks (2/4)
Sven Eden [Tue, 11 Apr 2017 15:07:47 +0000 (17:07 +0200)]
Prep v228: Substitute declaration masks (2/4)

2 years agoPrep v228: Substitute declaration masks (1/4)
Sven Eden [Tue, 11 Apr 2017 15:05:07 +0000 (17:05 +0200)]
Prep v228: Substitute declaration masks (1/4)

Although it looks very ugly, substitute all declaration masks of the
form:

  // UNNEEDED type foo(...);

with:

  /// UNNEEDED by elogind
  #if 0
  type foo(...);
  #endif // 0

to make future merging of upstream pathes easier, as the relevant
lines themselves are not changed any more.

2 years agoPrep v228: Removed EFI bits. elogind can not support EFI at all.
Sven Eden [Mon, 10 Apr 2017 10:06:50 +0000 (12:06 +0200)]
Prep v228: Removed EFI bits. elogind can not support EFI at all.

Rebooting to firmware and such things are official init system stuff.
The added system commands to loginctl like poweroff and reboot are
a convenience, as any user can do it anyway using 'sudo shutdown' and
similar commands.

2 years agoPrep v228: Removed utmp bits. elogind does not support utmp-wtmp.
Sven Eden [Mon, 10 Apr 2017 09:57:04 +0000 (11:57 +0200)]
Prep v228: Removed utmp bits. elogind does not support utmp-wtmp.

2 years agoPrep v228: Update Code::Blocks Project file to dev_v228 branch contents.
Sven Eden [Sun, 9 Apr 2017 12:10:44 +0000 (14:10 +0200)]
Prep v228: Update Code::Blocks Project file to dev_v228 branch contents.

2 years agoPrep v228: src/shared/cgroup-show.[hc] is no longer needed.
Sven Eden [Sat, 8 Apr 2017 12:50:54 +0000 (14:50 +0200)]
Prep v228: src/shared/cgroup-show.[hc] is no longer needed.

2 years agoPrep v228: Clean up the new src/basic/*-util-[hc] files:
Sven Eden [Fri, 7 Apr 2017 07:40:54 +0000 (09:40 +0200)]
Prep v228: Clean up the new src/basic/*-util-[hc] files:

- src/basic/capability-util.[hc]
- src/basic/cgroup-util.[hc]
- src/basic/fd-util.[hc]
- src/basic/fs-util.[hc]
- src/basic/memfd-util.[hc]
- src/basic/path-util.[hc]
- src/basic/socket-util.[hc]
- src/basic/terminal-util.[hc]
- src/basic/user-util.[hc]
- src/basic/xattr-util.[hc]

2 years agoPrep v228: Apply more cosmetic changes found in upstream.
Sven Eden [Thu, 6 Apr 2017 13:07:20 +0000 (15:07 +0200)]
Prep v228: Apply more cosmetic changes found in upstream.

2 years agoPrep v228: Add remaining updates from upstream (3/3)
Sven Eden [Thu, 6 Apr 2017 12:56:03 +0000 (14:56 +0200)]
Prep v228: Add remaining updates from upstream (3/3)

Apply remaining fixes and the performed move of utility functions
into their own foo-util.[hc] files on the rest of elogind.

2 years agoPrep v228: Add remaining updates from upstream (2/3)
Sven Eden [Thu, 6 Apr 2017 12:55:07 +0000 (14:55 +0200)]
Prep v228: Add remaining updates from upstream (2/3)

Apply remaining fixes and the performed move of utility functions
into their own foo-util.[hc] files on libbasic.

2 years agoPrep v228: Add remaining updates from upstream (1/3)
Sven Eden [Thu, 6 Apr 2017 12:52:36 +0000 (14:52 +0200)]
Prep v228: Add remaining updates from upstream (1/3)

The util.[hc] files have been stripped of a lot of functions, that
got sorted into various new files representing the type of
utility.

This commit adds the missing files.

2 years agoPrep v228: Added missing src/basic/unaligned.h from upstream
Sven Eden [Tue, 4 Apr 2017 09:32:42 +0000 (11:32 +0200)]
Prep v228: Added missing src/basic/unaligned.h from upstream

2 years agoPrep v228: Update po/ko.po to upstream version.
Sven Eden [Tue, 4 Apr 2017 08:41:43 +0000 (10:41 +0200)]
Prep v228: Update po/ko.po to upstream version.

2 years agoPrep v228: Update base files to upstream version.
Sven Eden [Tue, 4 Apr 2017 08:58:20 +0000 (10:58 +0200)]
Prep v228: Update base files to upstream version.

2 years agocore: don't generate warnings when write access to the cgroup fs fails in --user...
Lennart Poettering [Mon, 16 Nov 2015 23:01:00 +0000 (00:01 +0100)]
core: don't generate warnings when write access to the cgroup fs fails in --user due to EACCES

After all, in the classic hierarchy that's pretty much the default case.

2 years agotree-wide: add missing includes
Thomas Hindoe Paaboel Andersen [Mon, 16 Nov 2015 19:13:09 +0000 (20:13 +0100)]
tree-wide: add missing includes

Add a few includes that we rely on to be include already.

2 years agologin: ignore JobRemoved of old jobs
David Herrmann [Mon, 16 Nov 2015 14:45:02 +0000 (15:45 +0100)]
login: ignore JobRemoved of old jobs

If we requeue jobs, we are no longer interested in old jobs. Hence, we
better ignore any JobRemoved signals for old jobs and concentrate on our
replacements.

2 years agologin: make sure to replace existing units
David Herrmann [Mon, 16 Nov 2015 14:43:18 +0000 (15:43 +0100)]
login: make sure to replace existing units

When queuing unit jobs, we should rather replace existing units than
fail. This is especially important when we queued a user-shutdown and a
new login is encountered. In this case, we better raplce the shutdown
jobs. elogind takes care of everything else.

2 years agosiphash24: fix memory alignment
Daniel Mack [Mon, 16 Nov 2015 12:08:34 +0000 (13:08 +0100)]
siphash24: fix memory alignment

Use unaligned_read_le64() to access input buffer when reading complete
64-bit words.

This should fix memory traps on platforms with strict aliasing.

2 years agologind: don't assert if the slice is missing
Lennart Poettering [Fri, 13 Nov 2015 17:47:02 +0000 (18:47 +0100)]
logind: don't assert if the slice is missing

After all, we don't actually really need the slice to work, it's just
nice to have it.

2 years agoconf-parser: use extract_first_word
David Reynolds [Tue, 10 Nov 2015 07:45:26 +0000 (23:45 -0800)]
conf-parser: use extract_first_word

2 years agovirt: make sure that we detect unknown container managers as VIRTUALIZATION_CONTAINER...
Lennart Poettering [Mon, 9 Nov 2015 22:47:29 +0000 (23:47 +0100)]
virt: make sure that we detect unknown container managers as VIRTUALIZATION_CONTAINER_OTHER

If we don't know a container manager, we should consider it as "other"
rather than as no container manager at all, to provide a somwhat useful
upgrade path.

2 years agolog: whitespace style fix
Michal Schmidt [Thu, 5 Nov 2015 12:44:03 +0000 (13:44 +0100)]
log: whitespace style fix

2 years agodetect-virt: detect in best-heuristic order
Andrew Jones [Tue, 3 Nov 2015 20:49:38 +0000 (14:49 -0600)]
detect-virt: detect in best-heuristic order

afaict, this will fix a regression caused by commit 75f86906c5.
Where we used to report "kvm" before that patch, without this patch,
we would only report "qemu". The reason is because cpuid detection
must come before dmi detection. Also, both can safely come before
other xen heuristics. Untested.

2 years agodetect-virt: dmi: look for KVM
Andrew Jones [Tue, 3 Nov 2015 19:31:03 +0000 (13:31 -0600)]
detect-virt: dmi: look for KVM

Some guests (ARM, AArch64, x86-RHEL) have 'KVM' in the product name.
Look for that first in order to more precisely report "kvm" when
detecting a QEMU/KVM guest. Without this patch we report "qemu",
even if KVM acceleration is in use on ARM/AArch64 guests.

I've only tested a backported version of this and the previous
patch on an AArch64 guest (which worked). Of course it would be
nice to get regression testing on all guest types that depend on
dmi done.

2 years agoarm/aarch64: detect-virt: check dmi
Andrew Jones [Tue, 3 Nov 2015 18:10:13 +0000 (12:10 -0600)]
arm/aarch64: detect-virt: check dmi

ARM/AArch64 guests now have SMBIOS tables populated (when boot
with a late enough QEMU and a late enough AAVMF is used as the
bootloader). Furthermore, when booting ARM/AArch64 guests with
ACPI, the DT detection obviously no longer works, so we need
dmi detection.

2 years agosd-daemon: explicitly filter out -1 when parsing watchdog timeout
Lennart Poettering [Tue, 3 Nov 2015 11:27:12 +0000 (12:27 +0100)]
sd-daemon: explicitly filter out -1 when parsing watchdog timeout

We already filter out 0, and as -1 is usually special (meaning infinity,
as in USEC_INFINITY) we should better not accept it either. Better safe
than sorry...

2 years agosd-daemon: fix potential LISTEN_FDS overflow in sd_listen_fds()
Vito Caputo [Tue, 3 Nov 2015 07:05:44 +0000 (23:05 -0800)]
sd-daemon: fix potential LISTEN_FDS overflow in sd_listen_fds()

2 years agoman: Drop "internally," which is misleading
David Strauss [Tue, 3 Nov 2015 01:19:26 +0000 (17:19 -0800)]
man: Drop "internally," which is misleading

The existing text misleads readers into thinking how the notify socket protocol is "internals" and that they can only use the functions. However, the socket is part of the Interface Stability Promise. So, we should drop "internally" from the description so the man page both indicates both how the functions work and how one would talk to the socket directly.