Commit graph

13976 commits

Author SHA1 Message Date
Thomas Hindoe Paaboel Andersen b5cfa7408c analyze: fix plot issues when using gummiboot
It would crash and the legend in the bottom followed the time 0.0.
2014-01-31 07:12:43 +01:00
Zbigniew Jędrzejewski-Szmek 498f8a39e6 tmpfiles: fix memory leak of exclude_prefixes
Missed in 5c795114.
2014-01-30 22:53:01 -05:00
Tom Gundersen ba91431154 shared: net - use u32ctz to compute prefixlen 2014-01-30 17:23:34 +01:00
Tom Gundersen 32216660c7 TODO: update sd-rtnl section 2014-01-30 17:19:10 +01:00
Lennart Poettering ec417ccc27 util: add u32ctz() call for determining ctz of uint32_t 2014-01-30 16:47:18 +01:00
Tom Gundersen 50add2909c networkd: netdev - reduce chance of race when receiving netdev's ifindex
When creating a new link, the kernel will not inform us about the new ifindex
in its ack. We have to listen for newly created devices and deduce the new
ifindex by matching on the ifname.

We used to do this by waiting for a new device from libudev, but that is asking
for trouble, as udev will happily rename the device before handing it to us.
Listen on rtnl instead, the chance of the name being changed before reaching us
is much smaller (if not nil).

Kernel patch in the works to make this unneccessary.
2014-01-30 14:30:39 +01:00
Tom Gundersen 3815f36f05 sd-rtnl: beef up rtnl-util a bit 2014-01-30 14:30:39 +01:00
Tom Gundersen 377a218f87 sd-dhcp-client/net-util: make netmask_to_prefixlen generic
This was originally included in the dhcp-client at my request, but it is not
really dhcp-specific and useful outside of it, so let's pull it out.
2014-01-30 14:30:39 +01:00
Tom Gundersen eb0ea358b6 networkd: address - add support for broadcast 2014-01-30 14:30:39 +01:00
Tom Gundersen 801bd9e859 net-util: verify the address family
Error out if the address family is already set to something incompatible with the
address being parsed.
2014-01-30 14:30:39 +01:00
Tom Gundersen eb27aeca24 networkd: dhcpv4 - add notion of 'CriticalConnection'
These connections are never torn down, even when the DHCP specifications say that
they should be. This is useful/necessary when the rootfs (or another critical fs)
is mounted over this network connection, and dataloss would result if the connection
is lost.

