1
0
mirror of https://github.com/systemd/systemd.git synced 2024-11-01 17:51:22 +03:00
Commit Graph

18477 Commits

Author SHA1 Message Date
Lennart Poettering
40dba7022a hwdb: add two more mice to the DPI database 2014-12-10 17:38:47 +01:00
Lennart Poettering
43db910dac hwdb: add another Logitech mouse (M-BZ96C) 2014-12-10 15:59:38 +01:00
Lennart Poettering
d6d8f25599 TODO 2014-12-10 15:46:28 +01:00
Lennart Poettering
547b25d285 man: improve docs for systemd-modules-load.service 2014-12-10 15:46:22 +01:00
Lennart Poettering
85c24db1f7 hwdb: add DPI data for M325 mouse 2014-12-10 15:46:08 +01:00
Jan Synacek
0eb3cc8850 test: fix some tests when running inside a container 2014-12-10 13:36:10 +01:00
Lennart Poettering
536bfdab4c virt: when detecting containers and /run/systemd/container cannot be read, check /proc/1/environ
This way, we should be in a slightly better situation if a container is
booted up with only a shell as PID 1. In that case
/run/systemd/container will not be populated, and a check for it hence
be ineffective.

Checking /proc/1/environ doesn't fully fix the problem though, as the
file is only accessible with privileges. This means if PID 1 is not
systemd, and if privileges have been dropped the container detection
will continue to fail.
2014-12-10 13:36:10 +01:00
Zbigniew Jędrzejewski-Szmek
a644abed54 systemctl: fix invalid free when enabling sysv services fails
The error was introduced in v215-343-g60731f32f1 'systemctl: do not
bother to mutate state on error', by causing strv_free to attempt to
free a static string. Simplify the whole thing by always keeping the
array in valid state.
2014-12-09 21:47:53 -05:00
Zbigniew Jędrzejewski-Szmek
4dfb18922d ima-setup: simplify 2014-12-09 21:47:53 -05:00
Zbigniew Jędrzejewski-Szmek
553acb7b6b treewide: sanitize loop_write
loop_write() didn't follow the usual systemd rules and returned status
partially in errno and required extensive checks from callers. Some of
the callers dealt with this properly, but many did not, treating
partial writes as successful. Simplify things by conforming to usual rules.
2014-12-09 21:36:08 -05:00
Lennart Poettering
cb01aedc3b kdbus: downgrade warning if we cannot patch kdbus attach mask to DEBUG if kdbus is not available 2014-12-10 03:25:48 +01:00
Lennart Poettering
2822da4fb7 util: introduce our own gperf based capability list
This way, we can ensure we have a more complete, up-to-date list of
capabilities around, always.
2014-12-10 03:21:07 +01:00
Lennart Poettering
45823da23c update TODO 2014-12-10 02:36:42 +01:00
Lennart Poettering
b7c0182b2c build-sys: fix CLEANFILES= for dns_type list 2014-12-10 02:36:35 +01:00
Lennart Poettering
b730764239 mount: clarify that we really need to replace the utab inotify code with the native API for this in libmount, as soon as that's stable 2014-12-10 01:48:39 +01:00
Lennart Poettering
f7c1ad4fd4 core: unify how we iterate over inotify events
Let's add some syntactic sugar for iterating through inotify events, and
use it everywhere.
2014-12-10 01:48:39 +01:00
Lennart Poettering
df63dda6d4 mount: use bools where appropriate 2014-12-10 01:48:39 +01:00
Ronny Chevalier
f4e5c25cd7 catalog: fix typos in the French translation 2014-12-10 01:33:08 +01:00
Ronny Chevalier
409886c424 shell-completion: systemctl edit 2014-12-10 01:10:01 +01:00
Ronny Chevalier
17c29493dc NEWS: fix typos 2014-12-10 00:50:42 +01:00
Lennart Poettering
795bc7e791 gitignore: hide some more files 2014-12-10 00:49:35 +01:00
Lennart Poettering
8105cefa95 hwdb: update PCI, USB, OUI databases 2014-12-10 00:46:33 +01:00
Lennart Poettering
e7b04a8166 build-sys: don't fail if CAP_SETFCAP is missing 2014-12-10 00:42:17 +01:00
Peter Hutterer
eb59c75e9a hwdb: add more mouse DPI entries
Plus a note for Logitech devices using the unified receiver: these devices
include their wireless PID in the name, the usb PID/VID is the same for all.
In kernel 3.19 the actual model number will be the name, but the patches are
still a bit in flux at this point. In the future each device will need two
entries for pre+3.19 and 3.19.

