1
0
mirror of https://github.com/systemd/systemd.git synced 2025-01-17 06:04:07 +03:00

29740 Commits

Author SHA1 Message Date
WaLyong Cho
217f95db7b smack: handling smack onlycap list ()
To support smack onlycap, read onlycap list from /etc/smack/onlycap and write
to /sys/fs/smackfs/onlycap.

https://lwn.net/Articles/292128/
http://lkml.iu.edu/hypermail/linux/kernel/1505.2/04718.html
http://schaufler-ca.com/description_from_the_linux_source_tree
2017-06-26 21:00:03 +02:00
Lennart Poettering
b1d25c25e1 Merge pull request from richardmaw-codethink/networkd-carrier-fixes
Networkd fixes related to carrier status
2017-06-26 20:55:36 +02:00
Lennart Poettering
60675884cb systemctl: quieten a few more messages if -q is specified
As suggested by @mbiebl in https://github.com/systemd/systemd/pull/6199
2017-06-26 20:42:08 +02:00
Lennart Poettering
dc38f65a72 importd: log more information when renaming files 2017-06-26 20:32:40 +02:00
Lennart Poettering
e0061812b0 import: remove misplaced assert()
We shouldn't assume the final path for the settings file is already
known, it unlikely is unless we already downloaded the image once. Also
add some commenting to explain the code surrounding the assert a bit.

Fixes: 
2017-06-26 20:25:07 +02:00
Lennart Poettering
40f355052f sd-bus: use GetConnectionCredentials() when querying credentials, if available
Newer D-Bus versions implement the GetConnectionCredentials() driver
call to get all connection creds in one go. Make use of that to reduce
the number of bus calls we do.

When only a single credential field is queried we will still use the old
calls, which we'll also use if the new call isn't implemented.
2017-06-26 18:52:47 +02:00
Lennart Poettering
51c7d5aa36 sd-bus: when credentials of the "org.freedesktop.DBus" service are queried return the bus owner's credentials
The bus driver service is always implemented by the owner of the bus,
hence let's shortcut the credential operation and use our cached data.
This makes sure things simply work, given that dbus itself doesn't
support GetConnectionSELinuxSecurityContext() on the bus driver name
itself.

Fixes: 
2017-06-26 18:24:58 +02:00
Lennart Poettering
8d1dd6abe2 core: when parsing integers passed over the bus use int32_t, not int
sd-bus will return "i" integers as "int32_t", not "int". Now on all
archs we care about that's the same, but we still should do this
properly.
2017-06-26 17:43:18 +02:00
Lennart Poettering
7f452159b8 core: make IOSchedulingClass= and IOSchedulingPriority= settable for transient units
This patch is a bit more complex thant I hoped. In particular the single
IOScheduling= property exposed on the bus is split up into
IOSchedulingClass= and IOSchedulingPriority= (though compat is
retained). Otherwise the asymmetry between setting props and getting
them is a bit too nasty.

Fixes 
2017-06-26 17:43:18 +02:00
Susant Sahani
bb79318e21 ethtool: warn when ethtool_set_glinksettings not supported
This is useful when port is not set and should be notified to user.
2017-06-26 21:05:52 +05:30
Lennart Poettering
8ecc68f430 systemctl: be truly quiet in systemctl -q is-enabled
Fixes: 
2017-06-26 16:11:20 +02:00
Franck Bui
d31ae54818 swap: make use of IN_SET()
Minor cleanups, no functional changes.
2017-06-26 15:26:39 +02:00
Franck Bui
cabf58b24f swap: make use of manager_get_unit() in swap.c
Minor cleanup, no functional changes.
2017-06-26 15:26:39 +02:00
Lennart Poettering
9efb9df9e3 core: make NotifyAccess= and FileDescriptorStoreMax= available to transient services
This is helpful for debugging/testing .
2017-06-26 15:14:41 +02:00
Lennart Poettering
3ceb72e558 core: permit FDSTORE=1 messages with non-pollable fds
This also alters the documentation to recommend memfds rather than /run
for serializing state across reboots. That's because /run doesn't
actually have the same lifecycle as the fd store, as it is cleared out
on restarts.

Fixes: 
2017-06-26 15:14:41 +02:00
Susant Sahani
9c5e117239 ethtool: Fix speed in 593022fa377d40d9a645919759b04c53cf4eace8
We should use the DIV_ROUND_UP
2017-06-26 18:37:38 +05:30
Zbigniew Jędrzejewski-Szmek
f52b982cc9 meson: stop setting the linker ()
If wanted, the linker can be set with LDFLAGS (LDFLAGS=-Wl,-fuse-ld=gold meson ...),
and setting it internally was interfering with that. It seems that both gold and
bfd work very well and quick, and the reasons we had to prefer gold are not relevant
anymore.

