platform/upstream/systemd.git
9 years agobuild-sys: Use slim LTO objects if possible
Jan Alexander Steffens (heftig) [Thu, 16 Jul 2015 13:27:57 +0000 (15:27 +0200)]
build-sys: Use slim LTO objects if possible

While 235c6e6 gets LTO builds running again, it goes back to using fat
LTO objects instead of using gcc-{ar,nm,ranlib}. Building these fat
objects takes significantly more time.

Use the suggested solution and look for gcc-{ar,nm,ranlib}, which launch
the binutils tools with the appropriate --plugin parameter. GCC versions
that do not ship these should either default to -ffat-lto-objects or do
not support LTO at all.

On another note, nm from binutils 2.25 seems to be smart enough to load
the LTO plugin when needed without having to specify --plugin.

9 years agoMerge pull request #602 from teg/bitmap-iterator
David Herrmann [Thu, 16 Jul 2015 13:12:26 +0000 (15:12 +0200)]
Merge pull request #602 from teg/bitmap-iterator

bitmap: use external iterator

9 years agosd-bus: properly match ID changes
David Herrmann [Thu, 16 Jul 2015 12:37:08 +0000 (14:37 +0200)]
sd-bus: properly match ID changes

If the caller does not specify arg1 for NameOwnerChanged matches, we
really must take the ID from arg2 or arg3, if provided. They are
guaranteed to be identical to arg1 if either is supplied, but there is no
strict requiredment that arg1 is supplied. Hence, make sure to always
take the more restrictive match. Otherwise, we install rather wide
matches without anyone requiring them.

9 years agosd-bus: destination-matches cannot match NameOwnerChanged
David Herrmann [Thu, 16 Jul 2015 12:35:15 +0000 (14:35 +0200)]
sd-bus: destination-matches cannot match NameOwnerChanged

Make sure we don't install NameOwnerChanged matches if the caller passed
a destination='' match (except if it is the broadcast address). Per spec,
all NameOwnerChanged signals are broadcasts.

Only the NameLost/NameAcquired signals are unicasts, but those are never
received through sd-bus. Instead, the bus-proxy synthesizes them and it
already installs proper matches for them.

9 years agosd-bus: fix invalid stack access on test-bus-marshal
David Herrmann [Thu, 16 Jul 2015 12:57:59 +0000 (14:57 +0200)]
sd-bus: fix invalid stack access on test-bus-marshal

Make sure we actually parse "unsigned long long" if we encode a uint64_t.
Otherwise, we will get random data from the stack.

9 years agobitmap: use external iterator
Tom Gundersen [Thu, 16 Jul 2015 12:06:11 +0000 (14:06 +0200)]
bitmap: use external iterator

Reuse the Iterator object from hashmap.h and expose a similar API.

This allows us to do

{
    Iterator i;
    unsigned n;

    BITMAP_FOREACH(n, b, i) {
        Iterator j;
        unsigned m;

        BITMAP_FOREACH(m, b, j) {
            ...
        }
    }
}

without getting confused. Requested by David.

9 years agosd-bus: fix gvariant structure encoding
David Herrmann [Thu, 16 Jul 2015 09:00:55 +0000 (11:00 +0200)]
sd-bus: fix gvariant structure encoding

In gvariant, all fixed-size objects need to be sized a multiple of their
alignment. If a structure has only fixed-size members, it is required to
be fixed size itself. If you imagine a structure like (ty), you have an
8-byte member followed by an 1-byte member. Hence, the overall inner-size
is 9. The alignment of the object is 8, though. Therefore, the specs
mandates final padding after fixed-size structures, to make sure it's
sized a multiple of its alignment (=> 16).

On the gvariant decoder side, we already account for this in
bus_gvariant_get_size(), as we apply overall padding to the size of the
structure. Therefore, our decoder correctly skips such final padding when
parsing fixed-size structure.

On the gvariant encoder side, however, we don't account for this final
padding. This patch fixes the structure and dict-entry encoders to
properly place such padding at the end of non-uniform fixed-size
structures.

The problem can be easily seen by running:
    $ busctl --user monitor
and
    $ busctl call --user org.freedesktop.systemd1 / org.foobar foobar "(ty)" 777 8

The monitor will fail to parse the message and print an error. With this
patch applied, everything works fine again.

This patch also adds a bunch of test-cases to force non-uniform
structures with non-pre-aligned positions.

