Lennart Poettering [Thu, 21 Jan 2016 12:16:47 +0000 (13:16 +0100)]
Merge pull request #2401 from lnykryn/sysv-split-deps-v4
v4: sysv-generator: do not join dependencies on one line, split them
Lukas Nykryn [Wed, 20 Jan 2016 14:16:32 +0000 (15:16 +0100)]
sysv-generator: do not join dependencies on one line, split them
If there is a lot of initscripts and dependencies between them we might
end generating After= (and similar) lines which are longer then LINE_MAX
and thus rejected by parser in systemd.
Fixes #2099
Daniel Mack [Thu, 21 Jan 2016 10:52:01 +0000 (11:52 +0100)]
Merge pull request #2393 from evverx/ignore-test-dnssec-complex
.gitignore: add test-dnssec-complex
Daniel Mack [Thu, 21 Jan 2016 10:51:37 +0000 (11:51 +0100)]
Merge pull request #2371 from evverx/add-valgrind-helper-for-daemon-reexec
core: add valgrind helper for daemon-reexec
Daniel Mack [Thu, 21 Jan 2016 10:50:08 +0000 (11:50 +0100)]
Merge pull request #2391 from keszybz/coverity
Coverity inspired fixes
Harald Hoyer [Thu, 21 Jan 2016 10:39:31 +0000 (11:39 +0100)]
Merge pull request #2341 from nmartensen/fstab-generator-fixes
Fstab-generator fixes
Evgeny Vereshchagin [Thu, 21 Jan 2016 02:10:55 +0000 (02:10 +0000)]
.gitignore: add test-dnssec-complex
This is a follow-up for 412577e
Evgeny Vereshchagin [Tue, 19 Jan 2016 15:48:45 +0000 (15:48 +0000)]
core: add valgrind helper for daemon-reexec
Inspired by https://github.com/systemd/systemd/issues/2187#issuecomment-
165587140
Zbigniew Jędrzejewski-Szmek [Wed, 20 Jan 2016 02:41:00 +0000 (21:41 -0500)]
systemd: remove dead code
We only go to fail label if pam_pid <= 0.
CID #1306746.
Zbigniew Jędrzejewski-Szmek [Wed, 20 Jan 2016 02:29:59 +0000 (21:29 -0500)]
Add assert in barrier code
This function is not supposed to fail, it only returns a boolean.
So add an assert in case anyone calls it without proper initialization
of *b.
Zbigniew Jędrzejewski-Szmek [Wed, 20 Jan 2016 01:25:26 +0000 (20:25 -0500)]
timesyncd: use (void) to mark ignored value
CID #1325772.
Zbigniew Jędrzejewski-Szmek [Wed, 20 Jan 2016 01:23:25 +0000 (20:23 -0500)]
test-date: check return value
CID #1327432.
Zbigniew Jędrzejewski-Szmek [Wed, 20 Jan 2016 01:20:02 +0000 (20:20 -0500)]
test-cgroup-mask: check return value
CID #1339830.
Zbigniew Jędrzejewski-Szmek [Wed, 20 Jan 2016 00:50:17 +0000 (19:50 -0500)]
libsystemd-network: avoid double free on error
This could happen if the remote sent us a badly formatted
option.
CID #1317206.
Zbigniew Jędrzejewski-Szmek [Wed, 20 Jan 2016 00:45:58 +0000 (19:45 -0500)]
libsystemd-network: use assert_se
It cannot fail.
CID #1320623.
Zbigniew Jędrzejewski-Szmek [Wed, 20 Jan 2016 00:25:45 +0000 (19:25 -0500)]
networkd: use (void) to mark ignored values
Null link or netdev are handled fine.
CID #1338084.
Tom Gundersen [Wed, 20 Jan 2016 23:54:35 +0000 (00:54 +0100)]
Merge pull request #2389 from bengal/dhcp-api-cleanup-v3
Improve libsystemd-networkd DHCP API (v3)
Zbigniew Jędrzejewski-Szmek [Wed, 20 Jan 2016 00:17:01 +0000 (19:17 -0500)]
test-tmpfiles: actually test that the file is temporary
CID #1341451.
Tom Gundersen [Wed, 20 Jan 2016 17:09:54 +0000 (18:09 +0100)]
Merge pull request #2329 from ssahani/tunnel
networkd: tunnel add support to configure address "any"
Tom Gundersen [Wed, 20 Jan 2016 16:45:42 +0000 (17:45 +0100)]
Merge pull request #2337 from dhxgit/patch-1
Fix IPv6PrivacyExtension (networkd-ndisc.c)
Lennart Poettering [Wed, 20 Jan 2016 16:39:07 +0000 (17:39 +0100)]
Merge pull request #2054 from keszybz/nss-link-less-2
Nss link less 2
Tom Gundersen [Wed, 20 Jan 2016 16:33:59 +0000 (17:33 +0100)]
Merge pull request #2267 from gdamjan/dont-drop-critical
networkd: link - do not drop config for critical interfaces
Beniamino Galvani [Wed, 20 Jan 2016 13:44:28 +0000 (14:44 +0100)]
dhcp: make DHCP6_OPTION_* enum public
libsystemd-network provides the public function
sd_dhcp6_client_set_request_option() to enable the request of a given
DHCP option. However the enum defining such options is defined in the
internal header dhcp6-protocol.h. Move the enum definition to the
public header sd-dhcp6-client.h and properly namespace values.
Beniamino Galvani [Wed, 20 Jan 2016 13:44:24 +0000 (14:44 +0100)]
dhcp: make DHCP_OPTION_* enum public
libsystemd-network provides the public function
sd_dhcp_client_set_request_option() to enable the request of a given
DHCP option. However the enum defining such options is defined in the
internal header dhcp-protocol.h. Move the enum definition to the
public header sd-dhcp-client.h and properly namespace values.
Beniamino Galvani [Wed, 20 Jan 2016 13:44:14 +0000 (14:44 +0100)]
dhcp: export routes as opaque objects
At the moment sd_dhcp_lease_get_routes() returns an array of structs
which are not defined in public headers. Instead, change the function
to return an array of pointers to opaque sd_dhcp_route objects.
Lennart Poettering [Wed, 20 Jan 2016 16:24:59 +0000 (17:24 +0100)]
Merge pull request #1607 from keszybz/lz4-remove-v1
Remove the old version of the lz4 stream compressor
Lennart Poettering [Wed, 20 Jan 2016 16:18:44 +0000 (17:18 +0100)]
Merge pull request #2085 from fbuihuu/more-use-of-check-load-state
core: use bus_unit_check_load_state() in transaction_add_job_and_depe…
Daniel Mack [Wed, 20 Jan 2016 16:06:56 +0000 (17:06 +0100)]
Merge pull request #2222 from snakeroot/eventsplat
hwdb: remove references to udevadm info /dev/input/event*
Daniel Mack [Wed, 20 Jan 2016 15:27:23 +0000 (16:27 +0100)]
Merge pull request #2387 from keszybz/mhd-offset
journal-gatewayd: fix offset
Zbigniew Jędrzejewski-Szmek [Wed, 20 Jan 2016 15:12:18 +0000 (10:12 -0500)]
journal-gatewayd: fix offset
I was checking something when writing the patch and
committed this by mistake.
Lennart Poettering [Wed, 20 Jan 2016 14:44:12 +0000 (15:44 +0100)]
Merge pull request #2385 from zonque/bootctl
bootctl: use DRAW_TREE_RIGHT rather than hard-coded UTF-8 character
Lennart Poettering [Wed, 20 Jan 2016 12:44:31 +0000 (13:44 +0100)]
Merge pull request #2381 from jsynacek/journalctl-colors-v4
basic/terminal-util: introduce SYSTEMD_COLORS environment variable
Daniel Mack [Wed, 20 Jan 2016 12:12:21 +0000 (13:12 +0100)]
bootctl: use DRAW_TREE_RIGHT rather than hard-coded UTF-8 character
Fixes #2384
Tom Gundersen [Wed, 20 Jan 2016 10:30:20 +0000 (11:30 +0100)]
Merge pull request #2372 from poettering/dnssec17
resolved bus API improvements
Jan Synacek [Tue, 19 Jan 2016 09:17:19 +0000 (10:17 +0100)]
basic/terminal-util: introduce SYSTEMD_COLORS environment variable
... to determine if color output should be enabled. If the variable is not set,
fall back to using on_tty(). Also, rewrite existing code to use
colors_enabled() where appropriate.
Lennart Poettering [Tue, 19 Jan 2016 20:48:01 +0000 (21:48 +0100)]
resolved: rework DNSSECSupported property
Not only report whether the server actually supports DNSSEC, but also first check whether DNSSEC is actually enabled
for it in our local configuration.
Also, export a per-link DNSSECSupported property in addition to the existing manager-wide property.
Lennart Poettering [Tue, 19 Jan 2016 20:20:13 +0000 (21:20 +0100)]
resolved: add SetLinkXYZ() method counterparts on the Link object
So far, we exposed SetLinkXYZ() on the Manager interface, to set a couple of link properties. This adds similar calls
SetXYZ() on the Link interface, and makes sure the former is little more than a shortcut to the latter.
SetLinkXYZ() has the benefit of not requiring a GetLink() round trip for setting these properties, while the method
actually belongs to the Link objects, and this change corrects that.
Lennart Poettering [Tue, 19 Jan 2016 17:37:10 +0000 (18:37 +0100)]
sd-resolve: use UINT64_C() macros where appropriate
Lennart Poettering [Tue, 19 Jan 2016 17:36:52 +0000 (18:36 +0100)]
networkd: sd_bus_path_decode() returns 0, if the prefix doesn't match
Lennart Poettering [Tue, 19 Jan 2016 17:35:32 +0000 (18:35 +0100)]
networkd: optimize link_node_enumerator() a bit
strv_consume() is pretty expensive when invoked piecemeal, hence optimize it a bit by pre-allocating a properly sized
array.
Lennart Poettering [Tue, 19 Jan 2016 17:32:42 +0000 (18:32 +0100)]
resolved: expose bus objects for each Link
The link objects expose as properties the current settings made with SetLinkDNS() and related calls, plus some more
information.
Daniel Mack [Tue, 19 Jan 2016 19:44:58 +0000 (20:44 +0100)]
Merge pull request #2373 from keszybz/man-api-build-3
Man page grammar and build tweaks v3
Lennart Poettering [Tue, 19 Jan 2016 16:19:14 +0000 (17:19 +0100)]
resolved: rename a few props to closer match ther counterparts in the various configuration files
Lennart Poettering [Tue, 19 Jan 2016 16:16:12 +0000 (17:16 +0100)]
resolved: add bus API for configuring per-link DNS settings
This is useful for alternative network management solutions (such as NetworkManager) to push DNS configuration data
into resolved.
The calls will fail should networkd already have taken possesion of a link, so that the bus API is only available if
we don't get the data from networkd.
Lennart Poettering [Tue, 19 Jan 2016 16:15:02 +0000 (17:15 +0100)]
resolved: add a couple of errors to the error mapping tables
These were previously forgotten, add them now.
Lennart Poettering [Tue, 19 Jan 2016 16:13:27 +0000 (17:13 +0100)]
resolved: allocate DNS scope for links only if the interface is up
For mDNS and LLMNR we already created the scopes only if the specific interfaces where actually up and suitable for
Multicasting. Add a similar (but weaker) logic for unicast DNS as well.
Lennart Poettering [Tue, 19 Jan 2016 16:12:12 +0000 (17:12 +0100)]
resolve-host: support --interface= as long form for -i
Lennart Poettering [Tue, 19 Jan 2016 16:11:28 +0000 (17:11 +0100)]
resolve-host: show whether DNSSEC is supported or not in --statistics output
This should be generally useful information, hence show it.
Lennart Poettering [Tue, 19 Jan 2016 16:10:34 +0000 (17:10 +0100)]
resolve-host: also show mDNS as source of resolving
Zbigniew Jędrzejewski-Szmek [Tue, 5 Jan 2016 04:17:21 +0000 (23:17 -0500)]
man/sd_event_{add_io,add_time,add_signal,now}: various small fixes
- remove things which are clear from the context
- 0 is a valid descriptor number, hence "positive" → "non-negative"
- "positive" means greater than zero, hence "positive non-zero" → "positive"
- use oxford comma
- reword some things for clarity
Lennart Poettering [Tue, 19 Jan 2016 14:11:10 +0000 (15:11 +0100)]
Merge pull request #2369 from zonque/resolved
resolved: hide public mDNS configuration knobs for now
Lennart Poettering [Tue, 19 Jan 2016 14:09:53 +0000 (15:09 +0100)]
Merge pull request #2357 from keszybz/warnings-2
Remove gcc warnings v2
Daniel Mack [Tue, 19 Jan 2016 13:05:01 +0000 (14:05 +0100)]
resolved: remove configuration knobs for mDNS until it's ready
These bits were intenionally left out while mDNS is under development.
Remove the exposed knobs and man page entries again until this is settled.
Daniel Mack [Tue, 19 Jan 2016 12:58:55 +0000 (13:58 +0100)]
resolved: fix mDNS IPv6 multicast address
Fixes #2366
Tom Gundersen [Tue, 19 Jan 2016 00:44:20 +0000 (01:44 +0100)]
Merge pull request #2358 from poettering/dnssec16
sixteenth DNSSEC patch set
Lennart Poettering [Mon, 18 Jan 2016 23:51:26 +0000 (00:51 +0100)]
resolved: don't forget about lost OPT and RRSIG when downgrading a feature level
Certain Belkin routers appear to implement a broken DNS cache for A RRs and some others, but implement a pass-thru for
AAAA RRs. This has the effect that we quickly recognize the broken logic of the router when we do an A lookup, but for
AAAA everything works fine until we actually try to validate the request. Given that the validation will necessarily
fail ultimately let's make sure we remember even when downgrading a feature level that OPT or RRSIG was missing.
Lennart Poettering [Mon, 18 Jan 2016 21:45:18 +0000 (22:45 +0100)]
update DNSSEC TODO
Lennart Poettering [Mon, 18 Jan 2016 22:29:04 +0000 (23:29 +0100)]
resolved: don't try to print error strings, where errno isn't set
Lennart Poettering [Mon, 18 Jan 2016 22:27:16 +0000 (23:27 +0100)]
resolved: when restarting a transaction pick a new ID
When we restart a transaction because of an incompatible server, pick a new transaction ID.
This should increase compatibility with DNS servers that don't like if they get different requests with the same
transaction ID.
Lennart Poettering [Mon, 18 Jan 2016 22:15:35 +0000 (23:15 +0100)]
resolved: enforce maximum limit on DNS transactions
given that DNSSEC lookups may result in quite a number of auxiliary transactions, let's better be safe than sorry and
also enforce a limit on the number of total transactions, not just on the number of queries.
Lennart Poettering [Mon, 18 Jan 2016 21:43:21 +0000 (22:43 +0100)]
resolved: add DNAME test case to the complex DNSSEC test
Lennart Poettering [Mon, 18 Jan 2016 21:36:58 +0000 (22:36 +0100)]
resolved: fix how we detect whether auxiliary DNSSEC transactions are ready
Previously, when getting notified about a completed auxiliary DNSSEC transaction we'd immediately act on it, and
possibly abort the main transaction. This is problematic, as DNS transactions that already completed at the time we
started using them will never get the notification event, and hence never be acted on in the same way.
Hence, introduce a new call dns_transaction_dnssec_ready() that checks the state of auxiliary DNSSEC transactions, and
returns 1 when we are ready for the actual DNSSEC validation step. Then, make sure this is invoked when the auxiliary
transactions are first acquired (and thus possibly reused) as well when the notifications explained above take place.
This fixes problems particularly when doing combined A and AAAA lookups where the auxiliary DNSSEC transactions get
reused between them, and where we got confused if we reused an auxiliary DNSSEC transaction from one when it already
got completed from the other.
Lennart Poettering [Mon, 18 Jan 2016 21:34:41 +0000 (22:34 +0100)]
resolved: end log messages in a full stop
Lennart Poettering [Mon, 18 Jan 2016 21:33:23 +0000 (22:33 +0100)]
resolved: never consider following a CNAME/DNAME chain for a CNAME/DNAME lookup
Let's avoid thinking that a CNAME/DNAME chain traversal could be a good idea if QTYPE is already CNAME/DNAME.
(Also, let's bail out early when trying to see if some RR is a suitable CNAME/DNAME for some other RR).
Lennart Poettering [Mon, 18 Jan 2016 20:31:16 +0000 (21:31 +0100)]
resolved: when following a CNAME, turn off search domains
If the first step was done via a search domain, make sure the subsequent steps are not.
Lennart Poettering [Mon, 18 Jan 2016 20:30:45 +0000 (21:30 +0100)]
resolved: properly reset old collected data when following a CNAME redirect
Lennart Poettering [Mon, 18 Jan 2016 20:02:00 +0000 (21:02 +0100)]
resolved: beef up complex dnssec test to also use ResolveAddress() and do IDNA checks
Lennart Poettering [Mon, 18 Jan 2016 19:31:39 +0000 (20:31 +0100)]
resolved: rework IDNA logic
Move IDNA logic out of the normal domain name processing, and into the bus frontend calls. Previously whenever
comparing two domain names we'd implicitly do IDNA conversion so that "pöttering.de" and "xn--pttering-n4a.de" would be
considered equal. This is problematic not only for DNSSEC, but actually also against he IDNA specs.
Moreover it creates problems when encoding DNS-SD services in classic DNS. There, the specification suggests using
UTF8 encoding for the actual service name, but apply IDNA encoding to the domain suffix.
With this change IDNA conversion is done only:
- When the user passes a non-ASCII hostname when resolving a host name using ResolveHostname()
- When the user passes a non-ASCII domain suffix when resolving a service using ResolveService()
No IDNA encoding is done anymore:
- When the user does raw ResolveRecord() RR resolving
- On the service part of a DNS-SD service name
Previously, IDNA encoding was done when serializing names into packets, at a point where information whether something
is a label that needs IDNA encoding or not was not available, but at a point whether it was known whether to generate a
classic DNS packet (where IDNA applies), or an mDNS/LLMNR packet (where IDNA does not apply, and UTF8 is used instead
for all host names). With this change each DnsQuery object will now maintain two copies of the DnsQuestion to ask: one
encoded in IDNA for use with classic DNS, and one encoded in UTF8 for use with LLMNR and MulticastDNS.
Lennart Poettering [Mon, 18 Jan 2016 19:22:45 +0000 (20:22 +0100)]
resolved: minor optimization for dns_question_is_equal()
If the poinetrs are equal, we don't have to do a deep comparison.
This is similar to a similar optimization we already have in place for RRs and keys.
Lennart Poettering [Mon, 18 Jan 2016 19:21:55 +0000 (20:21 +0100)]
resolved: be slightly stricter when validating DnsQuestion
Also verify whether the DNS RR types are actually suitable for a question.
Lennart Poettering [Mon, 18 Jan 2016 19:21:30 +0000 (20:21 +0100)]
resolved: make key argument of dns_question_contains() const
Lennart Poettering [Mon, 18 Jan 2016 19:18:28 +0000 (20:18 +0100)]
resolved add dns_name_apply_idna() to convert a domain name into its IDNA equivalent
Tom Gundersen [Mon, 18 Jan 2016 22:10:53 +0000 (23:10 +0100)]
Merge pull request #2326 from poettering/dnssec15
Fifteenth batch of DNSSEC patches
Zbigniew Jędrzejewski-Szmek [Sat, 26 Dec 2015 02:20:47 +0000 (21:20 -0500)]
build-sys: allow building man pages even if disabled in ./configure
This is purely for developer convenience: building man pages is slow
so people tend to disable them when not working on documentation. But
sometimes it is useful to build the man page to look something up,
especially when working on an older machine which has outdated
documentation, or to test some change to documentation. The rules to build
man pages are now outside of the ENABLE_MANPAGES conditional, but they
are not used unless manually invoked, and only the inclusion of man
pages in build and install targets is affected by the conditional.
Also, more generated files are removed in clean, which seems to be
good thing, and Makefile.am is simplified.
Zbigniew Jędrzejewski-Szmek [Fri, 15 Jan 2016 19:58:50 +0000 (14:58 -0500)]
journal-remote: update to 64bit µhttp api, provide fallback
64 bit offset is now accepted, which is nice. The old function is
deprecated, and generates a compile time warning when used. We only
use an offset of 0, so we really don't care. Adapt to use the new
function, but fall back to the old one on older versions.
Zbigniew Jędrzejewski-Szmek [Fri, 15 Jan 2016 19:13:12 +0000 (14:13 -0500)]
journal-remote: fix warning about deprecated µhttpd macro
src/journal-remote/journal-remote.c:590:13: warning: Value MHD_HTTP_METHOD_NOT_ACCEPTABLE is deprecated, use MHD_HTTP_NOT_ACCEPTABLE
return mhd_respond(connection, MHD_HTTP_METHOD_NOT_ACCEPTABLE,
^
The new define was added in 0.9.38. Instead of requiring the new
libmicrohttpd version, provide the fallback, it is trivial.
Zbigniew Jędrzejewski-Szmek [Wed, 13 Jan 2016 20:08:48 +0000 (15:08 -0500)]
resolve: fix return value from dns_packet_append_rr()
Zbigniew Jędrzejewski-Szmek [Wed, 13 Jan 2016 02:02:56 +0000 (21:02 -0500)]
udevd: initialize fds to -1 and close them before exiting
Little change in practice, because the program will exit soon
afterwards, but the standard style of closing all fds is now followed.
Also gets rid of gcc warning about fd_ctrl and fd_uevent being
unitialized.
Zbigniew Jędrzejewski-Szmek [Tue, 12 Jan 2016 22:42:52 +0000 (17:42 -0500)]
journald: do not free uninitialized pointer in error path
Zbigniew Jędrzejewski-Szmek [Wed, 13 Jan 2016 03:02:18 +0000 (22:02 -0500)]
logind: simplify job variable handling
manager_{start,stop}_{slice,scope,unit} functions had an optional job
output parameter. But all callers specified job, so make the parameter
mandatory, add asserts. Also extract common job variable handling to
a helper function to avoid duplication.
Avoids gcc warning about job being unitialized.
Zbigniew Jędrzejewski-Szmek [Tue, 12 Jan 2016 22:27:33 +0000 (17:27 -0500)]
logind: do not use an uninitialized variable
We requested various fields using SD_BUS_CREDS_AUGMENT but at least
sd_bus_creds_get_tty can fail with ENXIO, not setting the output variable.
Zbigniew Jędrzejewski-Szmek [Fri, 25 Dec 2015 21:59:44 +0000 (16:59 -0500)]
sd-event: fix theoretical leak on error in event_make_signal_data
Zbigniew Jędrzejewski-Szmek [Wed, 13 Jan 2016 01:22:30 +0000 (20:22 -0500)]
sd-ndisc: simplify if stmt and reindent log messages
Merge separate two error handling statements into two nested ifs.
This looks cleaner, and avoids a gcc warning about *prefix being
uninitialized.
While at it, fix identation of logging statements elsewhere in the
file.
Zbigniew Jędrzejewski-Szmek [Mon, 11 Jan 2016 22:26:57 +0000 (17:26 -0500)]
sd-ndisc: simplify ndisc_prefix_new
If the initial allocation succeeded, there is no way to
fail, so cleanup function is not necessary.
Zbigniew Jędrzejewski-Szmek [Tue, 12 Jan 2016 22:42:06 +0000 (17:42 -0500)]
sd-device: initialize variables to avoid warning
The code is correct, assuming that the kernel does not feed
us garbled data. Let's initialize those variables to avoid the
warning anyway.
Zbigniew Jędrzejewski-Szmek [Mon, 11 Jan 2016 17:42:42 +0000 (12:42 -0500)]
bus-kernel: reword assignment of dst_id in bus_message_setup_kmsg
Setting of dst_id was based on interplay of two booleans,
making the logic hard to follow (for humans and compilers alike).
gcc was confused and emmitted a warning about an uninitialized
variable. Rework the code to make it obvious that dst_id is
set properly.
Zbigniew Jędrzejewski-Szmek [Mon, 11 Jan 2016 17:16:02 +0000 (12:16 -0500)]
sd-netlink: remove unused table
Zbigniew Jędrzejewski-Szmek [Fri, 25 Dec 2015 21:29:09 +0000 (16:29 -0500)]
basic: add missing word in comment
Zbigniew Jędrzejewski-Szmek [Tue, 12 Jan 2016 20:36:57 +0000 (15:36 -0500)]
basic/escape: merge utf8 and non-utf8 paths in cunescape_one
Not every byte sequence is valid utf8. We allow escaping of non-utf8
sequences in strings by using octal and hexadecimal escape sequences
(\123 and \0xAB) for bytes at or above 128. Users of cunescape_one
could infer whether such use occured when they received an answer
between 128 and 256 in *ret (a non-ascii one byte character). But this
is subtle and misleading: the comments were wrong, because ascii is a
subset of unicode, so c != 0 did not mean non-unicode, but rather
ascii-subset-of-unicode-or-raw-byte. This was all rather confusing, so
make the "single byte" condition explicit.
I'm not convinced that allowing non-utf8 sequences to be produced is
useful in all cases where we allow it (e.g. in config files), but that
behaviour is unchanged, just made more explicit.
This also fixes an (invalid) gcc warning about unitialized variable
(*ret_unicode) in callers of cunescape_one.
Zbigniew Jędrzejewski-Szmek [Mon, 11 Jan 2016 19:37:30 +0000 (14:37 -0500)]
core/dbus-execute: do not needlessly compare strings again
gcc complains that dirs might be unitialized. It cannot, but
we just checked that name has one of three values above, so
no need to check again.
Zbigniew Jędrzejewski-Szmek [Wed, 13 Jan 2016 03:44:44 +0000 (22:44 -0500)]
test-bus-error: add tests for setting error == 0
Zbigniew Jędrzejewski-Szmek [Mon, 11 Jan 2016 22:19:25 +0000 (17:19 -0500)]
sd-event: check clock argument to sd_event_now()
sd_event_now() is a public function, so we must check all
arguments for validity. Update man page and add tests.
Sample debug message:
Assertion 'IN_SET(clock, CLOCK_REALTIME, CLOCK_REALTIME_ALARM, CLOCK_MONOTONIC, CLOCK_BOOTTIME, CLOCK_BOOTTIME_ALARM)' failed at src/libsystemd/sd-event/sd-event.c:2719, function sd_event_now(). Ignoring.
Zbigniew Jędrzejewski-Szmek [Wed, 13 Jan 2016 19:23:54 +0000 (14:23 -0500)]
bus-error: verify additional error maps during installation
Go over the entries in the map and check that they make sense.
Tests are added. In the future we might want to do additional
checks, e.g. verifying that the error names are in the expected
format.
Zbigniew Jędrzejewski-Szmek [Tue, 12 Jan 2016 22:19:51 +0000 (17:19 -0500)]
basic,bus-error: return negative error from errno_from_name
errno_from_name used an unusual return convention where 0 meant
"not found". This tripped up config_parse_syscall_errno(),
which would treat that as success. Return -EINVAL instead,
and adjust bus_error_name_to_errno() for the new convention.
Also remove a goto which was used as a simple if and clean
up surroudning code a bit.
Zbigniew Jędrzejewski-Szmek [Tue, 12 Jan 2016 22:25:23 +0000 (17:25 -0500)]
Use negative_errno() to assert errno is positive after a few system calls
This is not particularly intrusive because it happens in simple
utility functions. It helps gcc understand that error codes
are negative.
This gets a rid of most of the remaining warnings.
Daniel Mack [Mon, 18 Jan 2016 10:49:32 +0000 (11:49 +0100)]
Merge pull request #2352 from martinpitt/master
keymap: Add HP ProBook 440 G3
Martin Pitt [Mon, 18 Jan 2016 10:01:32 +0000 (11:01 +0100)]
keymap: Add HP ProBook 440 G3
Fixes #2343
Daniel Mack [Mon, 18 Jan 2016 09:53:49 +0000 (10:53 +0100)]
Merge pull request #2347 from aroig/gh/fix-udev-user-wants
Fix broken SYSTEMD_USER_WANTS in udev rules.
Daniel Mack [Mon, 18 Jan 2016 09:52:15 +0000 (10:52 +0100)]
Merge pull request #2350 from evverx/fix-memory-leak-on-failed-preset-all
core: fix memory leak on failed preset-all
Daniel Mack [Mon, 18 Jan 2016 09:51:19 +0000 (10:51 +0100)]
Merge pull request #2349 from evverx/test-functions-cleanup
tests: various fixes