Fixes .
2017-06-26 15:00:45 +02:00
hadess
c8ec393b25 hwdb: Add ID_INPUT_JOYSTICK_INTEGRATION property ()
When the joystick is integrated directly into the machine, knowing
that the device is internal allows us to disable attached functionality
when the device is not used or inaccessible.

For example, this allows disabling rumble and accelerometer on
flip-console-like devices like the GPD-XD.
2017-06-26 12:17:36 +02:00
James Hemsing
0c0097a60a hwdb: Cytrix Complex 11t accelerometer support ()
Add quirk to fix portrait orientations resulting in an upside-down
screen on the Cytrix/Mytrix/Cube Complex 11t tablet.
2017-06-26 11:27:45 +02:00
Zbigniew Jędrzejewski-Szmek
f900f5825d core: allow specifiers to be resolved in Environment= passed over dbus ()
When specifiers are included in the Environment block in StartTransientUnit,
we resolve specifiers on the PID1 side. Nevertheless we store the unresolved
version in the transient unit file, so that it'll be resolved when loading
the unit. I think this looks nicer.

I also removed the writing of the merged Environment block to the transient
file. Afaict, this resulted in variables being written multiple times, but
this needs to be tested properly.

Fixes .
2017-06-26 11:26:59 +02:00
Zbigniew Jędrzejewski-Szmek
92369d5eea Copy defines for renameat2 from casync () 2017-06-26 09:34:03 +02:00
Zbigniew Jędrzejewski-Szmek
2d2a815c90 core/loopback-setup: set a timeout for the kernel reply ()
This shouldn't happen, but just in case for any reason the kernel
doesn't answer, it's probably much better to continue.

Follow-up for fb8939274a93d713575a409e9baab55a5638863a.
2017-06-26 09:33:37 +02:00
Susant Sahani
593022fa37 systemd-link: add support to configure the device port ()
This work allows to configure device port:

tp — An Ethernet interface using Twisted-Pair cable as the medium.
aui — Attachment Unit Interface (AUI). Normally used with hubs.
bnc — An Ethernet interface using BNC connectors and co-axial cable.
mii — An Ethernet interface using a Media Independent Interface (MII).
fibre — An Ethernet interface using Optical Fibre as the medium.
2017-06-25 18:42:57 -04:00
Dušan Kazik
66c36247e9 Added slovak translation ()
Create sk.po and update LINGUAS.
2017-06-25 13:19:10 -04:00
Michael Biebl
40b6b81372 Merge pull request from keszybz/parse-hwdb-timeout
meson: increase timeout for parse_hwdb.py test to 90 s
2017-06-25 04:01:25 +02:00
Michael Biebl
939c43012a meson: increase timeout for parse_hwdb.py test to 90 s
Fixes .
2017-06-24 19:24:20 -04:00
Zbigniew Jędrzejewski-Szmek
7e867138f5 Merge pull request from fbuihuu/make-logind-restartable
Make logind restartable.
2017-06-24 18:58:36 -04:00
Waldemar Brodkorb
e7e11bbf34 make nss-systemd support conditional ()
This allows the nss-systemd module to be disabled on minimal installations.
2017-06-24 13:30:26 -04:00
Evgeny Vereshchagin
a4bdea5e31 Merge pull request from keszybz/env-serialization
Environment serialization fixes
2017-06-24 19:37:45 +03:00
Zbigniew Jędrzejewski-Szmek
a096d8c88f tests: add tests for environment serialization 2017-06-23 20:46:33 -04:00
Zbigniew Jędrzejewski-Szmek
417eefb170 basic/env-util: when serializing, actually use escaping
Fixes .
2017-06-23 20:46:33 -04:00
Zbigniew Jędrzejewski-Szmek
d233c99ac8 manager: just warn about an invalid environment entry
Apart from bugs (as in ), this can happen if we ever make
our requirements for environment entries more stringent. As with
the rest of deserialization, we should just warn and continue.
2017-06-23 20:46:33 -04:00
Zbigniew Jędrzejewski-Szmek
62c460c6e2 manager: raise level of notices about failed deserialization
This is something that shouldn't happen. If it does, we want to
know about it.
2017-06-23 20:46:33 -04:00
Torstein Husebø
3561eafa92 core: fix typo () 2017-06-23 18:53:29 -04:00
Zbigniew Jędrzejewski-Szmek
cb0cf46f45 Merge pull request from poettering/loopback-addr
Synchronously set up IP addresses of loopback device in loopback-setup.c.
2017-06-23 15:49:40 -04:00
Lennart Poettering
fb8939274a loopback-setup: also add IP addresses to loopback devices
This changes loopback setup to not only start the loopback device but
also add the relevant IP addresses to it. This way, we can synchronously
wait until that's complete, and properly guarantee that loopback setup
is complete at the time we start our first processes.