Thanks to Jan Alexander Steffens <jan.steffens@gmail.com> for spotting
this and narrowing it down to non-uniform gvariant structures. Fixes #597.

9 years agoMerge pull request #588 from teg/resolved-nsec
Daniel Mack [Wed, 15 Jul 2015 21:27:35 +0000 (17:27 -0400)]
Merge pull request #588 from teg/resolved-nsec

resolved: add basic NSEC and NSEC3 support

9 years agobuild: add convenience target 'build-sources'
David Herrmann [Wed, 15 Jul 2015 13:36:54 +0000 (15:36 +0200)]
build: add convenience target 'build-sources'

This target allows to trigger a build of $(BUILT_SOURCES) manually. This
is handy if you tend to use 'make systemd-foobar' to directly build a
single binary. Those do not pull in $(BUILT_SOURCES), unfortunately. See
automake docs for that.

9 years agosd-bus: fix object tree to be deeper than 2 levels
David Herrmann [Wed, 15 Jul 2015 12:35:15 +0000 (14:35 +0200)]
sd-bus: fix object tree to be deeper than 2 levels

So right now our object-tree is limited to 2 levels at most
('/' and '/foo/...../bar'). We never link any intermediate levels, even
though that was clearly the plan. Fix the bus_node_allocate() helper to
actually link all intermediate nodes, too, not just the root node.

This fixes a simple inverse ptr-diff bug.

The downside of this fix is that we clearly never tested (nor used) the
object tree in any way. The only reason that the introspection works is
that our enumerators shortcut the object tree.

Lets see whether that code actually works..

Thanks to: Nathaniel McCallum <nathaniel@themccallums.org>
..for reporting this. See #524 for an actual example code.

9 years agosd-device: never return NULL+0
David Herrmann [Wed, 15 Jul 2015 10:30:08 +0000 (12:30 +0200)]
sd-device: never return NULL+0

It is highly confusing if a getter function returns 0, but the value is
set to NULL. This, right now, triggers assertions as code relies on the
returned values to be non-NULL.

Like with sd-bus-creds and friends, return 0 only if a value is actually
available.

Discussed with Tom, and actually fixes real bugs as in #512.

9 years agosd-boot: ignore missing /etc/machine-id
David Herrmann [Wed, 15 Jul 2015 09:58:03 +0000 (11:58 +0200)]
sd-boot: ignore missing /etc/machine-id

If /etc/machine-id is missing (eg., gold images), we should not fail
installing sd-boot. This is a perfectly fine use-case and we should simply
skip installing the default loader config in that case.

9 years agoresolved: rr - add NSEC3 support
Tom Gundersen [Sun, 12 Jul 2015 23:51:03 +0000 (01:51 +0200)]
resolved: rr - add NSEC3 support

Needed for DNSSEC.

9 years agobasic: util - add base32hexmem() function similar to hexmem()
Tom Gundersen [Fri, 10 Jul 2015 12:38:19 +0000 (14:38 +0200)]
basic: util - add base32hexmem() function similar to hexmem()

This implements more of RFC4648.

9 years agoMerge pull request #587 from teg/unbase64mem-memleak
Daniel Mack [Tue, 14 Jul 2015 20:10:11 +0000 (16:10 -0400)]
Merge pull request #587 from teg/unbase64mem-memleak

basic: util - fix memleak on error in unbase64mem()

9 years agoresolved: rr - add NSEC support
Tom Gundersen [Sun, 12 Jul 2015 23:51:03 +0000 (01:51 +0200)]
resolved: rr - add NSEC support

Needed for DNSSEC.

9 years agobasic: add a Bitmap implementation
Tom Gundersen [Mon, 13 Jul 2015 17:47:26 +0000 (19:47 +0200)]
basic: add a Bitmap implementation

For when a Hashmap is overkill.

9 years agobasic: util - fix memleak on error in unbase64mem()
Tom Gundersen [Tue, 14 Jul 2015 19:14:45 +0000 (21:14 +0200)]
basic: util - fix memleak on error in unbase64mem()

9 years agoMerge pull request #538 from mischief/multiple-routers
Tom Gundersen [Tue, 14 Jul 2015 18:17:11 +0000 (20:17 +0200)]
Merge pull request #538 from mischief/multiple-routers

sd-dhcp-lease: fix handling of multiple routers

We only support one router, but in case more than one is given, we now ignore subsequent ones, rather than fall over.

