Zbigniew Jędrzejewski-Szmek [Fri, 1 Aug 2014 23:36:48 +0000 (19:36 -0400)]
build-sys: use a common rule for some gperf commands
Zbigniew Jędrzejewski-Szmek [Fri, 1 Aug 2014 23:36:33 +0000 (19:36 -0400)]
resolved: align last rr column
Zbigniew Jędrzejewski-Szmek [Sun, 3 Aug 2014 16:52:03 +0000 (12:52 -0400)]
tty-ask-password-agent: modernization
Zbigniew Jędrzejewski-Szmek [Sat, 2 Aug 2014 15:12:21 +0000 (11:12 -0400)]
Unify parse_argv style
getopt is usually good at printing out a nice error message when
commandline options are invalid. It distinguishes between an unknown
option and a known option with a missing arg. It is better to let it
do its job and not use opterr=0 unless we actually want to suppress
messages. So remove opterr=0 in the few places where it wasn't really
useful.
When an error in options is encountered, we should not print a lengthy
help() and overwhelm the user, when we know precisely what is wrong
with the commandline. In addition, since help() prints to stdout, it
should not be used except when requested with -h or --help.
Also, simplify things here and there.
Thomas Hindoe Paaboel Andersen [Sun, 3 Aug 2014 20:41:25 +0000 (22:41 +0200)]
resolved: avoid possible dereference of null pointer
In dns_scope_make_reply_packet the structs q, answer, and soa can be
null. We should check for null before reading their fields.
Thomas Hindoe Paaboel Andersen [Sun, 3 Aug 2014 17:45:20 +0000 (19:45 +0200)]
sd-dhcp-server: avoid returning garbage value
Force renewing with a pool size of 0 would return the uninitialized r.
Thomas Hindoe Paaboel Andersen [Sun, 3 Aug 2014 17:30:38 +0000 (19:30 +0200)]
sd-dhcp-server: check if r < 0
Thomas Hindoe Paaboel Andersen [Sun, 3 Aug 2014 07:39:30 +0000 (09:39 +0200)]
resolve-host: use correct format specifier
Thomas Hindoe Paaboel Andersen [Sat, 2 Aug 2014 21:38:01 +0000 (23:38 +0200)]
resolved: remove unused variables
Dan Dedrick [Tue, 29 Jul 2014 19:31:23 +0000 (15:31 -0400)]
switch-root: umount the old root correctly
The unmount occurs after the pivot_root, so the path used to unmount
should take into account the new root directory. This will allow the
umount to actually succeed.
Zbigniew Jędrzejewski-Szmek [Sun, 3 Aug 2014 05:28:21 +0000 (01:28 -0400)]
nspawn: fix truncation of machine names in interface names
Based on patch by Michael Marineau <michael.marineau@coreos.com>:
When deriving the network interface name from machine name strncpy was
not properly null terminating the string and the maximum string size as
returned by strlen() is actually IFNAMSIZ-1, not IFNAMSIZ.
Karel Zak [Thu, 31 Jul 2014 08:15:40 +0000 (10:15 +0200)]
bootchart: ask for --rel when failed to initialize graph start time
We always read system uptime before log start time. So the uptime
should be always smaller number, except it includes system suspend
time. It seems better to ask for --rel and exit() than try to be
smart and try to recovery from this situation or generate huge
messy graphs.
Karel Zak [Thu, 31 Jul 2014 08:15:39 +0000 (10:15 +0200)]
bootchart: don't parse /proc/uptime, use CLOCK_BOOTTIME
* systemd-bootchart always parses /proc/uptime, although the
information is unnecessary when --rel specified
* use /proc/uptime is overkill, since Linux 2.6.39 we have
clock_gettime(CLOCK_BOOTTIME, ...). The backend on kernel side is
get_monotonic_boottime() in both cases.
* main() uses "if (graph_start <= 0.0)" to detect that /proc is
available.
This is fragile solution as graph_start is always smaller than zero
on all systems after suspend/resume (e.g. laptops), because in this
case the system uptime includes suspend time and uptime is always
greater number than monotonic time. For example right now difference
between uptime and monotonic time is 37 hours on my laptop.
Note that main() calls log_uptime() (to parse /proc/uptime) for each
sample when it believes that /proc is not available. So on my laptop
systemd-boochars spends all live with /proc/uptime parsing +
nanosleep(), try
strace /usr/lib/systemd/systemd-bootchart
to see the never ending loop.
This patch uses access("/proc/vmstat", F_OK) to detect procfs.
Zbigniew Jędrzejewski-Szmek [Sun, 3 Aug 2014 05:12:30 +0000 (01:12 -0400)]
journal-remote: rename KEY_FILE to avoid confict with <linux/input.h>
Umut Tezduyar Lindskog [Wed, 30 Jul 2014 07:02:14 +0000 (09:02 +0200)]
ldconfig: dont run it if ldconfig is not installed
Zbigniew Jędrzejewski-Szmek [Sun, 3 Aug 2014 04:27:25 +0000 (00:27 -0400)]
Move BTRFS_IOC_DEVICES_READY to missing.h
Simon McVittie [Fri, 1 Aug 2014 14:53:07 +0000 (15:53 +0100)]
util.h: include missing.h, for struct file_handle
This breaks udev-builtin-btrfs.c, which reinvents some of missing.h,
so use missing.h there too.
[zj: removed #include "config.h" and wrapped #include <linux/btrfs.h>
in ifdef HAVE_LINUX_BTRFS_H as discussed on the mailing list.]
Zbigniew Jędrzejewski-Szmek [Sun, 3 Aug 2014 03:50:22 +0000 (23:50 -0400)]
build-sys: fix conftest.c to work on arm
All tests for compiler support were failing with:
/usr/bin/ld: /tmp/ccwnVc2A.o: relocation R_ARM_MOVW_ABS_NC against `a' can not be used when making a shared object; recompile with -fPIC
Tom Gundersen [Fri, 1 Aug 2014 20:32:12 +0000 (22:32 +0200)]
Revert "libudev: use get_*_creds from shared rather than util_lookup_*"
This reverts commit
a56ba6158b9649e01226dfaf3ff7082c82571090.
The commit was pushed in error.
Lennart Poettering [Fri, 1 Aug 2014 17:48:02 +0000 (19:48 +0200)]
resolved: always drop multicast membership before adding one
This is apparently necessary on some devices, such as veth.
Lennart Poettering [Fri, 1 Aug 2014 17:25:06 +0000 (19:25 +0200)]
resolved: IPV6_UNICAST_IF may fail if we already are bound to a device, like we are for link-local addresses
Lennart Poettering [Fri, 1 Aug 2014 16:55:56 +0000 (18:55 +0200)]
missing: add missing bonding definitions
Lennart Poettering [Fri, 1 Aug 2014 16:09:51 +0000 (18:09 +0200)]
update TODO
Lennart Poettering [Fri, 1 Aug 2014 16:09:07 +0000 (18:09 +0200)]
resolved: flush cache each time we change to a different DNS server
Lennart Poettering [Fri, 1 Aug 2014 15:03:28 +0000 (17:03 +0200)]
resolved: read the system /etc/resolv.conf unless we wrote it ourselves
This way we integrate nicely with foreign network management stacks,
such as NM.
Tom Gundersen [Fri, 1 Aug 2014 13:42:08 +0000 (15:42 +0200)]
networkd: track the MTU of each link
And inform the DHCPv4 clients about it.
Tom Gundersen [Fri, 1 Aug 2014 14:10:13 +0000 (16:10 +0200)]
sd-dhcp-client: allow the max dhcp message size to be set to the MTU of the link
Tom Gundersen [Fri, 1 Aug 2014 13:26:30 +0000 (15:26 +0200)]
TODO
Tom Gundersen [Fri, 1 Aug 2014 13:17:18 +0000 (15:17 +0200)]
libudev: use get_*_creds from shared rather than util_lookup_*
Lennart Poettering [Fri, 1 Aug 2014 14:14:59 +0000 (16:14 +0200)]
resolved: rename resolved.h to resolved-manager.h
After all it pretty much exlcusively containers definitions about the
"Manager" object, hence let's call this the most obvious way.
Lennart Poettering [Fri, 1 Aug 2014 14:04:12 +0000 (16:04 +0200)]
resolved: beef up DNS server configuration logic
We now maintain two lists of DNS servers: system servers and fallback
servers.
system servers are used in combination with any per-link servers.
fallback servers are only used if there are no system servers or
per-link servers configured.
The system server list is supposed to be populated from a foreign tool's
/etc/resolv.conf (not implemented yet).
Also adds a configuration switch for LLMNR, that allows configuring
whether LLMNR shall be used simply for resolving or also for responding.
Lennart Poettering [Fri, 1 Aug 2014 14:01:12 +0000 (16:01 +0200)]
nss: always explicitly reset all error variables
glibc appears to be broken if we don't explicitly reset all error
variables, let's work around that.
https://bugzilla.redhat.com/show_bug.cgi?id=1125975
Tom Gundersen [Thu, 31 Jul 2014 13:26:20 +0000 (15:26 +0200)]
Revert "networkd: don't assume udev_device_new_from_device_id sets errno"
libudev now does set errno correctly, so we can indeed rely on this.
This reverts commit
2b49732c3d511007ae2c413997e56c40f678d79a.
Tom Gundersen [Thu, 31 Jul 2014 13:25:01 +0000 (15:25 +0200)]
libudev: set errno when udev_device_new_from_* or udev_device_get_parent_* fail
Lennart Poettering [Thu, 31 Jul 2014 23:56:14 +0000 (01:56 +0200)]
update TODO
Lennart Poettering [Thu, 31 Jul 2014 23:55:15 +0000 (01:55 +0200)]
nss-resolve: fallback to the class NSS "dns" module if we cannot contact resolved
That way DNS resolution works both with and without resolved running.
Lennart Poettering [Thu, 31 Jul 2014 22:57:19 +0000 (00:57 +0200)]
resolved: don't bother caching negative RRs when the SOA TTL is 0 anyway
Lennart Poettering [Thu, 31 Jul 2014 22:57:12 +0000 (00:57 +0200)]
update TODO
Lennart Poettering [Thu, 31 Jul 2014 22:55:51 +0000 (00:55 +0200)]
resolved: use CLOCK_BOOTTIME instead of CLOCK_MONOTONIC when aging caches and timeing out transactions
That way the cache doens't get confused when the system is suspended.
Lennart Poettering [Thu, 31 Jul 2014 22:39:59 +0000 (00:39 +0200)]
resolved: fix negative caching of IDNA domains
Lennart Poettering [Thu, 31 Jul 2014 21:43:10 +0000 (23:43 +0200)]
resolved: handle IDNA domains
Make sure we format UTF-8 labels as IDNA when writing them to DNS
packets, and as native UTF-8 when writing them to mDNS or LLMNR packets.
When comparing or processing labels always consider native UTF-8 and
IDNA formats equivalent.
Zbigniew Jędrzejewski-Szmek [Thu, 31 Jul 2014 21:42:14 +0000 (17:42 -0400)]
resolved: fix serialization of LOC records, check correctness
Kay Sievers [Thu, 31 Jul 2014 21:08:44 +0000 (23:08 +0200)]
kdbus: update header
Kay Sievers [Thu, 31 Jul 2014 21:06:04 +0000 (23:06 +0200)]
hwdb: update
Lennart Poettering [Thu, 31 Jul 2014 17:54:43 +0000 (19:54 +0200)]
hostnamed: watch system hostname changes and update LLMNR RRs accordingly
Lennart Poettering [Thu, 31 Jul 2014 17:54:24 +0000 (19:54 +0200)]
resolved: fix deserialization of UTF8 host names
Lennart Poettering [Thu, 31 Jul 2014 17:53:59 +0000 (19:53 +0200)]
resolved: accept UTF-8 hostnames from bus clients
Lennart Poettering [Thu, 31 Jul 2014 17:51:11 +0000 (19:51 +0200)]
resolved: various fixes regarding encoding of UTF8 characters in DNS RRs
Lennart Poettering [Thu, 31 Jul 2014 16:41:54 +0000 (18:41 +0200)]
resolved: properly compare RRs we cannot parse
Lennart Poettering [Thu, 31 Jul 2014 16:41:41 +0000 (18:41 +0200)]
resolved: properly process SSHFP RRs
Lennart Poettering [Thu, 31 Jul 2014 16:23:00 +0000 (18:23 +0200)]
resolved: properly process SRV records
Lennart Poettering [Thu, 31 Jul 2014 16:03:09 +0000 (18:03 +0200)]
resolved: provide properly named way to access SPF data in RRs
Lennart Poettering [Thu, 31 Jul 2014 16:02:42 +0000 (18:02 +0200)]
resolved: make sure we always initialize r when parsing TXT records
Lennart Poettering [Thu, 31 Jul 2014 16:02:24 +0000 (18:02 +0200)]
resolved: properly process DNAME RRs
Lennart Poettering [Thu, 31 Jul 2014 15:47:09 +0000 (17:47 +0200)]
update TODO
Lennart Poettering [Thu, 31 Jul 2014 15:46:40 +0000 (17:46 +0200)]
resolved: implement LLMNR uniqueness verification
Kevin Wells [Thu, 31 Jul 2014 15:38:21 +0000 (17:38 +0200)]
rules: allow systemd to manage loop device partitions
SYSTEMD_READY is currently set to 0 for all loop devices (loop[0-9]*)
that do not have a backing_file. Partitioned loop devices (ex. loop0p1),
however, are matched by this rule and excluded by systemd even though
they are active devices.
This change adds an additional check to the rule, ensuring that only
top level loop devices (loop[0-9]+$) are excluded from systemd.
Zbigniew Jędrzejewski-Szmek [Thu, 31 Jul 2014 14:44:11 +0000 (10:44 -0400)]
resolved: fix multi-record packets with TXTs
Robert Schiele [Thu, 31 Jul 2014 12:18:59 +0000 (14:18 +0200)]
build-sys: check for intltool also when polkit is enabled
intltool is needed for nls _and_ polkit, thus the check needs to be
changed to do the test whenever one of them is enables.
Without this build fails when configured with
--disable-nls --enable-polkit
Zbigniew Jędrzejewski-Szmek [Thu, 31 Jul 2014 08:19:43 +0000 (04:19 -0400)]
resolved: LOC records
LOC records have a version field. So far only version 0 has been
published, but if a record with a different version was encountered,
our only recourse is to treat it as an unknown type. This is
implemented with the 'unparseable' flag, which causes the
serialization/deserialization and printing function to cause the
record as a blob. The flag can be used if other packet types cannot be
parsed for whatever reason.
Zbigniew Jędrzejewski-Szmek [Fri, 1 Aug 2014 01:47:51 +0000 (21:47 -0400)]
resolved: SPF records
Zbigniew Jędrzejewski-Szmek [Fri, 1 Aug 2014 01:36:58 +0000 (21:36 -0400)]
resolved: TXT records
Zbigniew Jędrzejewski-Szmek [Fri, 1 Aug 2014 01:06:00 +0000 (21:06 -0400)]
resolved: MX records
Zbigniew Jędrzejewski-Szmek [Fri, 1 Aug 2014 00:06:30 +0000 (20:06 -0400)]
resolve-host: list types and classes
Also update systemctl to similar style.
Zbigniew Jędrzejewski-Szmek [Thu, 31 Jul 2014 08:15:29 +0000 (04:15 -0400)]
Always prefer our headers to system headers
In practice this shouldn't make much difference, but
sometimes our headers might be newer, and we want to
test them.
Zbigniew Jędrzejewski-Szmek [Wed, 30 Jul 2014 19:38:54 +0000 (15:38 -0400)]
Constify option table and add missing option
Zbigniew Jędrzejewski-Szmek [Thu, 31 Jul 2014 08:01:19 +0000 (04:01 -0400)]
man: add udev.conf(5)
We generally have separate man pages for all configuration files.
In this case udev.conf was already described in systemd-udevd.service(8),
but it was hard to find. Docbook makes it hard to add a .so link from
a different section, so describe udev.conf in its own page.
Zbigniew Jędrzejewski-Szmek [Thu, 31 Jul 2014 08:01:01 +0000 (04:01 -0400)]
man: add missing comma
Zbigniew Jędrzejewski-Szmek [Thu, 31 Jul 2014 07:45:05 +0000 (03:45 -0400)]
sysusers: split users for remote into separate file
This mirrors the setup for tmpfiles.d done in
ad95fd1d2b9.
Zbigniew Jędrzejewski-Szmek [Thu, 31 Jul 2014 07:42:19 +0000 (03:42 -0400)]
systemd-analyze verify: improve error message
There's little sense in telling the user to look at the logs...
Zbigniew Jędrzejewski-Szmek [Thu, 31 Jul 2014 07:38:05 +0000 (03:38 -0400)]
core/load-fragment.c: correct argument sign and split up long lines
With everything on one line they are just harder to read.
Zbigniew Jędrzejewski-Szmek [Thu, 31 Jul 2014 07:28:37 +0000 (03:28 -0400)]
Properly report invalid quoted strings
$ systemd-analyze verify trailing-g.service
[./trailing-g.service:2] Trailing garbage, ignoring.
trailing-g.service lacks ExecStart setting. Refusing.
Error: org.freedesktop.systemd1.LoadFailed: Unit trailing-g.service failed to load: Invalid argument.
Failed to create trailing-g.service/start: Invalid argument
Zbigniew Jędrzejewski-Szmek [Wed, 30 Jul 2014 02:01:36 +0000 (22:01 -0400)]
Reject invalid quoted strings
String which ended in an unfinished quote were accepted, potentially
with bad memory accesses.
Reject anything which ends in a unfished quote, or contains
non-whitespace characters right after the closing quote.
_FOREACH_WORD now returns the invalid character in *state. But this return
value is not checked anywhere yet.
Also, make 'word' and 'state' variables const pointers, and rename 'w'
to 'word' in various places. Things are easier to read if the same name
is used consistently.
mbiebl_> am I correct that something like this doesn't work
mbiebl_> ExecStart=/usr/bin/encfs --extpass='/bin/systemd-ask-passwd "Unlock EncFS"'
mbiebl_> systemd seems to strip of the quotes
mbiebl_> systemctl status shows
mbiebl_> ExecStart=/usr/bin/encfs --extpass='/bin/systemd-ask-password Unlock EncFS $RootDir $MountPoint
mbiebl_> which is pretty weird
Zbigniew Jędrzejewski-Szmek [Tue, 29 Jul 2014 00:01:56 +0000 (20:01 -0400)]
test-strv: add test which shows access to random memory
Tom Gundersen [Wed, 30 Jul 2014 19:29:34 +0000 (21:29 +0200)]
networkd: don't assume udev_device_new_from_device_id sets errno
This reverts
6f4d55a8ae04e344a41fc2adef12ad99c2bb2927, as we cannot rely on errno here.
Reported by David Herrmann.
Lennart Poettering [Wed, 30 Jul 2014 18:39:52 +0000 (20:39 +0200)]
resolved: when we got a successful DNS reply, then only wait for other transactions on the same scope, nowhere else
Lennart Poettering [Wed, 30 Jul 2014 17:34:55 +0000 (19:34 +0200)]
update TODO
Lennart Poettering [Wed, 30 Jul 2014 17:34:50 +0000 (19:34 +0200)]
resolved: properly set TTL in SOA records
Lennart Poettering [Wed, 30 Jul 2014 17:24:05 +0000 (19:24 +0200)]
resolved: don't attempt to order empty answer array
Lennart Poettering [Wed, 30 Jul 2014 17:23:50 +0000 (19:23 +0200)]
resolved: properly return start index when appending RR to packet
Lennart Poettering [Wed, 30 Jul 2014 17:23:27 +0000 (19:23 +0200)]
resolved: add API for resolving specific RRs
Tom Gundersen [Wed, 30 Jul 2014 16:16:09 +0000 (18:16 +0200)]
networkd: improve error message when udev device can not be found
Reported by Raimonds Cicans <ray@apollo.lv>
Hong Shick Pak [Mon, 28 Jul 2014 04:10:01 +0000 (00:10 -0400)]
man: fix outdated example in systemd.network
The docs for the DHCP= was updated, but not the example.
Lennart Poettering [Wed, 30 Jul 2014 15:52:58 +0000 (17:52 +0200)]
resolved: properly pass empty answers back to bus clients
Lennart Poettering [Wed, 30 Jul 2014 15:52:21 +0000 (17:52 +0200)]
resolve-host: add reverse lookup support
Lennart Poettering [Wed, 30 Jul 2014 15:11:21 +0000 (17:11 +0200)]
resolve-host: use the usual log message when encountering a dbus parse failure
Tom Gundersen [Thu, 24 Jul 2014 23:13:47 +0000 (01:13 +0200)]
networkd: ipv4ll - configure link-local address independently of DHCPv4
This changes the behavior when both DHCPv4 and IPv4LL are enabled. Before,
we would disable IPv4LL when we got a DHCPv4 lease and enable it if the
lease was lost.
Now we just always set up both, if both are enabled, but the DHCPv4
addresses and routes will always take precedence due to their metric
and scope.
Kay Sievers [Wed, 30 Jul 2014 15:28:04 +0000 (17:28 +0200)]
TODO: update resolved
Zbigniew Jędrzejewski-Szmek [Wed, 16 Jul 2014 20:55:23 +0000 (22:55 +0200)]
resolved: add tool to query resolved
Lennart Poettering [Wed, 30 Jul 2014 14:30:25 +0000 (16:30 +0200)]
resolved: include SOA records in LLMNR replies for non-existing RRs to allow negative caching
Tom Gundersen [Wed, 30 Jul 2014 10:48:25 +0000 (12:48 +0200)]
TODO
Kay Sievers [Wed, 30 Jul 2014 13:19:26 +0000 (15:19 +0200)]
factory: remove broken pam_limits
Stupid PAM, please just go away!
login[26]: pam_limits(login:session): error parsing the configuration file: '/etc/security/limits.conf'
login[26]: pam_unix(login:session): session opened for user root by LOGIN(uid=0)
login[26]: Error in service module
Lennart Poettering [Wed, 30 Jul 2014 12:46:40 +0000 (14:46 +0200)]
resolved: fix cname handling
Lennart Poettering [Wed, 30 Jul 2014 12:21:18 +0000 (14:21 +0200)]
resolved: properly handle adding empty replies to cache
Lennart Poettering [Wed, 30 Jul 2014 09:27:05 +0000 (11:27 +0200)]
update TODO
Lennart Poettering [Wed, 30 Jul 2014 09:26:49 +0000 (11:26 +0200)]
resolved: never cache ANY lookups
Hannes Reinecke [Wed, 30 Jul 2014 08:10:46 +0000 (10:10 +0200)]
Martin Pitt [Wed, 30 Jul 2014 08:54:23 +0000 (10:54 +0200)]
keymap: Annotate all micmute workarounds
Add a comment to all assignments to f20 that this actually should be "micmute"
in a future when we aren't limited by X.org's key code limiations any more.
Hui Wang [Wed, 30 Jul 2014 08:09:08 +0000 (16:09 +0800)]
keymap: Add microphone mute keymap for Dell Latitude
On the Dell Latitude, the mic mute key event is generated by wmi
driver, the keycode assigned to this hotkey from kernel is
KEY_MICMUTE (248), this keycode is too big for xorg to handle,
in the xorg, the XF86AudioMicMute is assigned to F20.
Please refer to
4e648ea0 of xkeyboard-config.
BugLink: https://bugs.launchpad.net/bugs/1326684
BugLink: https://bugs.launchpad.net/bugs/1339998
Signed-off-by: Hui Wang <hui.wang@canonical.com>
Signed-off-by: Martin Pitt <martin.pitt@ubuntu.com>
Lukas Nykryn [Wed, 23 Jul 2014 10:49:14 +0000 (12:49 +0200)]
sysv: order initscripts which provide $network before network.target
Due to recent changes where $network "maps" to network-online.target
it is not guaranteed that initscript which provides networking will
be terminated after network.target during shutdown which is against LSB.