This is a semi-revert of f3fc48150bb443f5b4623a819ebc2b39971a4f66, but
heavily updated.

Fixes: 
2017-06-23 12:07:03 +02:00
Lennart Poettering
3becdb8ac6 test: show debug log output during test-loopback 2017-06-23 12:06:58 +02:00
Lennart Poettering
a877b1d9a7 Merge pull request from speakinghedge/6150-LLDP-messages-containing-padding-are-dropped
accept LLDP messages containing padding
2017-06-23 09:57:23 +02:00
hecke
8c7c7100b5 add note that explains relaxed bytes-left check 2017-06-23 08:55:01 +02:00
Lennart Poettering
a462478539 nspawn: make sure to send SIGTERM/SIGHUP to the main nspawn process if stubinit receives SIGRTMIN+3 ()
This code already existed in some form, however commented. Remove the
comments, as this was most likely simply a forgotten commenting for
debugging purposes.

This also extends the logic a bit, by sending SIGHUP right after the
SIGTERM, so that shells will also terminate, when PID 1 gets a
SIGRTMIN+3.

Fixes: 
2017-06-22 22:20:09 -04:00
Zbigniew Jędrzejewski-Szmek
9fe4a3d98e Merge pull request from poettering/timer-boottime-monotonic
WakeSystem= and other timer fixes.
2017-06-22 21:34:39 -04:00
Yu Watanabe
525e9db3b3 meson: do not use path separator for target name ()
Fixes .
2017-06-22 21:27:07 -04:00
Michael Biebl
7cdd978346 meson: install manual and unsafe tests ()
Always install all tests if install-tests is set to true, as they might
be useful for CI. This includes manual and unsafe tests. Install those
in subdirectories of /usr/lib/systemd/tests.

Fixes .
2017-06-22 21:23:30 -04:00
Zbigniew Jędrzejewski-Szmek
53ec2a3226 Merge pull request from poettering/bus-non-existant-object
sd-bus: don't treat requests for non-existent objects as connection errors
2017-06-22 20:56:59 -04:00
Lennart Poettering
00c83b4300 core: return a friendlier error for a dbus path referring to a non-existent unit
See: 
2017-06-22 20:54:54 -04:00
Michal Sekletar
05e33aa1d5 core: unset sysfs path after transition to dead state ()
Device is gone and most likely it will get garbage collected. However in
cases when it doesn't get gc'ed (because it is referenced by some
other unit, e.g. mount from fstab) we need to unset sysfs. This is
because when device appears next time, possibly, with different sysfs
path we need to update the sysfs path. Current code could end up caching
stale sysfs path forever.

In reality this is not a problem for normal disks (unless you swap them
during system runtime). However this issue causes failures to mount
filesystems on LVM where sysfs path depends on activation
order (i.e. logical volumes from volume group that is activated first
get assigned lower dm-X numbers and corresponding syspaths).

Fixes .
2017-06-22 20:29:15 -04:00
Michal Koutný
b007626897 core: dbus: Interpret released names properly ()
When a DBus name is released, NameOwnerChanged signal contains an empty string
as new_owner. Commit bbc2908 changed interpretation of the empty string to a
valid name, which is not consistent with values that are sent by dbus-daemon.

As a side effect, this masks symptoms of systemd-logind dbus disconnections
() by completely restarting it so it can freshly reconnect to dbus.
2017-06-22 20:26:04 -04:00
Lennart Poettering
c4834ffaef tests: show current monotonic/boottime/realtime clock values in test-time
When debugging time issues its kinda handy to have an easy way to query
the three clocks, hence let's just output them at the beginning of
test-time.
2017-06-22 21:10:34 +02:00
Lennart Poettering
c54be90b28 timer: make sure we use the right monotonic timestamp
This reworks timer_enter_waiting() in a couple of ways in order to clean
it up a bit and fix .

Most importantly, we previously we initialized ts_monotonic to either
the current time in CLOCK_MONOTONIC or in CLOCK_BOOTTIME, depending on
t->wake_system. Then given specific conditions we'd use this time as
base for our timers. And afterwards, if t->wake_system was on we'd
convetr the resulting value from CLOCK_MONOTONIC to CLOCK_BOOTTIME again
— which of course is wrong since we already were in CLOCK_BOOTTIME! This
fixes this logic, by using a triple timestamp so that we always have the
right base around, and initially only calculate in CLOCK_MONOTONIC and
only convert as last step.

Conversion between the clocks is now done with the generic
usec_shift_clock(), and additions via usec_add() making these
calculations a bit safer.

Fixes: 
2017-06-22 21:04:20 +02:00
Lennart Poettering
79fc8b9623 timer: convert property_get_next_elapse_monotonic() to use usec_shift_clock()
Let's use the generic clock shifting logic here.
2017-06-22 20:59:48 +02:00