1
0
mirror of https://github.com/systemd/systemd.git synced 2024-11-02 19:21:53 +03:00
Commit Graph

25096 Commits

Author SHA1 Message Date
Zbigniew Jędrzejewski-Szmek
c11bda1e3c systemctl: fix style to avoid modification of array passed by caller
Followup for 4524439edb.
2016-02-15 19:06:53 -05:00
Lennart Poettering
6043679c6e Merge pull request #2628 from benjarobin/fix-pull-req-2611
time-util: Rename and fix call of deserialize_timestamp_value()
2016-02-16 00:05:20 +01:00
Benjamin Robin
b895a7353b time-util: Rename and fix call of deserialize_timestamp_value()
The deserialize_timestamp_value() is renamed timestamp_deserialize() to be more
consistent with dual_timestamp_deserialize()
And add the NULL check back on realtime and monotonic
2016-02-15 23:26:34 +01:00
Lennart Poettering
a6b8530aec Merge pull request #2622 from keszybz/systemctl-m-h
systemctl: include -M or -H arguments in the hint
2016-02-15 23:07:24 +01:00
Zbigniew Jędrzejewski-Szmek
4524439edb systemctl: include -M or -H arguments in the hint
https://github.com/systemd/systemd/issues/2431

Some newlines are added, but the output will still exceed 80 columns in many
cases. The fallback for oom conditions is changed from "n/a" to something
"<service>", and a similar pattern is used for the new code. This way we
have a realistic fallback for oom, which seems nicer than making the whole
function return an error code which would then have to be propagated.

$ systemctl -M fedora-rawhide restart systemd-networkd.service
Job for systemd-networkd.service failed because start of the service was attempted too often.
See "systemctl -M fedora-rawhide status systemd-networkd.service" and "journalctl -M fedora-rawhide -xe" for details.
To force a start use "systemctl -M fedora-rawhide reset-failed systemd-networkd.service"
followed by "systemctl -M fedora-rawhide start systemd-networkd.service" again.
2016-02-15 15:23:45 -05:00
Lennart Poettering
11ab173d40 Merge pull request #2611 from 0xAX/deserialize-clkid
time-util: introduce deserialize_timestamp_value()
2016-02-15 20:29:59 +01:00
Alexander Kuleshov
d4c6cc937c logind: use deserialize_timestamp_value()
which is introduced in the ebf30a086d commit.
2016-02-16 00:04:49 +06:00
Alexander Kuleshov
8e1afa0a5d machine: use deserialize_timestamp_value()
which is introduced in the ebf30a086d commit.
2016-02-16 00:04:09 +06:00
Alexander Kuleshov
ebf30a086d time-util: introduce deserialize_timestamp_value()
The time-util.c provides dual_timestamp_deserialize() function to
convert value to usec_t and set it as value of ts->monotonic and
ts->realtime.

There are some places in code which do the same but only for one
clockid_t (realtime or monotonic), when dual_timestamp_deserialize()
sets value of both.

This patch introduces the deserialize_timestamp_value() which converts
 a given value to usec_t and write it to a given timestamp.
2016-02-16 00:01:44 +06:00
Daniel Mack
251b4cb6a2 Merge pull request #2620 from bengal/assert-sd-event-now
dhcp: assert the success of sd_event_now()
2016-02-15 16:50:55 +01:00
Beniamino Galvani
8ecdcb5525 dhcp: assert the success of sd_event_now()
The function must never fail.
2016-02-15 16:20:55 +01:00
Lennart Poettering
8eff97a103 Merge pull request #2618 from zonque/busproxy-removal
remove bus-proxyd
2016-02-15 14:54:09 +01:00
Lennart Poettering
4d5d9d0011 Merge pull request #2596 from keszybz/move-activate-to-bin
Move activate to bin, extend --fdnames functionality
2016-02-15 14:08:28 +01:00
Daniel Mack
3aa3d5d412 Merge pull request #2617 from rabinv/master
missing.h: define IFLA_EXT_MASK
2016-02-15 11:11:19 +01:00
Rabin Vincent
bacef2a229 missing.h: define IFLA_EXT_MASK
We already define IFLA_PROMISCUITY and some other of these masks in
order to allow building with older headers.  Define IFLA_EXT_MASK too,
which was added in the same kernel version as IFLA_PROMISCUITY (v3.10).
2016-02-15 07:39:23 +01:00
Zbigniew Jędrzejewski-Szmek
7f6e804332 Promote systemd-activate to /usr/bin/systemd-socket-activate
It has fairly wide functionality now and the interface has been
stable for a while. It it a useful testing tool.

