chiark / gitweb /
Tom Gundersen [Tue, 20 May 2014 14:40:59 +0000 (16:40 +0200)]
dhcp-lease: refactor lease parsing
Use helper functions, and add some more sanity checking/asserts.
Tom Gundersen [Tue, 20 May 2014 11:07:19 +0000 (13:07 +0200)]
sd-dhcp: refactor parse_options
Similar to the previous patch, exchange a length and a pointer with only one offset variable.
Also fix the type of the options to be uint8_t[], rather than uint8_t*.
Tom Gundersen [Tue, 20 May 2014 09:04:50 +0000 (11:04 +0200)]
sd-dhcp: refactor dhcp_option_append
Store a pointer to the options in the DHCPMessage struct, and pass
this together with an offset around, rather than a uint8_t**.
This avoids us having to (re)compute the pointer; and changes
dhcp_option_append from adjusting both the pointer to the next
option and the remaining size of the options, to just adjusting
the current offset.
This makes the code a bit simpler to follow IMHO, but there should
be no functional change.
Lennart Poettering [Tue, 20 May 2014 15:04:11 +0000 (00:04 +0900)]
timesyncd: save clock to disk everytime we get an NTP fix, and bump clock at boot using this
This is useful to make sure the system clock stays monotonic even on
systems that lack an RTC.
Also, why we are at it, also use the systemd release time for bumping
the clock, since it's a slightly less bad than starting with jan 1st,
1970.
This also moves timesyncd into the early bootphase, in order to make
sure this initial bump is guaranteed to have finished by the time we
start real daemons which might write to the file systemd and thus
shouldn't leave 1970's timestamps all over the place...
Harald Hoyer [Tue, 20 May 2014 10:25:16 +0000 (12:25 +0200)]
udevadm-settle: fixed return code for empty queue
If the udev queue is empty and "/run/udev/queue" does not exist,
"udevadm settle" would return with EXIT_FAILURE, because the inotify on
"/run/udev/queue" would fail with ENOENT.
This patch lets "udevadm settle" exit with EXIT_SUCCESS in this case.
Susant Sahani [Mon, 19 May 2014 20:58:15 +0000 (22:58 +0200)]
TODO
IFLA_IPTUN_PMTUDISC
IFLA_IPTUN_FLAGS (ISA_TAP)
FLA_IPTUN_6RD_PREFIX
FLA_IPTUN_6RD_RELAY_PREFIX
IFLA_IPTUN_6RD_PREFIXLEN
IFLA_IPTUN_6RD_RELAY_PREFIXLEN
Susant Sahani [Thu, 15 May 2014 04:16:40 +0000 (09:46 +0530)]
networkd: introduce sit tunnel
This patch introduces sit tunnel support to networkd
Example conf:
file: sit.netdev
[NetDev]
Name=sit-tun
Kind=sit
MTUBytes=1480
[Tunnel]
Local=10.65.223.238
Remote=10.65.223.239
file: sit.network
[Match]
Name=em1
[Network]
Tunnel=sit-tun
[tomegun: rebased]
Tom Gundersen [Mon, 19 May 2014 19:57:10 +0000 (21:57 +0200)]
networkd-wait-online: wait for addresses to be configured
Tom Gundersen [Mon, 19 May 2014 18:46:54 +0000 (20:46 +0200)]
timesyncd: only attempt to connect when an address is configured
For now, we accept both link-local and routable addresses, maybe we want to
restrict ourselves to routable addresses only.
Tom Gundersen [Mon, 19 May 2014 18:44:21 +0000 (20:44 +0200)]
networkd/sd-network: extend operational states
Expose states 'degraded' or 'routable' if a link has a site/link-local or a routable address, respectively.
Tom Gundersen [Mon, 19 May 2014 16:42:14 +0000 (18:42 +0200)]
networkd/sd-network: expose statically configured NTP servers
Tom Gundersen [Mon, 19 May 2014 14:14:10 +0000 (16:14 +0200)]
networkd: fixup static DNS serialization
Tom Gundersen [Mon, 19 May 2014 15:44:38 +0000 (17:44 +0200)]
sd-dhcp-lease/sd-network: modernization and fix leak
Tom Gundersen [Sun, 18 May 2014 20:10:48 +0000 (22:10 +0200)]
resolved: add daemon to manage resolv.conf
Also remove the equivalent functionality from networkd.
Tom Gundersen [Sun, 18 May 2014 20:05:09 +0000 (22:05 +0200)]
sd-network: expose DNS information
Tom Gundersen [Sun, 18 May 2014 20:04:14 +0000 (22:04 +0200)]
networkd: link - serialize DNS information
Tom Gundersen [Sun, 18 May 2014 20:02:42 +0000 (22:02 +0200)]
sd-dhcp-lease: move in_addr (de)serialization to shared network code
Lennart Poettering [Mon, 19 May 2014 00:33:20 +0000 (09:33 +0900)]
sd-login: add C API to query primary session of a user
Lennart Poettering [Mon, 19 May 2014 00:03:20 +0000 (09:03 +0900)]
logind: fix Display property of user objects
When we dropped support for creating a per-user to the "main" X11
display we stopped returning useful data in the "Display" user property.
With this change this is fixed and we again expose an appropriate
(graphical session) in the property that is useful as the "main" one, if
one is needed.
Evan Nemerson [Sun, 18 May 2014 07:25:06 +0000 (00:25 -0700)]
gudev: add missing (nullable) annotations on return values
Lennart Poettering [Sun, 18 May 2014 16:54:31 +0000 (01:54 +0900)]
update TODO
Djalal Harouni [Wed, 23 Apr 2014 22:03:35 +0000 (23:03 +0100)]
analyze: read host and system information from remote
This makes "systemd-analyze plot" read host information from remote.
While we are it show if this is a virtualized system.
https://bugs.freedesktop.org/show_bug.cgi?id=76498
Reported-by: Zach <zachcook1991@gmail.com>
Djalal Harouni [Wed, 23 Apr 2014 22:03:34 +0000 (23:03 +0100)]
hostnamed: expose KernelVersion on the bus
This is needed to fix bug:
https://bugs.freedesktop.org/show_bug.cgi?id=76498
Reported-by: Zach <zachcook1991@gmail.com>
Cristian Rodríguez [Sun, 18 May 2014 15:46:42 +0000 (11:46 -0400)]
build: Compile everything with PIE
David Strauss [Mon, 28 Apr 2014 19:08:32 +0000 (12:08 -0700)]
core: Filter by state behind the D-Bus API, not in the systemctl client.
Lennart Poettering [Sun, 18 May 2014 15:47:26 +0000 (00:47 +0900)]
machined: make sure GetMachineAddresses() is available for unprivileged processes
Nis Martensen [Sun, 18 May 2014 13:43:18 +0000 (15:43 +0200)]
fix spelling of privilege
Lennart Poettering [Sun, 18 May 2014 11:49:14 +0000 (20:49 +0900)]
update TODO
Lennart Poettering [Sun, 18 May 2014 11:48:53 +0000 (20:48 +0900)]
machined: add logic to query IP addresses of containers
Lennart Poettering [Sat, 17 May 2014 19:32:13 +0000 (21:32 +0200)]
network: always take possession of host side of nspawn veth tunnels and do IPv4LL on them
Lennart Poettering [Sat, 17 May 2014 19:13:53 +0000 (21:13 +0200)]
update TODO
Lennart Poettering [Sat, 17 May 2014 19:13:10 +0000 (21:13 +0200)]
timesyncd: make use of floating event sources for signal handling
Lennart Poettering [Sat, 17 May 2014 19:11:00 +0000 (21:11 +0200)]
timesyncd: enable watchdog support
Lennart Poettering [Sat, 17 May 2014 18:33:47 +0000 (20:33 +0200)]
timesyncd: run timesyncd as unpriviliged user "systemd-timesync" (but still with CAP_SYS_TIME)
Michael Marineau [Sat, 17 May 2014 23:09:08 +0000 (16:09 -0700)]
man: note that entire sections can now be ignored
Prefixing a section name with "X-" will cause it and all of its contents
to be silently ignored as of commit
342aea19.
Tom Gundersen [Fri, 16 May 2014 19:25:46 +0000 (21:25 +0200)]
networkd: log - only log about udev initalization on debug level
Tom Gundersen [Thu, 15 May 2014 22:28:22 +0000 (00:28 +0200)]
networkd: keep list of active addresses
Tom Gundersen [Thu, 15 May 2014 22:27:56 +0000 (00:27 +0200)]
networkd: IP address equality
Tom Gundersen [Thu, 15 May 2014 22:26:37 +0000 (00:26 +0200)]
TODO
Thomas Hindoe Paaboel Andersen [Fri, 16 May 2014 21:46:48 +0000 (23:46 +0200)]
udev: avoid use of uninitialized err
After
1ea972174baba40dbc80c51cbfc4edc49764b59b err is no longer
set unless we hit a special case. Initialize it to 0 and remove
a check that will never fail.
Thomas Hindoe Paaboel Andersen [Fri, 16 May 2014 21:37:54 +0000 (23:37 +0200)]
systemctl: more cleanup
This is followup on
05cae7f3431446236139434ee58a6275f3cb31e8
I think the intention was to use the newly introduced 'path'
variable in the inner loop instead of p.
Michael Marineau [Fri, 16 May 2014 23:58:31 +0000 (16:58 -0700)]
conf-parser: silently ignore sections starting with "X-"
This allows external tools to keep additional unit information in a
separate section without scaring users with a big warning.
Jason St. John [Sat, 17 May 2014 02:52:17 +0000 (22:52 -0400)]
man: logind.conf: fix grammar issues, unclear wording, and unclear default values
Marcel Holtmann [Fri, 16 May 2014 22:57:35 +0000 (15:57 -0700)]
hwdb: Update database of Bluetooth company identifiers
Zbigniew Jędrzejewski-Szmek [Fri, 16 May 2014 03:27:59 +0000 (23:27 -0400)]
bus: fix unitialized variable access in error path
Tom Gundersen [Fri, 16 May 2014 18:14:23 +0000 (20:14 +0200)]
networkd: add missing files
Will Woods [Fri, 25 Apr 2014 22:26:34 +0000 (18:26 -0400)]
core: let selinux_setup() load policy more than once
When you switch-root into a new root that has SELinux policy, you're
supposed to to run selinux_init_load_policy() to set up SELinux and load
policy. Normally this gets handled by selinux_setup().
But if SELinux was already initialized, selinux_setup() skips loading
policy and returns 0. So if you load policy normally, and then you
switch-root to a new root that has new policy, selinux_setup() never
loads the new policy. What gives?
As far as I can tell, this check is an artifact of how selinux_setup()
worked when it was first written (see commit
c4dcdb9 / systemd v12):
* when systemd starts, run selinux_setup()
* if selinux_setup() loads policy OK, restart systemd
So the "if policy already loaded, skip load and return 0" check was
there to prevent an infinite re-exec loop.
Modern systemd only calls selinux_setup() on initial load and after
switch-root, and selinux_setup() no longer restarts systemd, so we don't
need that check to guard against the infinite loop anymore.
So: this patch removes the "return 0", thus allowing selinux_setup() to
actually perform SELinux setup after switch-root.
We still want to check to see if SELinux is initialized, because if
selinux_init_load_policy() fails *but* SELinux is initialized that means
we still have (old) policy active. So we don't need to halt if
enforce=1.
Mantas Mikulėnas [Sun, 27 Apr 2014 21:58:56 +0000 (00:58 +0300)]
logind: allow suspending if there are no displays
With proprietary graphics drivers, there won't be any 'drm' devices in
sysfs, so logind will never suspend the system upon closing the lid,
even if only one (internal) display is connected. This has been reported
by multiple users so far.
IMHO, it's better to suspend the system in this case for safety reasons,
to avoid having nvidia blob users' laptops overheat, for the same reason
that sleep inhibitors are overridden (LidSwitchIgnoreInhibited=yes).
Tom Gundersen [Fri, 16 May 2014 17:44:22 +0000 (19:44 +0200)]
networkd: manager - read fallback DNS servers from config file
We will still use the compiled-in defaults if no DNS entry exists in the config file.
Tom Gundersen [Fri, 16 May 2014 17:43:12 +0000 (19:43 +0200)]
networkd: network - store DNS servers in List rather than Set
This way we preserve the order of preference.
Tom Gundersen [Fri, 16 May 2014 15:34:43 +0000 (17:34 +0200)]
networkd: also add IPv6 DNS servers by default
Lennart Poettering [Fri, 16 May 2014 17:37:19 +0000 (19:37 +0200)]
nspawn: properly format container_uuid in UUID format
http://lists.freedesktop.org/archives/systemd-devel/2014-April/018971.html
Mantas Mikulėnas [Wed, 30 Apr 2014 16:53:13 +0000 (19:53 +0300)]
man: update journald rate limit defaults
This brings the man page back into sync with the actual code.
Tanu Kaskinen [Sat, 3 May 2014 08:52:13 +0000 (11:52 +0300)]
path-lookup: don't hardcode .config
If XDG_CONFIG_HOME is set, then we should respect that.
Tanu Kaskinen [Sat, 3 May 2014 08:52:12 +0000 (11:52 +0300)]
path-util: add path_make_relative()
In user_dirs() in path-lookup.c, I want to replace this:
symlink("../../../.config/systemd/user", data_home);
with
symlink(config_home, data_home);
to avoid hardcoding .config when XDG_CONFIG_HOME is set.
The problem is that config_home is an absolute path, and it's better
to make the symlink relative. path_make_relative() is an utility
function that converts an absolute path into a relative one.
Holger Hans Peter Freyther [Thu, 15 May 2014 17:07:43 +0000 (19:07 +0200)]
fsck: Allow to specify the fsck repair option in the cmdline
Some unattended systems do not have a console attached and entering
the default rescue mode will not be too helpful. Allow to specify
the "-y" option to attempt to fix all filesystem errors.
Manually verified by downloading an image.gz of e2fsprogs, using
losetup and running systemd-fsck on the loop device and varying
the fsck.repair=preen|yes|no option.
Tom Gundersen [Fri, 16 May 2014 13:24:09 +0000 (15:24 +0200)]
networkd: hardcode a set of default dns servers
Similarly to NTP servers, this can be set at compile-time.
Alison Chaiken [Fri, 16 May 2014 07:25:53 +0000 (09:25 +0200)]
man: readahead: fix cmdline switch inconsistency between readahead.c and docs
Source code has "files-max" and XML has --max-files.
Lennart Poettering [Fri, 16 May 2014 15:07:51 +0000 (17:07 +0200)]
readahead: modernizations
Lennart Poettering [Fri, 16 May 2014 14:51:56 +0000 (16:51 +0200)]
man: fix some minor language typos
Lennart Poettering [Fri, 16 May 2014 14:51:42 +0000 (16:51 +0200)]
build-sys: at configure check for verifying that ln supports --relative
Lennart Poettering [Fri, 16 May 2014 13:56:44 +0000 (15:56 +0200)]
network: always create /run/systemd/network/links
This ways the networkd client library should work even if networkd is
not running.
http://lists.freedesktop.org/archives/systemd-devel/2014-May/019242.html
Tom Gundersen [Fri, 16 May 2014 12:48:58 +0000 (14:48 +0200)]
Revert "networkd: order after udev kernel socket"
This reverts commit
a555350d47c4b70d716a63424933b34902c98300.
This did not fix the problem, just made it harder to hit.
Tom Gundersen [Fri, 16 May 2014 12:47:43 +0000 (14:47 +0200)]
networkd: log the initialization status of links
Tom Gundersen [Thu, 15 May 2014 22:26:37 +0000 (00:26 +0200)]
TODO
Tom Gundersen [Thu, 15 May 2014 21:14:52 +0000 (23:14 +0200)]
networkd: fix typo
Tom Gundersen [Thu, 15 May 2014 18:10:33 +0000 (20:10 +0200)]
networkd: rename Address and Route list fields
Kay Sievers [Thu, 15 May 2014 23:27:57 +0000 (01:27 +0200)]
timesyncd: fix typo in comment
Lennart Poettering [Thu, 15 May 2014 23:33:22 +0000 (01:33 +0200)]
man: clarify that the ExecReload= command should be synchronous
http://lists.freedesktop.org/archives/systemd-devel/2014-May/019054.html
Lennart Poettering [Thu, 15 May 2014 23:15:03 +0000 (01:15 +0200)]
core: make sure to serialize jobs for all units
Previously we wouldn't serialize jobs for units that themselves have
nothing to serialize.
http://lists.freedesktop.org/archives/systemd-devel/2014-May/019051.html
Lennart Poettering [Thu, 15 May 2014 22:23:26 +0000 (00:23 +0200)]
Update TODO
Kay Sievers [Thu, 15 May 2014 18:50:02 +0000 (20:50 +0200)]
timesyncd: fix error path return value
https://bugs.freedesktop.org/show_bug.cgi?id=78752
Lennart Poettering [Thu, 15 May 2014 16:55:19 +0000 (18:55 +0200)]
timesyncd: limit capabilities to CAP_SYS_TIME
Cristian Rodríguez [Tue, 13 May 2014 23:35:20 +0000 (19:35 -0400)]
network: fix build failure, missing KMOD_XXX flags
- Add KMOD_CFLAGS and KMOD_LIBS where appropiate
- networkd now requires kmod. make --disable-kmod --enable-networkd
to raise an error.
Lennart Poettering [Thu, 15 May 2014 16:30:07 +0000 (18:30 +0200)]
logind: bring polkit policy for hibernate in line with suspend/poweroff/reboot
THere's no reason why hibernate should be better protected then
suspendor poweroff, so sync the policies.
Tom Gundersen [Thu, 15 May 2014 15:43:14 +0000 (17:43 +0200)]
networkd: logging - align messages
Tom Gundersen [Thu, 15 May 2014 13:54:28 +0000 (15:54 +0200)]
networkd: log ifindices when links and netdevs are added
Tom Gundersen [Thu, 15 May 2014 13:48:37 +0000 (15:48 +0200)]
networkd: rename NetDev variable for consistency with Link
Lennart Poettering [Thu, 15 May 2014 15:54:32 +0000 (17:54 +0200)]
sd-bus: make sure we properly handle NULL callback functions
Lennart Poettering [Thu, 15 May 2014 15:48:28 +0000 (17:48 +0200)]
selinux: fix build for non-selinux systems
Lennart Poettering [Thu, 15 May 2014 15:42:39 +0000 (17:42 +0200)]
sd-bus: fix an assert when running in kdbus mode
Lennart Poettering [Thu, 15 May 2014 15:31:14 +0000 (17:31 +0200)]
resolve: fix copy/paste error
Lennart Poettering [Thu, 15 May 2014 15:26:02 +0000 (17:26 +0200)]
sd-bus: don't hit assert when installing match
Lennart Poettering [Thu, 15 May 2014 15:25:46 +0000 (17:25 +0200)]
update TODO
Lennart Poettering [Thu, 15 May 2014 15:08:24 +0000 (17:08 +0200)]
sd-bus: always keep slot reference while dispatching callback
Also, make sure we automatically destroy reply callbacks that are
floating.
Lennart Poettering [Thu, 15 May 2014 14:34:38 +0000 (16:34 +0200)]
sd-resolve: add "floating" resolve queries
Same story as for sd-bus and sd-event: allow passing NULL to store query
in in which case the query is freed automatically.
Lennart Poettering [Wed, 14 May 2014 23:55:18 +0000 (01:55 +0200)]
sd-event: introduce concept of "floating" event sources
These are the counterpart of "floating" bus slots, i.e. event sources
that are bound to the lifetime of the event object itself, and thus
don't require an explicit reference to be kept.
Zbigniew Jędrzejewski-Szmek [Tue, 13 May 2014 21:22:13 +0000 (23:22 +0200)]
core: close socket fds asynchronously
http://lists.freedesktop.org/archives/systemd-devel/2014-April/018928.html
Zbigniew Jędrzejewski-Szmek [Thu, 24 Apr 2014 15:23:38 +0000 (17:23 +0200)]
systemctl: small cleanup
Zbigniew Jędrzejewski-Szmek [Wed, 14 May 2014 13:44:19 +0000 (09:44 -0400)]
readahead: add test to show fs_on_ssd() result
Zbigniew Jędrzejewski-Szmek [Sun, 11 May 2014 12:34:26 +0000 (08:34 -0400)]
networkd, build-sys: spelling fix
Zbigniew Jędrzejewski-Szmek [Fri, 18 Apr 2014 02:12:25 +0000 (22:12 -0400)]
Make sure that keys are properly removed from hashmap
This is a speculative fix for https://bugzilla.redhat.com/show_bug.cgi?id=
1088865.
Even though I cannot find a code path that where this would be
an issue, for consistency, if we assume that cgroup_path might have
been set before we got to unit_deserialize, we should make sure that
the unit is removed from the hashmap before we free the key. This seems
to be the only place where the key could be prematurely freed, leading to
hashmap corruption.
Zbigniew Jędrzejewski-Szmek [Fri, 25 Apr 2014 11:45:15 +0000 (07:45 -0400)]
Remove unnecessary casts in printfs
No functional change expected :)
Zbigniew Jędrzejewski-Szmek [Thu, 24 Apr 2014 05:44:10 +0000 (01:44 -0400)]
Make systemctl --root look for files in the proper places
Running systemctl enable/disable/set-default/... with the --root
option under strace reveals that it accessed various files and
directories in the main fs, and not underneath the specified root.
This can lead to correct results only when the layout and
configuration in the container are identical, which often is not the
case. Fix this by adding the specified root to all file access
operations.
This patch does not handle some corner cases: symlinks which point
outside of the specified root might be interpreted differently than
they would be by the kernel if the specified root was the real root.
But systemctl does not create such symlinks by itself, and I think
this is enough of a corner case not to be worth the additional
complexity of reimplementing link chasing in systemd.
Also, simplify the code in a few places and remove an hypothetical
memory leak on error.
Zbigniew Jędrzejewski-Szmek [Mon, 21 Apr 2014 23:17:40 +0000 (19:17 -0400)]
shared/install: do not prefix created symlink with root path
Before: /var/tmp/inst1//etc/systemd/system/default.target -> /var/tmp/inst1//usr/lib/systemd/system/graphical.target
After: /var/tmp/inst1/etc/systemd/system/default.target -> /usr/lib/systemd/system/graphical.target
Eelco Dolstra [Thu, 15 May 2014 11:11:00 +0000 (13:11 +0200)]
Fix typos in systemctl manpage
Kay Sievers [Tue, 13 May 2014 22:34:49 +0000 (00:34 +0200)]
udev: do not skip the execution of RUN when renaming a network device fails
Lennart Poettering [Wed, 14 May 2014 23:15:30 +0000 (01:15 +0200)]
sd-bus: introduce sd_bus_slot objects encapsulating callbacks or vtables attached to a bus connection
This makes callback behaviour more like sd-event or sd-resolve, and
creates proper object for unregistering callbacks.
Taking the refernce to the slot is optional. If not taken life time of
the slot will be bound to the underlying bus object (or in the case of
an async call until the reply has been recieved).
Lennart Poettering [Wed, 14 May 2014 22:44:29 +0000 (00:44 +0200)]
sd-event: reorder header slightly
Lennart Poettering [Wed, 14 May 2014 22:43:44 +0000 (00:43 +0200)]
hashmap: add hashmap_remove2() to remove item from hashtable and return both value and key