9 years agoMerge pull request #586 from teg/resolved-rrs-3
Daniel Mack [Tue, 14 Jul 2015 17:43:18 +0000 (13:43 -0400)]
Merge pull request #586 from teg/resolved-rrs-3

resolved: minor improvements to RR handling

9 years agoresolved: improve printing of unknown RRs
Tom Gundersen [Tue, 14 Jul 2015 02:32:29 +0000 (04:32 +0200)]
resolved: improve printing of unknown RRs

This implements the recommendations from RFC3597.

9 years agoMerge pull request #585 from teg/resolved-harden-2
Daniel Mack [Tue, 14 Jul 2015 17:26:16 +0000 (13:26 -0400)]
Merge pull request #585 from teg/resolved-harden-2

resolved: harden

9 years agoMerge commit 'refs/pull/436/head' of https://github.com/systemd/systemd
David Herrmann [Tue, 14 Jul 2015 17:19:39 +0000 (19:19 +0200)]
Merge commit 'refs/pull/436/head' of https://github.com/systemd/systemd

This merges:
  sd-netlink: respect attribute type flags

..fixing a conflict due to a typo fix.

9 years agoresolved: rr - add DS support
Tom Gundersen [Sun, 12 Jul 2015 23:51:03 +0000 (01:51 +0200)]
resolved: rr - add DS support

Needed for DNSSEC.

9 years agoresolved: rr - print formated timestamps in RRSIG
Tom Gundersen [Sun, 12 Jul 2015 22:58:00 +0000 (00:58 +0200)]
resolved: rr - print formated timestamps in RRSIG

9 years agoresolved: use one UDP socket per transaction
Tom Gundersen [Thu, 9 Jul 2015 12:19:55 +0000 (14:19 +0200)]
resolved: use one UDP socket per transaction

We used to have one global socket, use one per transaction instead. This
has the side-effect of giving us a random UDP port per transaction, and
hence increasing the entropy and making cache poisoining significantly
harder to achieve.

We still reuse the same port number for packets belonging to the same
transaction (resent packets).

9 years agoresolved: implement RFC5452
Tom Gundersen [Thu, 9 Jul 2015 00:58:15 +0000 (02:58 +0200)]
resolved: implement RFC5452

This improves the resilience against cache poisoning by being stricter
about only accepting responses that match precisely the requst they
are in reply to.

It should be noted that we still only use one port (which is picked
at random), rather than one port for each transaction. Port
randomization would improve things further, but is not required by
the RFC.

9 years agoresolved: pin the server used in a transaction
Tom Gundersen [Wed, 24 Jun 2015 16:54:12 +0000 (18:54 +0200)]
resolved: pin the server used in a transaction

We want to discover information about the server and use that in when crafting
packets to be resent.

9 years agoMerge pull request #530 from dvdhrm/resolve-host-dbus
Daniel Mack [Tue, 14 Jul 2015 16:41:29 +0000 (12:41 -0400)]
Merge pull request #530 from dvdhrm/resolve-host-dbus

resolve-host: enable dbus-activation

9 years agoMerge pull request #579 from ssahani/tap-vnet-hdr
Daniel Mack [Tue, 14 Jul 2015 16:03:45 +0000 (12:03 -0400)]
Merge pull request #579 from ssahani/tap-vnet-hdr

networkd: tap add support for vnet_hdr

9 years agoman: add man for tap vnet_hdr
Susant Sahani [Tue, 14 Jul 2015 15:18:09 +0000 (20:48 +0530)]
man:  add man for tap vnet_hdr

9 years agoresolved: reference count the dns servers
Tom Gundersen [Wed, 24 Jun 2015 16:41:46 +0000 (18:41 +0200)]
resolved: reference count the dns servers

We want to reference the servers from their active transactions, so make sure
they stay around as long as the transaction does.

9 years agoresolved: packet - ensure there is space for IP+UDP headers
Tom Gundersen [Wed, 24 Jun 2015 19:22:46 +0000 (21:22 +0200)]
resolved: packet - ensure there is space for IP+UDP headers

Currently we only make sure our links can handle the size of the payload witohut
taking the headers into account.

9 years agonetworkd: tap add support for vnet_hdr
Susant Sahani [Tue, 14 Jul 2015 08:25:52 +0000 (13:55 +0530)]
networkd: tap add support for vnet_hdr

 This patch adds support to configure IFF_VNET_HDR flag