The name is changed to better indicate what it does.
2016-02-14 20:33:32 -05:00
Zbigniew Jędrzejewski-Szmek
63408cb4f3 Merge pull request #2608 from poettering/resolved-prop-fix
bus property name fix in resolved
2016-02-13 16:48:03 -05:00
Zbigniew Jędrzejewski-Szmek
162149d6d9 Merge pull request #2609 from 0xAX/service-dual-timestamp-serialization
service: remove unnecessary check that dual_timestamp is set
2016-02-13 16:38:58 -05:00
Lennart Poettering
317f2fc9e7 busctl: when formatting message contents, make sure to print all whitespaces
Previously we'd miss a necessary whitespace at the end of arrays, if more data
was following.
2016-02-13 20:33:49 +01:00
Lennart Poettering
c3be369faa resolved: extend ResolveHostname() bus call so that it can parse IP addresses
If the hostname passed to ResolveHostname() is actually an IP address that is
correctly formatted as string parse it as such, avoid any DNS traffic and
return the data in parsed form.

This is useful for clients which can simply call the bus function now without
caring about the precise formatting of specified hostnames. This mimics
getaddrinfo()'s behaviour with the AI_NUMERICHOST flag set.

Note that this logic is only implemented for ResolveHostname(), but not for
calls such as ResolveRecord(), for which only DNS domain names may be used as
input.

The "authenticated" flag is set for look-ups of this type, after all no
untrusted network traffic is involved.
2016-02-13 20:33:49 +01:00
Lennart Poettering
ee116b54a3 resolved: rename "SearchDomains" property in the Manager interface to "Domains"
Another property name fuck-up. The property contains both search and routing
domains and hence should be exposed as "Domains" rather than "SearchDomains".

The counterpart in the Link object was correctly named, and the
SetLinkDomains() and SetDomains() setter calls too, hence let's get this right,
too.

