Commit graph

15012 commits

Author SHA1 Message Date
Daniel Mack 4433c995c7 completions: fix/augment zsh completions for systemd-nspawn, busctl, loginctl, hostnamectl, localectl, machinectl 2014-03-25 23:05:03 +01:00
Jason St. John 10b17992ee src/systemd: fix grammar and spelling errors in comments 2014-03-25 20:23:33 +01:00
Lennart Poettering 3b5b000fbc build-sys: prepare 212 2014-03-25 20:22:41 +01:00
Lennart Poettering 51c61cda1a build-sys: prepare NEWS for 212 2014-03-25 15:19:57 +01:00
Susant Sahani 9a6704a81f sd-rtnl: add support for tunnel attributes
Added support for tunneling netlink attrributes (ipip, gre, sit).
These works with kernel module ipip, gre and sit . The test cases are
moved to a separate file and manual test as well because they require
respective kernel modules as well.
2014-03-25 14:44:33 +01:00
Tom Gundersen 41ca2c206b sd-rtnl: message - don't try to enter unsupported containers
Currently we only support containers in RTM_*LINK messages.

Reported-by: "Thomas H.P. Andersen <phomes@gmail.com>"
2014-03-25 12:05:59 +01:00
Lennart Poettering 5ba6e0949c time: support @ syntax for denoting times since the UNIX epoch 1970-1-1 2014-03-25 04:08:16 +01:00
Lennart Poettering a2b135e3d8 update TODO 2014-03-25 02:11:52 +01:00
Lennart Poettering 67608cad23 util: consider both fuse.glusterfs and glusterfs network file systems
Based on a similar patch by Lukáš Nykrýn.
2014-03-25 01:46:24 +01:00
Lennart Poettering 981e4cd325 ask-password: modernizations 2014-03-25 01:30:19 +01:00
Lennart Poettering 036eeac5a1 ask-password: when the user types a overly long password, beep and refuse
Based on a similar patch from David Härdeman.
2014-03-25 01:27:45 +01:00
Lennart Poettering af7424af70 systemctl: add more verbose explanation of --kill-who and what control/main processes are 2014-03-25 00:51:22 +01:00
Lennart Poettering 0088d63151 systemctl: --kill-mode is long long gone, don't mention it in the man page 2014-03-25 00:31:48 +01:00
Lennart Poettering 905826156d man: be more specific when EnvironmentFile= is read
http://lists.freedesktop.org/archives/systemd-devel/2014-March/018004.html
2014-03-25 00:26:09 +01:00
Lennart Poettering d2753d2200 man: explain that the journal field SYSLOG_IDENTIFIER is usually derived from program_invocation_short_name 2014-03-25 00:10:41 +01:00
Lennart Poettering b107b705cc update TODO 2014-03-25 00:03:23 +01:00
Lennart Poettering 7514578081 sd-event: don't accidentally turn of watchdog timer event if we determine 0 2014-03-25 00:01:51 +01:00
Lennart Poettering 52444dc478 sd-event: initialization perturbation value right before we use it
That way, we don't forget to initialize it when the watchdog is
initialized before all event sources.
2014-03-24 23:54:21 +01:00
Lennart Poettering 56dc9aec21 sd-daemon: fix incorrect variable access 2014-03-24 23:54:14 +01:00
Lennart Poettering ac1a87b9f2 cryptsetup: minor typo fix 2014-03-24 23:46:13 +01:00
Lennart Poettering 79e16ce3bf networkd: fix a couple of memory leaks 2014-03-24 23:46:13 +01:00
Tom Gundersen c3ebdce39a networkd: netdev - fix error handling in set_ifindex()
Firstly, remove stray assert(). Also be a bit stricter when verifying the
received info. If we get an applicable newlink message that we can't make
sense of, we will now enter NETDEV_FAILED, as we cannot reasonably continue
without knowing the ifindex of our device.
2014-03-24 22:09:06 +01:00
Lennart Poettering c4bfd1691f core: don't try to relabel mounts before we loaded the policy 2014-03-24 21:04:02 +01:00
Jason St. John 07a062a793 timedate: fix numerous grammar errors in comments and output/debug messages 2014-03-24 20:49:34 +01:00
Tom Gundersen 3caf0bc89b sd-rtnl: tests - drop redundant tests
These tests were both broken and redundant, so let's drop them.
2014-03-24 20:40:34 +01:00
Marc-Antoine Perennou e43e3e3eed libsystemd: Don't use "class" in public headers
For compatibility with C++
2014-03-24 20:36:57 +01:00
Lennart Poettering 7f8aa67131 core: remove tcpwrap support
tcpwrap is legacy code, that is barely maintained upstream. It's APIs
are awful, and the feature set it exposes (such as DNS and IDENT
access control) questionnable. We should not support this natively in
systemd.