for a tap device. It allows whether sending and receiving
large pass larger (GSO) packets. This greatly increases the
achievable throughput.

9 years agoresolved: rr - print DNSKEY and RRSIG in base64
Tom Gundersen [Sun, 12 Jul 2015 22:21:50 +0000 (00:21 +0200)]
resolved: rr - print DNSKEY and RRSIG in base64

As mandated by RFC4034.

9 years agoMerge pull request #576 from zonque/resolved-cleanups
Tom Gundersen [Mon, 13 Jul 2015 17:30:30 +0000 (19:30 +0200)]
Merge pull request #576 from zonque/resolved-cleanups

resolved: assorted cleanups

9 years agoresolved: make LLMNR checks conditional
Daniel Mack [Sat, 11 Jul 2015 16:37:17 +0000 (12:37 -0400)]
resolved: make LLMNR checks conditional

Make all LLMNR related packet inspections conditional to p->protocol.
Use switch-case statements while at it, which will make future additions
more readable.

9 years agoresolved: separate LLMNR specific header bits
Daniel Mack [Sat, 11 Jul 2015 00:35:16 +0000 (20:35 -0400)]
resolved: separate LLMNR specific header bits

The C and T bits in the DNS packet header definitions are specific to LLMNR.
In regular DNS, they are called AA and RD instead. Reflect that by calling
the macros accordingly, and alias LLMNR specific macros.

While at it, define RA, AD and CD getters as well.

9 years agoresolved: use a #define for LLMNR port
Daniel Mack [Fri, 10 Jul 2015 19:28:09 +0000 (15:28 -0400)]
resolved: use a #define for LLMNR port

De-duplicate some magic numbers.

9 years agoresolved: move LLMNR related functions into separate file
Daniel Mack [Fri, 10 Jul 2015 19:02:38 +0000 (15:02 -0400)]
resolved: move LLMNR related functions into separate file

9 years agoMerge pull request #573 from cmacq2/html-man-fixes
Daniel Mack [Mon, 13 Jul 2015 14:46:26 +0000 (10:46 -0400)]
Merge pull request #573 from cmacq2/html-man-fixes

Reproducible ID/name values for auto generated anchors in HTML output

9 years agodoc: configure docbook stylesheet to generate reproducible IDs
Johan Ouwerkerk [Mon, 13 Jul 2015 08:39:09 +0000 (10:39 +0200)]
doc: configure docbook stylesheet to generate reproducible IDs

This makes auto generated anchor tags in HTML output reproducible.

9 years agodhcp: add support for vendor specific DHCP option
Beniamino Galvani [Thu, 9 Jul 2015 16:04:01 +0000 (18:04 +0200)]
dhcp: add support for vendor specific DHCP option

This adds support for option 43 (Vendor Specific Information) to
libsystemd-network DHCP code. The option carries an opaque object of n
octets, interpreted by vendor-specific code on the clients and
servers.

[@zonque: adopted to new unhexmem() API]

9 years agoMerge pull request #566 from teg/util-base64-2
Daniel Mack [Sun, 12 Jul 2015 18:10:39 +0000 (14:10 -0400)]
Merge pull request #566 from teg/util-base64-2

util: add base64 handling

9 years agobasic: util - add base64mem() function similar to hexmem()
Tom Gundersen [Fri, 10 Jul 2015 12:38:19 +0000 (14:38 +0200)]
basic: util - add base64mem() function similar to hexmem()

This implements RFC4648 for a slightly more compact representation of
binary data compared to hex (6 bits per character rather than 4).

9 years agobasic: util - fix errorhandling in unhexmem()
Tom Gundersen [Sat, 11 Jul 2015 17:14:52 +0000 (19:14 +0200)]
basic: util - fix errorhandling in unhexmem()

We were ignoring failures from unhexchar, which meant that invalid
hex characters were being turned into garbage rather than the string
rejected.

Fix this by making unhexmem return an error code, also change the API
slightly, to return the size of the returned memory, reflecting the
fact that the memory is a binary blob,and not a string.

For convenience, still append a trailing NULL byte to the returned
memory (not included in the returned size), allowing callers to
treat it as a string without doing a second copy.

9 years agoMerge pull request #561 from cmacq2/html-man-fixes
Daniel Mack [Sun, 12 Jul 2015 15:33:27 +0000 (11:33 -0400)]
Merge pull request #561 from cmacq2/html-man-fixes