https://bugs.freedesktop.org/show_bug.cgi?id=87037
https://bugs.freedesktop.org/show_bug.cgi?id=87072
https://bugs.freedesktop.org/show_bug.cgi?id=87162
2014-12-10 09:32:18 +10:00
Lennart Poettering
13e92f3966 NEWS: add contributors list 2014-12-10 00:30:19 +01:00
Lennart Poettering
f9e00a9f58 NEWS: prepare NEWS for new release 2014-12-10 00:27:26 +01:00
Lennart Poettering
a90e23051b nspawn: create the macvlan MAC addresses in an arch independent stable way 2014-12-10 00:26:16 +01:00
Michal Schmidt
f8b5a3b75f journal: optimize iteration: skip files that cannot improve current candidate entry
Suppose that while iterating we have already looked into a journal file
and got a candidate for the next entry. And we are considering to look
into another journal file because it may contain an entry that is nearer
to the current location than the candidate.

We should skip the whole journal file if we can tell by looking at its
header that none of its entries can precede the candidate.

Before:
$ time ./journalctl --since=2014-06-01 --until=2014-07-01 > /dev/null

real    0m20.518s
user    0m19.989s
sys     0m0.328s

After:
$ time ./journalctl --since=2014-06-01 --until=2014-07-01 > /dev/null

real    0m9.445s
user    0m9.228s
sys     0m0.213s
2014-12-09 21:45:11 +01:00
Michal Schmidt
b7c88ab8cc journal: optimize iteration: skip whole files behind current location
Interleaving of entries from many journal files is expensive. But there
is room for optimization.

We can skip looking into journal files whose entries all lie before the
current iterating location. We can tell if that's the case from looking
at the journal file header. This saves a huge amount of work if one has
many of mostly not interleaved journal files.

On my workstation with 90 journal files in /var/log/journal/ID/
totalling 3.4 GB I get these results:

Before:
$ time ./journalctl --since=2014-06-01 --until=2014-07-01 > /dev/null

real    5m54.258s
user    2m4.263s
sys     3m48.965s

After:
$ time ./journalctl --since=2014-06-01 --until=2014-07-01 > /dev/null

real    0m20.518s
user    0m19.989s
sys     0m0.328s

The high "sys" time in the original was caused by putting more stress on
the mmap-cache than it could handle. With the patch the working set
now consists of fewer mmap windows and mmap-cache is not thrashing.
2014-12-09 21:43:34 +01:00
Thomas Hindoe Paaboel Andersen
1372d5eff4 networkd: remove unused variable
It is no longer used after 45af44d47d
2014-12-09 20:51:58 +01:00
WaLyong Cho
adb76a701d unit: update unit dropin paths and time when dropin file is written.
If a unit is set property by "systemctl set-property", a new dropin
file is generated. But the unit's dropin_paths and dropin_mtime are
not updated. So the unit is shown as need daemon reload.
Update unit dropin_paths and dropin_mtime also when dropin file is
written.
2014-12-09 18:24:26 +01:00
Przemyslaw Kedzierski
dd5ae4c36c bus-proxy: cloning smack label
When dbus client connects to systemd-bus-proxyd through
Unix domain socket proxy takes client's smack label and sets for itself.

It is done before and independent of dropping privileges.

The reason of such soluton is fact that tests of access rights
performed by lsm may take place inside kernel, not only
in userspace of recipient of message.

The bus-proxyd needs CAP_MAC_ADMIN to manipulate its label.

In case of systemd running in system mode, CAP_MAC_ADMIN
should be added to CapabilityBoundingSet in service file of bus-proxyd.

In case of systemd running in user mode ('systemd --user')
it can be achieved by addition
Capabilities=cap_mac_admin=i and SecureBits=keep-caps
to user@.service file
and setting cap_mac_admin+ei on bus-proxyd binary.
2014-12-09 18:23:24 +01:00
WaLyong Cho
4c213d6cf4 run: introduce timer support option
Support timer options --on-active=, --on-boot=, --on-startup=,
--on-unit-active=, --on-unit-inactive=, --on-calendar=. Each options
corresponding with OnActiveSec=, OnBootSec=, OnStartupSec=,
OnUnitActiveSec=, OnUnitInactiveSec=, OnCalendar= of timer
respectively. And OnCalendar= and WakeSystem= supported by
--timer-property= option like --property= of systemd-run.