Hence, let's remove the code. If people want to continue making use of
this, they can do so by plugging in "tcpd" for the processes they start.
With that scheme things are as well or badly supported as they were from
traditional inetd, hence no functionality is really lost.
2014-03-24 20:07:42 +01:00
Lennart Poettering 1cfc57e884 build-sys: add makefile link 2014-03-24 19:57:29 +01:00
Lennart Poettering 1c07b16c2f service: don't take chkconfig priority into account
Given that native services do not carry a sysv priority anyway it is
pointless reading them from chkconfig headers, and pretend they'd work.
So let's drop this.
2014-03-24 19:57:28 +01:00
Tom Gundersen 6c7c89dfc6 networkd: add CapabilityBoundingSet 2014-03-24 17:13:24 +01:00
Tom Gundersen e634cd4096 sd-rtnl: message parsing - log when ignoring message attributes 2014-03-24 16:59:31 +01:00
Tom Gundersen d39edfc72f networkd: netdev - verify that newlink messages has the expected kind
We match 'newlink' messages with expected netdev's based on their names. Now also
make sure that the receieved link has the expected kind.
2014-03-24 16:59:30 +01:00
Tom Gundersen 3dd215e056 sd-rtnl: add sd_rtnl_message_enter_container()
Extend rta_offset_tb into a stack of offset tables, one for each parent of the
current container, and make sd_rtnl_message_{enter,exit}_container() pop/push
to this stack.

Also make sd_rtnl_message_rewind() parse the top-level container, and use this
when reading a message from the socket.