Html man fixes

9 years agoMerge pull request #558 from poettering/logind-bus-policy
Tom Gundersen [Sun, 12 Jul 2015 09:44:45 +0000 (11:44 +0200)]
Merge pull request #558 from poettering/logind-bus-policy

logind: bring bus policy up-to-date

9 years agoMerge pull request #556 from poettering/sd-bus-life-cycle
Tom Gundersen [Sun, 12 Jul 2015 09:44:14 +0000 (11:44 +0200)]
Merge pull request #556 from poettering/sd-bus-life-cycle

man: go further into details regarding life-cycle of default bus conn…

9 years agoMerge pull request #554 from poettering/ntp-pool
Tom Gundersen [Sun, 12 Jul 2015 09:43:51 +0000 (11:43 +0200)]
Merge pull request #554 from poettering/ntp-pool

build-sys: warn if people don't change the default NTP servers when b…

9 years agoMerge pull request #553 from poettering/rt-group-sched
Tom Gundersen [Sun, 12 Jul 2015 09:43:10 +0000 (11:43 +0200)]
Merge pull request #553 from poettering/rt-group-sched

README: document that RT group sched should be turned off

9 years agoUse a top-to-bottom numbering scheme for generating ids of subheadings and terms.
Johan Ouwerkerk [Sun, 12 Jul 2015 01:07:24 +0000 (03:07 +0200)]
Use a top-to-bottom numbering scheme for generating ids of subheadings and terms.
This scheme fixes permalinks to distinguish between items that would previously have the same ID attribute.

Where possible the generated ID values are the same as those generated with the previous versions of the stylesheet
to retain backwards compatibility with published links.

As a side effect of the changes xsltproc should no longer complain about duplicate IDs during build.

9 years agosd-dhcp-lease: fix handling of multiple routers
Nick Owens [Thu, 9 Jul 2015 19:51:55 +0000 (12:51 -0700)]
sd-dhcp-lease: fix handling of multiple routers

currently if a dhcp server sends more than one router, sd-dhcp-lease
does not copy the ip because it assumes it will only ever be 4 bytes. a
dhcp server could send more than one ip in the router list, so we should
copy the first one and ignore the rest of the bytes.

9 years agoMerge pull request #559 from poettering/logind-osindications-missing
Lennart Poettering [Sat, 11 Jul 2015 22:32:58 +0000 (19:32 -0300)]
Merge pull request #559 from poettering/logind-osindications-missing

logind: some firmware implementations remove OsIndications if it is u…

9 years agologind: some firmware implementations remove OsIndications if it is unset
Lennart Poettering [Sat, 11 Jul 2015 20:29:48 +0000 (17:29 -0300)]
logind: some firmware implementations remove OsIndications if it is unset

We shouldn't fall over that, and just assume it is 0 in this case.

Fixes #499.

9 years agologind: bring bus policy up-to-date
Lennart Poettering [Sat, 11 Jul 2015 20:00:26 +0000 (17:00 -0300)]
logind: bring bus policy up-to-date

A while back we opened up all of logind's bus calls to unprivileged
users, via PK. However, the dbus1 policy wasn't updated accordingly.

With this change, the dbus1 policy is opened up for all bus calls that
should be available to unprivileged clients.

(also rearranges some calls in the vtable, to make more sense, and be in
line with the order in the bus policy file)

Fixes #471.

9 years agoman: go further into details regarding life-cycle of default bus connection objects
Lennart Poettering [Sat, 11 Jul 2015 19:11:45 +0000 (16:11 -0300)]
man: go further into details regarding life-cycle of default bus connection objects

This extends on PR #542.

9 years agoREADME: document that RT group sched should be turned off
Lennart Poettering [Sat, 11 Jul 2015 17:18:35 +0000 (14:18 -0300)]
README: document that RT group sched should be turned off

https://bugs.freedesktop.org/show_bug.cgi?id=87570
https://bugzilla.redhat.com/show_bug.cgi?id=1229700

9 years agoMerge pull request #551 from poettering/fopen-temporary-noerrno
Daniel Mack [Sat, 11 Jul 2015 17:35:50 +0000 (13:35 -0400)]
Merge pull request #551 from poettering/fopen-temporary-noerrno

util: make sure we don't clobber errno in error path