And if --unit= option and timer options are specified the command can
be omitted. In this case, systemd-run assumes the target service is
already loaded. And just try to generate transient timer unit only.
2014-12-09 18:19:40 +01:00
Lennart Poettering
e82959c0e3 update TODO 2014-12-09 18:17:35 +01:00
Lennart Poettering
3280236156 sd-bus: get rid of PID starttime concept
As kdbus no longer exports this, remove all traces from sd-bus too
2014-12-09 18:16:54 +01:00
Lennart Poettering
7dcd79c295 sd-bus: properly support passing memfds around with offset/size parameters 2014-12-09 18:07:46 +01:00
David Herrmann
77adde6382 bus: sync with kdbus-git (ABI break)
kdbus-git gained two new features:
 * memfd offsets: This allows to specify a 'start' offset in kdbus_memfd
                  so you can send partial memfd hunks instead of always
                  the full memfd
 * KDBUS_HELLO_UNPRIVILEGED: If passed during HELLO, the client will be
                             treated as unprivileged.
2014-12-09 11:14:55 +01:00
Dan Winship
fbf7dcb588 libsystemd-network: fix writing of routes in dhcp lease file
inet_ntoa() uses a static buffer, so you can't call it twice in the
same fprintf() call.
2014-12-09 09:38:13 +01:00
Lennart Poettering
a5ccdb9884 sleep: drop redundant MESSAGE= prefix 2014-12-09 03:58:20 +01:00
Lennart Poettering
bf27dcb613 update TODO 2014-12-09 03:58:10 +01:00
Wesley Dawson
8ee8e53648 journalctl: respect --after-cursor semantics with --follow in all cases
In the case where no entries have been added to the journal after the specified
cursor, set need_seek before the main loop to prevent display of the entry at
said cursor.
2014-12-09 02:40:16 +01:00
Lennart Poettering
b1491eba40 core: rename unit_destroy_cgroup() to unit_destroy_cgroup_if_empty() since it's not quite as destructive as it sounds nowadays 2014-12-09 02:31:42 +01:00
Ross Lagerwall
dab5bf8599 cgroup: Handle error when destroying cgroup
If a cgroup fails to be destroyed (most likely because there are still
processes running as part of a service after the main pid exits), don't
free and remove the cgroup unit from the manager.  This fixes a
regression introduced by the cgroup rework in v205 where systemd would
forget about processes still running after the unit becomes inactive.
(This can happen when the main pid exits and KillMode=process or none).
2014-12-09 02:28:09 +01:00
Michael Marineau
eb5800026d fstab-generator: Allow mount.usr without mount.usrflags, honor rw/ro
There is no need to require mount.usrflags. The original implementation
assumed that a btrfs subvolume would always be needed but that is not
applicable to systems that do not use btrfs for /usr.

Similar to using rootflags= for the default of mount.usrflags=, append
the classic 'ro' and 'rw' flags to the mount options.
2014-12-09 02:24:26 +01:00
Lennart Poettering
59cfa62f20 fstab-generator: free all allocated strings 2014-12-09 02:22:44 +01:00
Lennart Poettering
68ac53e62f units: make sure container-getty@.service stops restarting when the pts device it is bound to is gone
We only want to restart the getty as long as the pts device is still
around. As soon as it is gone, the service should be removed to.

http://lists.freedesktop.org/archives/systemd-devel/2014-December/026048.html
2014-12-09 02:12:11 +01:00
Lennart Poettering
088c357d13 update TODO 2014-12-09 02:05:19 +01:00
Lennart Poettering
e867ceb6b9 nspawn: make sure macvlan MAC addresses are stable
https://bugs.freedesktop.org/show_bug.cgi?id=85527
2014-12-09 01:20:09 +01:00
Lennart Poettering
3072eecf3c sd-rtnl: fix size check in sd_rtnl_message_append_string() 2014-12-09 01:09:21 +01:00
Lennart Poettering
4a02e68602 update TODO 2014-12-09 00:08:31 +01:00