(Yepp, a minor API break actually, but given that this was so far not
documented, and only 3 days public let's fix this now)
2016-02-13 20:33:49 +01:00
Lennart Poettering
12e1893af3 resolved: fix definition of SD_RESOLVED_FLAGS_MAKE 2016-02-13 20:33:49 +01:00
Lennart Poettering
0a90fe9648 resolved: drop references to two bus error codes no longer used 2016-02-13 20:33:49 +01:00
Lennart Poettering
c834959498 update TODO 2016-02-13 20:33:49 +01:00
Alexander Kuleshov
36b693a6a9 service: remove unnecessary check
We call dual_timestamp_serialize() only if the s->watchdog_timestamp is
set. But the dual_timestamp_serialize() already checks a given dual
timestamp by the call of the dual_timestamp_is_set(). So we can remove
this check safely.
2016-02-13 23:55:15 +06:00
Lennart Poettering
c2cf6e0b9d resolved: fix DNSSECSupported Link object property name
By mistake the "DNSSECSupported" bus property of the Link object got named
"DNSSECSupport". Internally, it's named correctly, and the counterpart on the
"Manager" object got named correctly too.

Technically this rename is an API break, but given that the interface is not
documented or widely announced yet, and just 3 days in a published release,
let's just fix this, and hope nobody notices.
2016-02-13 18:22:58 +01:00
Zbigniew Jędrzejewski-Szmek
cf98937cc7 activate: allow multiple, possibly invalid, fd names
Previous code only allowed a single name to be passed, and duplicated
it over all descriptors. For the sake of testing, allow different
names and in arbitrary number. If just one is given, duplicate it
to match the number of sockets. This matches previuos behaviour.

Since this is a testing tool, it seems useful to allow passing invalid
names to test application behaviour with invalid names. Hence, only
warn. When warning, escape the name.
2016-02-13 11:54:39 -05:00
Zbigniew Jędrzejewski-Szmek
afe773b01a basic/strv: fix strv_join for first empty argument
Empty strings were ignored in strv_join, but only if they were at the beginning
of the string. Empty strings after at least one non-empty item were treated
normally.

Previously:
{"x"} → "x"
{"x", ""} → "x"
{"x", "", ""} → "x::"
{""} → ""
{"", ""} → ""
{"", "", ""} → ""
{"", "x"} → "x"
{"", "x", ""} → "x:"
Now:
{"x"} → "x"
{"x", ""} → "x"
{"x", "", ""} → "x::"
{""} → ""
{"", ""} → ":"
{"", "", ""} → "::"
{"", "x"} → ":x"
{"", "x", ""} → ""
2016-02-13 11:54:39 -05:00
Zbigniew Jędrzejewski-Szmek
06e948901a Merge pull request #2603 from poettering/drop-compat-libs
Some spring cleaning
2016-02-13 10:36:02 -05:00
Lennart Poettering
dd422d1e5b tree-wide: make more global variables static
let's export as little as we can
2016-02-13 12:28:28 +01:00
Lennart Poettering
1d9b8e5834 util: drop two unused calls from src/basic/ 2016-02-13 12:28:04 +01:00
Lennart Poettering
0655ef96fd build-sys: drop aufs-util.[ch]
Left over cruft from the dkr excercise.
2016-02-13 12:03:16 +01:00
Lennart Poettering
a6b44298da gitignore: remove stuff long lost
Drop some entries of stuff we long removed from the main git repo, either
because it was split out or removed altogether.
2016-02-13 11:59:34 +01:00
Lennart Poettering
6577bbe751 build-sys: drop Makefile symlink in src/basic/linux
The dir is not used otherwise, hence let's drop the Makefile, so that the dir
stops to exist, too.
2016-02-13 11:59:34 +01:00
Lennart Poettering
479050b363 core: drop Capabilities= setting
The setting is hardly useful (since its effect is generally reduced to zero due
to file system caps), and with the advent of ambient caps an actually useful
replacement exists, hence let's get rid of this.

I am pretty sure this was unused and our man page already recommended against
its use, hence this should be a safe thing to remove.
2016-02-13 11:59:34 +01:00
Lennart Poettering
2621af5346 util-lib: drop json parser
This was used by the dkr logic, which is gone now, hence remove this too.
Should we need it one day again the git history never forgets...

Note that this only covers the JSON parser. The JSON generator used by
"journalctl -o json" remains, as its much much simpler and requires no
infrastructure except printf() and the most basic escaping.
2016-02-13 11:57:14 +01:00
Lennart Poettering
4de282cf93 build-sys: drop libsystemd-{id128,daemon,login,journal}.so compat libs
They have long been obsolete, and upstream distros and packages have mostly
switched over, let's get rid of it for good.
2016-02-13 11:57:14 +01:00
Lennart Poettering
91ba5ac7d0 Merge pull request #2589 from keszybz/resolve-tool-2
Better support of OPENPGPKEY, CAA, TLSA packets and tests
2016-02-13 11:15:41 +01:00
Zbigniew Jędrzejewski-Szmek
6c3bedd5cf Merge pull request #2601 from poettering/systemd-analyze-dump-align
core: fix indenting in dump output
2016-02-12 20:36:19 -05:00
Zbigniew Jędrzejewski-Szmek
718af59e9a resolve: always align flags to 8th column and print CAA flags
Left-over unknown flags are printed numerically. Otherwise,
it wouldn't be known what bits are remaining without knowning
what the known bits are.

A test case is added to verify the flag printing code:
============== src/resolve/test-data/fake-caa.pkts ==============
google.com. IN CAA   0 issue "symantec.com"
google.com. IN CAA   128 issue "symantec.com"
        -- Flags: critical
google.com. IN CAA   129 issue "symantec.com"
        -- Flags: critical 1
google.com. IN CAA   22 issue "symantec.com"
        -- Flags: 22
2016-02-12 20:00:42 -05:00
Zbigniew Jędrzejewski-Szmek
95052df376 resolve: parse CAA records 2016-02-12 20:00:42 -05:00
Zbigniew Jędrzejewski-Szmek
fa45182ed6 Fix hashing of TLSA packets
Also add example files with TLSA and SSHFP records.
2016-02-12 20:00:42 -05:00
Zbigniew Jędrzejewski-Szmek
fff85dbe15 test-dns-packet: allow running without arguments 2016-02-12 20:00:42 -05:00
Zbigniew Jędrzejewski-Szmek
6d99904f5a test-dns-packet: add framework to read and dump packets
Packets are stored in a simple format:
<size> <packet-wire-format> <size> <packet-wire-format> ...

Packets for some example domains are dumped, to test rr code for various
record types. Currently:
A
AAAA
CAA
DNSKEY
LOC
MX
NS
NSEC
OPENPGPKEY
SOA
SPF
TXT

The hashing code is executed, but results are not checked.

Also build other tests in src/resolve only with --enable-resolve.
2016-02-12 20:00:42 -05:00
Zbigniew Jędrzejewski-Szmek
384de57271 Merge pull request #2600 from poettering/s390-alarm-clock
time-util: map ALARM clockids to non-ALARM clockids in now()
2016-02-12 19:14:25 -05:00
Lennart Poettering
b895d15511 core: fix indenting in dump output
Fixes: #2593
2016-02-12 21:33:39 +01:00
Lennart Poettering
32c1f5a579 time-util: map ALARM clockids to non-ALARM clockids in now()
Fixes: #2597
2016-02-12 21:30:15 +01:00
Daniel Mack
798c486fbc remove bus-proxyd
As kdbus won't land in the anticipated way, the bus-proxy is not needed in
its current form. It can be resurrected at any time thanks to the history,
but for now, let's remove it from the sources. If we'll have a similar tool
in the future, it will look quite differently anyway.

Note that stdio-bridge is still available. It was restored from a version
prior to f252ff17, and refactored to make use of the current APIs.
2016-02-12 19:10:01 +01:00
Martin Pitt
736ffecc9c Merge pull request #2594 from keszybz/spelling
Spelling
2016-02-12 09:26:18 +01:00
Zbigniew Jędrzejewski-Szmek
c96d7bf878 Merge pull request #2595 from l10n-tw/master
Update zh_TW translation.
2016-02-11 23:40:11 -05:00