9 years agoMerge pull request #552 from poettering/path-is-mount-point-simplification
Daniel Mack [Sat, 11 Jul 2015 17:35:24 +0000 (13:35 -0400)]
Merge pull request #552 from poettering/path-is-mount-point-simplification

basic: simplify path_is_mount_point() a bit

9 years agobuild-sys: warn if people don't change the default NTP servers when building systemd
Lennart Poettering [Sat, 11 Jul 2015 17:16:40 +0000 (14:16 -0300)]
build-sys: warn if people don't change the default NTP servers when building systemd

Also, explain the situation in the docs.

Relates to #437

9 years agobasic: simplify path_is_mount_point() a bit
Lennart Poettering [Sat, 11 Jul 2015 17:20:38 +0000 (14:20 -0300)]
basic: simplify path_is_mount_point() a bit

This removes two uses of the ternary operator.

9 years agoutil: make sure we don't clobber errno in error path
Lennart Poettering [Sat, 11 Jul 2015 17:19:36 +0000 (14:19 -0300)]
util: make sure we don't clobber errno in error path

9 years agoMerge pull request #535 from martinpitt/master
Lennart Poettering [Sat, 11 Jul 2015 15:17:39 +0000 (12:17 -0300)]
Merge pull request #535 from martinpitt/master

units: emergency.service: wait for plymouth to shut down

9 years agoMerge pull request #548 from vcaputo/fix_path_state_debug_msg
Daniel Mack [Sat, 11 Jul 2015 00:42:32 +0000 (20:42 -0400)]
Merge pull request #548 from vcaputo/fix_path_state_debug_msg

core: include unit in path state transition debug logging.

9 years agocore: include unit in path state transition debug logging.
Vito Caputo [Fri, 10 Jul 2015 23:40:46 +0000 (16:40 -0700)]
core: include unit in path state transition debug logging.

9 years agoMerge pull request #542 from utezduyar/sd_unref-might-keep-bus-alive
Daniel Mack [Fri, 10 Jul 2015 15:23:18 +0000 (11:23 -0400)]
Merge pull request #542 from utezduyar/sd_unref-might-keep-bus-alive

man: sd_unref does not necessarily free the bus

9 years agologind: rename 'pos' to 'position'
David Herrmann [Fri, 10 Jul 2015 13:08:24 +0000 (15:08 +0200)]
logind: rename 'pos' to 'position'

Spell out the proper name. Use 'pos' over 'position', and also update the
logind state file to do the same. Note that this breaks live updates.
However, we only save 'POSITION' on non-seat0, so this shouldn't bother
anyone for real. If you run multi-seat setups, you better restart a
machine on updates, anyway.

9 years agologind: allow greeters to take over VTs
David Herrmann [Fri, 10 Jul 2015 12:53:08 +0000 (14:53 +0200)]
logind: allow greeters to take over VTs

Make sure a greeter can forcefully spawn a session on a VT that is
in-use. A recent patch prevented this (this used to be possible for all
session types) as it is highly fragile. However, as it turns out,
greeters seem to rely on that feature. Therefore, make sure we allow it
explicitly for greeters.

9 years agoman: sd_unref does not necessarily free the bus
Umut Tezduyar Lindskog [Fri, 10 Jul 2015 12:31:53 +0000 (14:31 +0200)]
man: sd_unref does not necessarily free the bus

Document that sd_unref() does not necessarily free the bus,
even if no part of the program explicitly refs it, due to
the queued messages.

9 years agounits: emergency.service: wait for plymouth to shut down
Martin Pitt [Thu, 9 Jul 2015 14:25:00 +0000 (16:25 +0200)]
units: emergency.service: wait for plymouth to shut down