This option defaults to off, but our initrd generator (TBD) will enable it when
applicable.
2014-01-30 14:30:39 +01:00
Lennart Poettering e7fb33ffef utmp: make sure we don't write the utmp reboot record twice on each boot
(Also, only send the audit msg once, too)
2014-01-30 14:18:46 +01:00
Lennart Poettering 1cea22a5e3 update-utmp: code modernizations 2014-01-30 13:28:56 +01:00
Lennart Poettering 084f83586e update TODO 2014-01-29 21:26:57 +01:00
Lennart Poettering 7b217f41d2 bus: when proxying messages from the bus driver patch the driver's well-known name into the sender 2014-01-29 21:26:57 +01:00
Lennart Poettering e7b251913e bus: the owner of the bus driver name as reported by the driver's
GetNameOwner() bus call is the bus driver name itself, for compatibility
with dbus1
2014-01-29 21:07:50 +01:00
Lennart Poettering 40ddbdf85b nspawn: fix reboot event fd reuse 2014-01-29 20:58:50 +01:00
Lennart Poettering bc6aed7b8b core: in containers, don't wait for cgroup empty notifications which will never come 2014-01-29 20:12:18 +01:00
Lennart Poettering 6294b8a92d core: use a bit more PID_FMT 2014-01-29 17:46:47 +01:00
Lennart Poettering ac84d1fb5a core: make sure to always go through both SIGTERM and SIGKILL states of units
Given that we now have KillMode=mixed where SIGTERM might kill a smaller
set than SIGKILL we need to make sure to always go explicitly throught
the SIGKILL state to get the right end result.
2014-01-29 17:46:47 +01:00
Martin Pitt c9cf047362 keymap: Add Toshiba EQUIUM
Thanks Aleksander Kowalski <aleksander.kowalski.1@gmail.com>!
2014-01-29 16:14:14 +01:00
Lennart Poettering ebc2259da1 service: allow KillMode=mixed in conjunction with PAMName= 2014-01-29 13:49:54 +01:00
Lennart Poettering 58ea275a68 core: introduce new KillMode=mixed which sends SIGTERM only to the main process, but SIGKILL to all daemon processes
This should fix some race with terminating systemd --user, where the
system systemd instance might race against the user systemd instance
when sending SIGTERM.
2014-01-29 13:42:06 +01:00
Lennart Poettering 373f14222e bus: fake security labels again
(The kernel module got fixed, so let's reenable this again)
2014-01-29 13:42:06 +01:00
Zbigniew Jędrzejewski-Szmek 38180c8568 man: remove erroneous history section 2014-01-28 22:02:34 -05:00
Zbigniew Jędrzejewski-Szmek 6b02bce759 manager: remove "debugging" "feature" 2014-01-28 21:57:42 -05:00
Zbigniew Jędrzejewski-Szmek e5723c894d manager: requeue the cylon eye for 5s later when a job finishes
We'd reqeue the next status update very soon after. Change it so that we wait
for full 5s without any job status changes until we print anything.
2014-01-28 19:07:13 -05:00
Zbigniew Jędrzejewski-Szmek 8bb310c3c6 manager: print ephemeral information about running jobs' timeouts (v2)
This reverts commit 28c758de94
but makes job_coldplug smarter.

In (v1) I changed the job start timestamp to be always set, so the
start time can be reported in the cylon eye message.  The bug was that
when deserializing jobs, they would be ignored if their start
timestamp was unset which was synonymous with no timeout. But after
the change, jobs would have a start timestamp set despite having no
timeout. After deserialization they would be considered immediately
expired. Fix this by checking if the timeout is not zero when
considering jobs for expiration.
2014-01-28 19:07:13 -05:00
Zbigniew Jędrzejewski-Szmek 0f010ef213 Base mkostemp_safe on mkostemp
It is nice to wrap umask handling and return convention,
but glibc's mkostemp is async-signal-safe already.
2014-01-28 19:07:13 -05:00
Zbigniew Jędrzejewski-Szmek 87b0284327 Get rid of write_safe
Current glibc implementation is safe. Kernel does this atomically,
and write is actually implemented through writev. So if write is
async-signal-safe, than writev pretty much must be too.
2014-01-28 19:07:12 -05:00
Martin Pitt 7b36bf82c4 keymap: Add Sony Vaio VGN-FW250
https://launchpad.net/bugs/1271163
2014-01-28 18:14:18 +01:00
Martin Pitt 1e091c1285 keymap: Add release quirk for Acer AOA switchvideomode key
https://launchpad.net/bugs/1272658
2014-01-28 18:10:12 +01:00
Zbigniew Jędrzejewski-Szmek 3320e22a5d build-sys: disable lto also for libsystemd-id128
Another instance of https://sourceware.org/bugzilla/show_bug.cgi?id=16504.
2014-01-28 10:40:41 -05:00
Lennart Poettering 2d5bdf5bc0 always use the same code for creating temporary files
Let's unify our code here, and also always specifiy O_CLOEXEC.
2014-01-28 13:47:35 +01:00
Lennart Poettering 7736202ce9 util: pick slightly safer open() flags when creating temporary files 2014-01-28 13:26:48 +01:00
Lennart Poettering c09918f97a util: define O_TMPFILE on x86/x86-64, where the generic value is used
On other archs we'll not define it so that open_tmpfile() falls back to
unguessable name + unlink.
2014-01-28 13:25:51 +01:00
Lennart Poettering a6afc4aeaa util: pass original flags value to mkostemp(), in open_tmpfile() 2014-01-28 13:09:14 +01:00
Lennart Poettering d37a91e860 util: simplify mkostemp_safe()
Make it use dev_urandom() and endswith().
2014-01-28 13:08:34 +01:00
Lennart Poettering b89446bb33 util: introduce new dev_urandom() call that is like random_bytes() but doesn't fall back to PRNG 2014-01-28 13:07:28 +01:00
Lennart Poettering 7d5dd5e0cf util: modernize loop_read() and loop_write() a bit
Let's make use of fd_wait_for_event() here, instead of rolling our own.
2014-01-28 13:06:44 +01:00
Lennart Poettering 69727e6dc6 bus: reorder a few things 2014-01-28 12:33:40 +01:00
Kay Sievers cbe72e30eb bus: update kdbus.h (ABI break) 2014-01-28 12:07:20 +01:00
Kay Sievers 28c758de94 Revert "manager: print ephemeral information about running jobs' timeouts"
This reverts commit 2cba2e0352.

It breaks bootup with dracut, the transition to the real rootfs fails.
2014-01-28 12:03:23 +01:00
Zbigniew Jędrzejewski-Szmek cb8ccb2271 manager: also turn on output on unit failure 2014-01-27 23:17:03 -05:00
Zbigniew Jędrzejewski-Szmek d450b6f2a9 manager: add systemd.show_status=auto mode
When set to auto, status will shown when the first ephemeral message
is shown (a job has been running for five seconds). Then until the
boot or shutdown ends, status messages will be shown.

No indication about the switch is done: I think it should be clear
for the user that first the cylon eye and the ephemeral messages appear,
and afterwards messages are displayed.

The initial arming of the event source was still wrong, but now should
really be fixed.
2014-01-27 23:17:03 -05:00
Zbigniew Jędrzejewski-Szmek 65b3903ff5 journal: guarantee async-signal-safety in sd_journald_sendv
signal(7) provides a list of functions which may be called from a
signal handler. Other functions, which only call those functions and
don't access global memory and are reentrant are also safe.
sd_j_sendv was mostly OK, but would call mkostemp and writev in a
fallback path, which are unsafe.

Being able to call sd_j_sendv in a async-signal-safe way is important
because it allows it be used in signal handlers.

Safety is achieved by replacing mkostemp with open(O_TMPFILE) and an
open-coded writev replacement which uses write. Unfortunately,
O_TMPFILE is only available on kernels >= 3.11. When O_TMPFILE is
unavailable, an open-coded mkostemp is used.

https://bugzilla.gnome.org/show_bug.cgi?id=722889
2014-01-27 23:17:02 -05:00
Zbigniew Jędrzejewski-Szmek 8e33886ec5 Replace mkostemp+unlink with open(O_TMPFILE)
This will only work on Linux >= 3.11, and probably not on all
filesystems. Fallback code is provided.
2014-01-27 23:17:02 -05:00
Lennart Poettering 847657c769 bus: update bloom filter description a bit 2014-01-28 01:05:32 +01:00
Lennart Poettering b28ff39f42 bus: rework bloom filter logic to operate with variable bloom filter
sizes and numbers of hash functions

In order to make the bloom filter logic more future proof communicate
bloom filter parameters from the original bus creator to the clients,
and allow them to be variable within certain ranges.
2014-01-28 00:57:38 +01:00
Lennart Poettering af08d2f9cd bus: add API calls for connecting to starter bus
Add new calls sd_bus_open() and sd_bus_default() for connecting to the
starter bus a service was invoked for, or -- if the process is not a
bus-activated service -- the appropriate bus for the scope the process
has been started in.
2014-01-27 21:34:54 +01:00