This changes the API by dropping the now redundant sd_rtnl_message_read()
method.
2014-03-24 16:59:30 +01:00
Lennart Poettering 48791a98be units: networkd shouldn't have PrivateTmp= set, since it runs in early-boot
/tmp is only available in later boot, and we shouldn't create private
subdirs in it hence, while we are still in early boot.
2014-03-24 16:48:39 +01:00
Lennart Poettering 777920bc03 update TODO 2014-03-24 16:24:07 +01:00
Lennart Poettering bd8f585b99 core: add a setting to globally control the default for timer unit accuracy 2014-03-24 16:24:07 +01:00
Lennart Poettering dedabea4b3 timer: support timers that can resume the system from suspend 2014-03-24 16:24:07 +01:00
Daniel Mack e955c45881 sd-bus: invert bus->is_kernel check in sd_bus_get_peer_creds()
The bug was introducted in a3d59cd1 ("sd-bus: don't use assert_return()
to check for disconnected bus connections")
2014-03-24 14:45:34 +01:00
Gerd Hoffmann cd31d1884f rules: update qemu hid rules
Update comment to be a bit more specific.

Change match to blacklist the serial number of the broken devices
instead of whitelisting the serial number of the fixed devices.
This allows to do something useful with the serial number in the
future.
2014-03-24 08:30:57 -04:00
Lennart Poettering d784e2dbac systemctl: show last trigger time in "systemctl list-timers" 2014-03-24 03:42:17 +01:00
Lennart Poettering 3d94f76c99 util: replace close_pipe() with new safe_close_pair()
safe_close_pair() is more like safe_close(), except that it handles
pairs of fds, and doesn't make and misleading allusion, as it works
similarly well for socketpairs() as for pipe()s...
2014-03-24 03:22:44 +01:00
Lennart Poettering 6a0f1f6d5a sd-event: rework API to support CLOCK_REALTIME_ALARM and CLOCK_BOOTTIME_ALARM, too 2014-03-24 02:58:41 +01:00
Tom Gundersen f66eeb6bb6 sd-rtnl: message - protect against SEGFAULT when reading messages
Make sure the returned data fits the datatype we requested. Otherwise return -EIO.

Also fix a broken test that this exposed.
2014-03-23 21:54:16 +01:00
Tom Gundersen a212d0dadd sd-rtnl: message - don't skip parts of message when parsing
If a message type occurs repeatedly let the last one win.

Also, don't skip type == MAX.

Based on patch from: Susant Sahani <susant@redhat.com>
2014-03-23 17:51:23 +01:00
David Herrmann 374c356979 sd-bus: mark sd_bus_unref() as broken regarding self-refs
If you allocate a message with bus==NULL and then unref the main bus,
it will free your message underneath and your program will go boom!

To fix that, we really need to figure out what the semantics for
self-references (m->bus) should be and when/where/what accesses are
actually allowed.

Same is true for the pseudo-thread-safety we employ..
2014-03-22 19:35:25 +01:00
Kay Sievers 23aedd0294 README: update 2014-03-22 18:28:47 +01:00
Thomas Bächler f33016ff8b README: Correct EFI requirements
systemd does not need or use CONFIG_EFI_VARS anywhere, this should
be CONFIG_EFIVAR_FS instead.
2014-03-22 18:22:52 +01:00
David Herrmann eb33a6f858 sd-bus: add note about sd_bus_unref() recursion
In sd_bus_unref() we check for self-reference loops and destruct our
queues in case we're the only reference holders. However, we do _not_
modify our own ref-count, thus effectively causing the
message-destructions to enter with the same reference count as we did.

The only reason this doesn't cause an endless recursion (or trigger
assert(m->n_ref > 0) in sd_bus_message_unref()) is the fact that we
decrease queue-counters _before_ calling _unref(). That's not obvious at
all, so add a big fat note in bus_reset_queues() to everyone touching that
code.
2014-03-22 18:06:38 +01:00
David Herrmann 22fdeadcc0 sd-rtnl: fix self-reference leaks
Like sd-bus, sd-rtnl can have self-references through queued messages. In
particular, each queued message has the following self-ref loop:
  rtnl->wqueue[i]->rtnl == rtnl
Same is true for "rqueue".

When sd_rtnl_unref() gets called, we must therefore make sure we correctly
consider each self-reference when deciding to destroy the object. For each
queued message, there _might_ be one ref. However, rtnl-messages can be
created _without_ a bus-reference, therefore we need to verify the
actually required ref-count.

Once we know exactly how many self-refs exist, and we verified none of the
queued messages has external references, we can destruct the object.
We must immediately drop our own reference, then flush all queues and
destroy the bus object. Otherwise, each sd_rtnl_message_unref() call would
recurse into the same destruction logic as they enter with the same
rtnl-refcnt.

Note: We really should verify _all_ queued messages have m->rtnl set to
      the bus they're queued on. If that's given, we can change:
        if (REFCNT_GET(rtnl->n_ref) <= refs)
      to
        if (REFCNT_GET(rtnl->n_ref) == refs)
      and thus avoid recalculating the required refs for each message we
      remove from the queue during destruction.
2014-03-22 18:00:03 +01:00
Tom Gundersen 2afa65c312 sd-dhcp-client: test - don't close socket twice
One end of the socketpair is closed by the library, so only close our end. Also switch to
the safe_close() so we get notified about problems with closing.
2014-03-22 10:52:49 +01:00