Merely calling "plymouth quit" isn't sufficient, as plymouth needs some time to
shut down. This needs plymouth --wait (which is a no-op when it's not running).

Fixes invisible emergency shell with plymouth running endlessly.

https://launchpad.net/bugs/1471258

9 years agoMerge pull request #531 from dvdhrm/boot-buildid
Lennart Poettering [Thu, 9 Jul 2015 14:50:03 +0000 (11:50 -0300)]
Merge pull request #531 from dvdhrm/boot-buildid

boot: use BUILD_ID if VERSION_ID is not available

9 years agoMerge pull request #532 from dvdhrm/bus-managed-root
Lennart Poettering [Thu, 9 Jul 2015 14:47:55 +0000 (11:47 -0300)]
Merge pull request #532 from dvdhrm/bus-managed-root

sd-bus: include queried path in GetManagedObjects

9 years agobasic/util.c fopen_temporary(): close fd if failed
cee1 [Thu, 9 Jul 2015 05:52:16 +0000 (13:52 +0800)]
basic/util.c fopen_temporary(): close fd if failed

9 years agoMerge pull request #529 from dvdhrm/bus-slot-description
Lennart Poettering [Thu, 9 Jul 2015 14:38:11 +0000 (11:38 -0300)]
Merge pull request #529 from dvdhrm/bus-slot-description

sd-bus: sd_bus_slot_get_description() should return const strings

9 years agoMerge pull request #426 from tblume/reload-system-conf-at-daemon-reload
Daniel Mack [Thu, 9 Jul 2015 14:01:06 +0000 (10:01 -0400)]
Merge pull request #426 from tblume/reload-system-conf-at-daemon-reload

Reload manager defaults at daemon-reload

9 years agosd-bus: include queried path in GetManagedObjects
David Herrmann [Thu, 9 Jul 2015 11:27:57 +0000 (13:27 +0200)]
sd-bus: include queried path in GetManagedObjects

If GetManagedObjects is called on /foo/bar, then it should also include
the object /foo/bar, if it exists. Right now, we only include objects
underneath /foo/bar/.

This follows the behavior of existing dbus implementations.

Obsoletes #527 and fixes #525. Reported by: Nathaniel McCallum

9 years agoboot: use BUILD_ID if VERSION_ID is not present
David Herrmann [Thu, 9 Jul 2015 11:04:58 +0000 (13:04 +0200)]
boot: use BUILD_ID if VERSION_ID is not present

According to os-release(5), VERSION_ID is not mandatory and BUILD_ID only
needs to be unique underneath VERSION_ID. Therefore, assuming a missing
VERSION_ID field means 'empty', we can rely on BUILD_ID to be unique.

Use BUILD_ID if VERSION_ID is not present. This way, rolling-release
distros can still provide a proper os-release entry without crafting
random VERSION_ID strings.

This fixes #186.

9 years agoboot: fix memleaks in os-release parser
David Herrmann [Thu, 9 Jul 2015 11:02:54 +0000 (13:02 +0200)]
boot: fix memleaks in os-release parser

There is no guarantee that the os-release section contains each key only
once, nor any guarantee that all keys are present. Make sure we properly
free memory in both cases.

Not that it matters much, as we're short-living, anyway. But correct code
is always nicer to read..

9 years agoresolve-host: enable dbus-activation
David Herrmann [Thu, 9 Jul 2015 09:37:26 +0000 (11:37 +0200)]
resolve-host: enable dbus-activation

Right now, systemd-resolve-host fails if resolved is not running.
However, resolved supports bus-activation (at least on kdbus) just fine.
Enable this so we can use resolve-host at all times.

This was disabled right from the beginning, without any comment why.

9 years agosd-bus: sd_bus_slot_get_description() should return const strings
David Herrmann [Thu, 9 Jul 2015 08:40:41 +0000 (10:40 +0200)]
sd-bus: sd_bus_slot_get_description() should return const strings

All other *_get_description() functions use 'const char**', so make sure
sd_bus_slot_get_description() does the same.

This changes API, but ABI stays stable. I think this is fine, but I
wouldn't mind bumping SONAME.

Reported in #528.

9 years agoReload manager defaults at daemon-reload
Thomas Blume [Mon, 29 Jun 2015 09:26:27 +0000 (11:26 +0200)]
Reload manager defaults at daemon-reload

"systemctl daemon-reload" should also update the manager defaults from
/etc/systemd/system.conf.
For details, see:
http://lists.freedesktop.org/archives/systemd-devel/2015-June/033062.html

Amended to use  manager_set_defaults() as common function.

9 years agoMerge pull request #526 from phomes/master
Lennart Poettering [Wed, 8 Jul 2015 22:00:18 +0000 (19:00 -0300)]
Merge pull request #526 from phomes/master

machine: remove unused variables

9 years agomachine: remove unused variables
Thomas Hindoe Paaboel Andersen [Wed, 8 Jul 2015 21:45:49 +0000 (23:45 +0200)]
machine: remove unused variables

9 years agoMerge pull request #522 from mbiebl/no-install-readme-md
Lennart Poettering [Wed, 8 Jul 2015 20:37:06 +0000 (17:37 -0300)]
Merge pull request #522 from mbiebl/no-install-readme-md

build-sys: Do not install README.md as end-user documentation

9 years agobuild-sys: Do not install README.md as end-user documentation
Michael Biebl [Wed, 8 Jul 2015 20:27:27 +0000 (22:27 +0200)]
build-sys: Do not install README.md as end-user documentation

This file is mostly GitHub glue and not particularly useful to
end-users. So only add it to the dist tarball but do not install it as
documentation.

9 years agoMerge pull request #516 from utezduyar/consistent-get-callback-return
Lennart Poettering [Wed, 8 Jul 2015 20:24:20 +0000 (17:24 -0300)]
Merge pull request #516 from utezduyar/consistent-get-callback-return

property callback returns are consistent

9 years agoMerge pull request #500 from zonque/fileio
Lennart Poettering [Wed, 8 Jul 2015 20:13:53 +0000 (17:13 -0300)]
Merge pull request #500 from zonque/fileio

fileio: consolidate write_string_file*()

9 years agoMerge pull request #520 from zonque/pr-384-rework
Lennart Poettering [Wed, 8 Jul 2015 19:50:48 +0000 (16:50 -0300)]
Merge pull request #520 from zonque/pr-384-rework

man-pages: PR 384 rework

9 years agoman: minor updates to the sd_bus_request_name() documentation
Lennart Poettering [Tue, 23 Jun 2015 19:41:15 +0000 (21:41 +0200)]
man: minor updates to the sd_bus_request_name() documentation

9 years agoman: document user slice sd-login calls we added a while back
Lennart Poettering [Tue, 23 Jun 2015 19:22:56 +0000 (21:22 +0200)]
man: document user slice sd-login calls we added a while back

9 years agoman: fix sd_bus_negotiate_timestamps documentation link-up
Lennart Poettering [Tue, 23 Jun 2015 18:44:15 +0000 (20:44 +0200)]
man: fix sd_bus_negotiate_timestamps documentation link-up

9 years agoman: fully document sd_bus_creds subsystem
Lennart Poettering [Tue, 23 Jun 2015 18:42:57 +0000 (20:42 +0200)]
man: fully document sd_bus_creds subsystem

[@zonque: typo fixed, reported by @ronnychevalier]

9 years agoman: fully document sd-bus' error APIs
Lennart Poettering [Tue, 23 Jun 2015 17:37:28 +0000 (19:37 +0200)]
man: fully document sd-bus' error APIs

[@zonque: Some minor nits fixed as pointed out by @ronnychevalier,
 dropped class='sd-bus-errors' to fix python logic]

9 years agoMerge pull request #519 from poettering/man-bus-message-append
Daniel Mack [Wed, 8 Jul 2015 16:17:47 +0000 (12:17 -0400)]
Merge pull request #519 from poettering/man-bus-message-append

man: update and extend the various sd_bus_message_append_*() man pages

9 years agoMerge pull request #514 from teg/resolved-rrsig-marshal
Lennart Poettering [Wed, 8 Jul 2015 16:00:20 +0000 (13:00 -0300)]
Merge pull request #514 from teg/resolved-rrsig-marshal

resolved: fix marshalling of RRSIG records

9 years agoMerge pull request #515 from xnox/no-dot-files
Lennart Poettering [Wed, 8 Jul 2015 15:46:49 +0000 (12:46 -0300)]
Merge pull request #515 from xnox/no-dot-files

automake: Do not install developer files on end-user systems.

9 years agoMerge pull request #510 from zonque/journal-gatewayd
Tom Gundersen [Wed, 8 Jul 2015 14:16:44 +0000 (16:16 +0200)]
Merge pull request #510 from zonque/journal-gatewayd

journal-gatewayd: fix tmpfile logic

9 years agoMerge pull request #501 from keszybz/remove-python-systemd
Daniel Mack [Wed, 8 Jul 2015 13:38:38 +0000 (09:38 -0400)]
Merge pull request #501 from keszybz/remove-python-systemd

Remove python-systemd

9 years agoproperty callback returns are consistent
Umut Tezduyar Lindskog [Wed, 8 Jul 2015 12:35:32 +0000 (14:35 +0200)]
property callback returns are consistent

It is no different to return 0 over 1 in the property
callback. It is confusing to return 1 which made me think
1 has a special purpose. This way code is consistent with
the rest of the tree.