Lennart Poettering [Thu, 31 Aug 2017 08:25:48 +0000 (10:25 +0200)]
bus-unit-util: use STR_IN_SET() where appropriate
Lennart Poettering [Thu, 31 Aug 2017 08:25:23 +0000 (10:25 +0200)]
bus-unit-util: don't request result property from non-service units
Lennart Poettering [Thu, 31 Aug 2017 08:25:06 +0000 (10:25 +0200)]
tree-wide: use pid_is_valid() at more places
Lennart Poettering [Thu, 31 Aug 2017 11:46:25 +0000 (13:46 +0200)]
Merge pull request #6704 from andir/fix_vrf_table_identifier
VRF documentation, parameter renames & parsing of RT names
Lennart Poettering [Thu, 31 Aug 2017 11:30:26 +0000 (13:30 +0200)]
Merge pull request #6709 from yuwata/imply-requires-mounts
core: StateDirectory= and friends imply RequiresMountsFor=
Lennart Poettering [Thu, 31 Aug 2017 10:46:03 +0000 (12:46 +0200)]
Merge pull request #6707 from yuwata/systemctl-show-caps
systemctl: show capabilities in human readable format
Michal Sekletar [Thu, 31 Aug 2017 10:45:25 +0000 (12:45 +0200)]
tmpfiles: with "e" don't attempt to set permissions when file doesn't exist (#6682)
tmpfiles.d option "e" when run through systemd-tmpfiles --create should
apply configured permissions (uid,gid) only to already existing
files. When file doesn't exist we bail out with error. Instead we should
silently ignore non-existing files.
$ useradd test
$ cat /etc/tmpfiles.d/foobar.conf
e /tmp/test - test test 1d
$ ls -l /tmp/test
ls: cannot access '/tmp/test': No such file or directory
Before:
$ systemd-tmpfiles --create /etc/tmpfiles.d/foobar.conf
Adjusting owner and mode for /tmp/test failed: No such file or directory
$ echo $?
1
After:
$ systemd-tmpfiles --create /etc/tmpfiles.d/foobar.conf
$ echo $?
0
Susant Sahani [Thu, 31 Aug 2017 10:44:43 +0000 (10:44 +0000)]
systemd-link: ethtool add support for more Wake up Lan setting (#6331)
This works supports to configure nicast, multicast, broadcast, arp and SecureOn.
Lennart Poettering [Thu, 31 Aug 2017 10:24:18 +0000 (12:24 +0200)]
Merge pull request #6666 from sourcejedi/suspend-initiate-failure
logind: add missing resume signal when we fail to initiate sleep (and shutdown)
Andreas Rammhold [Thu, 31 Aug 2017 10:08:33 +0000 (12:08 +0200)]
networkd: Added deprecation warning to `VRF.TableId`
Yu Watanabe [Thu, 31 Aug 2017 09:31:08 +0000 (18:31 +0900)]
man: fix path for storing random seed
Yu Watanabe [Thu, 31 Aug 2017 09:37:22 +0000 (18:37 +0900)]
TODO: update
Yu Watanabe [Thu, 31 Aug 2017 09:37:11 +0000 (18:37 +0900)]
unit: use StateDirectory= instead of RequiresMountsFor=
Yu Watanabe [Thu, 31 Aug 2017 09:29:41 +0000 (18:29 +0900)]
unit: drop redundant options
Michal Sekletar [Thu, 31 Aug 2017 09:20:14 +0000 (11:20 +0200)]
units: introduce getty-pre.target (#6667)
This new target is a passive unit, hence it is supposed to be pulled in
to the transaction by the service that wants to block login on the
console (e.g. text version of initial-setup). Now both getty and
serial-getty are ordered after this target.
https://lists.freedesktop.org/archives/systemd-devel/2015-July/033754.html
Yu Watanabe [Thu, 31 Aug 2017 09:19:35 +0000 (18:19 +0900)]
core: StateDirectory= and friends imply RequiresMountsFor=
Lennart Poettering [Thu, 31 Aug 2017 09:08:41 +0000 (11:08 +0200)]
Merge pull request #6431 from keszybz/hwdb-trivial-rows
hwdb: disallow acceleration matrices with trivial rows
Andrew Jeddeloh [Thu, 31 Aug 2017 08:58:39 +0000 (01:58 -0700)]
networkd: dont crash when mtu changes (#6594)
Prevent networkd from crashing when UseMTU is used. Many drivers will
bring the link down and then back up to configure a new MTU. Networkd
will also asynchonously send rtnl messages to configure the link and may
receive responses after the link has gone down and come back up (which
networkd will handle and set the lease and network to NULL.
This changes the behavior to instead return if this is the case instead
of crashing via assert.
Alan Jenkins [Thu, 31 Aug 2017 08:54:12 +0000 (09:54 +0100)]
systemctl: clarify code - some actions never appear in arg_action (#6638)
ACTION_EMERGENCY and ACTION_DEFAULT would be handled correctly by
start_with_fallback(). However there is no fallback available for
them, and they would never be set in `arg_action` in the first
place. Remove the unused cases from the switch statement.
@poettering suggested this makes a good place to clarify the point,
explicitly listing all the `arg_action` values which would never be
set.
Evgeny Vereshchagin [Thu, 31 Aug 2017 08:38:30 +0000 (11:38 +0300)]
sd-bus: use -- when passing arguments to ssh (#6706)
This prevents `systemctl` from runnning /bin/touch when the following
command is used:
```
systemctl -H '-oProxyCommand=/bin/touch i-shouldnt-be-here' show-environment
```
Topi Miettinen [Thu, 31 Aug 2017 08:37:32 +0000 (08:37 +0000)]
log: reopen log for failed assertions (#6703)
Reopen log so that failed and aborting assertions can be written to log.
Closes: #6658
Yu Watanabe [Thu, 31 Aug 2017 08:02:33 +0000 (17:02 +0900)]
bus-util: remove unnecessary initializations
Yu Watanabe [Thu, 31 Aug 2017 08:07:16 +0000 (17:07 +0900)]
systemctl: show capabilities in human readable format
Follow-up for
21771f338d268e06dc9a10b9b08b14ff8217d4be.
Andreas Rammhold [Wed, 30 Aug 2017 23:44:29 +0000 (01:44 +0200)]
networkd: Updated documentation to refer to new `Table=` parameter
Andreas Rammhold [Wed, 30 Aug 2017 23:14:05 +0000 (01:14 +0200)]
networkd: Renamed `table_id` field to `table`
Other parts of the code do just use `table` as identifier for the actual
routing table id. This change should make it easier to read through the
code since the meaning or rather the name stays the same.
Andreas Rammhold [Wed, 30 Aug 2017 23:11:16 +0000 (01:11 +0200)]
networkd: Add `VRF.Table` to support parsing of table names
Previously there was only `VRF.TableId` which only supported numeric
identifiers for routing table. With the additiona of
`config_parse_route_table` also names can be used as identifiers.
Ivan Shapovalov [Wed, 30 Aug 2017 16:49:07 +0000 (19:49 +0300)]
cryptsetup-generator: do not bind to the decrypted device unit (#6538)
This breaks things when the decrypted device is not immediately
`SYSTEMD_READY=1` (e. g. when a multi-device btrfs system is placed on
multiple cryptsetup devices).
Fixes #6537.
NeilBrown [Wed, 30 Aug 2017 16:48:25 +0000 (02:48 +1000)]
shutdown: don't remount,ro network filesystems. (#6588)
systemd-shutdown is run after the network is stopped,
so remounting a network filesystem read-only can hang.
A simple umount is the most useful thing that can
be done for a network filesystem once the network is down.
Alan Jenkins [Wed, 30 Aug 2017 16:47:40 +0000 (17:47 +0100)]
man: fix note for `systemctl enable --global` (#6592)
The last sentence in the paragraph described the behaviour of `--global`. But "the last case" we listed was "only this boot", which does not match... This was the fifth case described, but there are only _four_ different option names. Fix it.
Alan Jenkins [Wed, 30 Aug 2017 16:20:23 +0000 (17:20 +0100)]
units: starting suspend.target should not fail when suspend is successful (#6678)
and the same for hibernate.target and hybrid-sleep.target.
Tested with both sucessful and unsuccessful suspends. The result of the
start job was correct in both cases. Closes #6419 (a regression in v233
and v234).
> suspend is unsual for a target, because it has to stop itself once it's
> started. Otherwise you couldn't start it again, so you could only suspend
> once! Currently that's implemented using BindsTo=systemd-sleep.service.
> Meaning it pulls in systemd-sleep.service to do the actual suspend, and
> then de-activates afterwards. But the behaviour of BindsTo was changed
> recently (not without some issues during development) - maybe this bug
> is caused by poettering/systemd@631b676 which I think was added in
> release v233.
>
> sleep.target (see man systemd.special) has the same need, but it
> implements it differently. It simply has StopWhenUnneeded=yes.
This commit switches suspend.target etc. to the approach used by
sleep.target.
Alan Jenkins [Wed, 30 Aug 2017 16:11:31 +0000 (17:11 +0100)]
sulogin-shell: remove ineffective job mode option from `systemctl isolate` (#6627)
`systemctl default` uses job mode `isolate` (see `action_table`).
The job mode option is ignored.
Note that exiting the emergency shell service by using e.g.
`systemctl isolate multi-user` or `systemctl start multi-user.target`
already kills `emergency.service`. There's only a potential conflict
between your command and the command in systemd-sulogin-shell if you run
something like `systemctl start --no-block multi-user.target; exit`.
Which is nothing like what we told them to do :).
Davide Cavalca [Wed, 30 Aug 2017 15:34:44 +0000 (08:34 -0700)]
meson: add . to include_directories (#6634)
Lennart Poettering [Wed, 30 Aug 2017 15:33:07 +0000 (17:33 +0200)]
Merge pull request #6617 from sourcejedi/udev-unit-deps
udev service dependency nitpicks
Franck Bui [Wed, 30 Aug 2017 15:16:16 +0000 (17:16 +0200)]
device: make sure to remove all device units sharing the same sysfs path (#6679)
When a device is unplugged all device units sharing the same sysfs path
pointing to that device are supposed to be removed.
However it didn't work since while iterating the device unit list containing
all the relevant units, each unit was removed during each iteration of
LIST_FOREACH. However LIST_FOREACH doesn't support this use case and
LIST_FOREACH_SAFE must be use instead.
Alan Jenkins [Wed, 30 Aug 2017 15:06:12 +0000 (16:06 +0100)]
logind: VT_GETSTATE "cannot return state for more than 16 VTs" (#6625)
`vt_is_busy(16)` would always return FALSE. So we could have started
autovt@16.service even when VT 16 was already being used for something.
Davide Cavalca [Wed, 30 Aug 2017 15:04:53 +0000 (08:04 -0700)]
meson: use current_source_dir() to scope git invocations (#6635)
Tom Gundersen [Wed, 30 Aug 2017 11:09:03 +0000 (13:09 +0200)]
sd-bus: socket - only transmit auxillary FDs once (#6603)
If a message is too large to fit into the output buffer, it will be
transmitted to the kernel in several chunks. However, the FDs must
only ever be transmitted once or they will bereceived by the remote
end repeatedly.
The D-Bus specification disallows several sets of FDs attached to
one message, however, the reference implementation of D-Bus will
not reject such a message, rather it will reassign the duplicate
FDs to subsequent FD-carrying messages.
This attaches the FD array only to the first byte of the message.
Michal Sekletar [Wed, 30 Aug 2017 11:07:43 +0000 (13:07 +0200)]
README: note that installing valgrind-devel maybe useful to developers (#6502)
Commit also mentions that when running under valgrind we actually don't
execve() systemd-shutdown. We have a comment about this in the code, but
being upfront about this change in behavior doesn't hurt.
Lennart Poettering [Wed, 30 Aug 2017 10:21:37 +0000 (12:21 +0200)]
update TODO
Lennart Poettering [Wed, 30 Aug 2017 10:17:53 +0000 (12:17 +0200)]
Merge pull request #6659 from yuwata/econnrefused
networkd: do not fail manager_connect_bus() if dbus is not active yet
Jon Ringle [Wed, 30 Aug 2017 09:38:00 +0000 (05:38 -0400)]
networkd: Honor configured DHCP ClientIdentifier on link_update (#6622)
We have an embedded board with a couple of ethernet ports. From the kernel
log, I can see that the ethernet drivers are obtaining their correct MAC
address, but for some reason, at first systemd-networkd doesn't see the
mac address for the ethernet port at the time that it looks at
dhcp_client_identifier configuration (it has 00:00:00:00:00:00 for mac).
Later on, systemd-networkd gets a link_update() call, and at this time, it
has the correct mac address for the ethernet port. However, in link_update()
the dhcp_client_identifier configuration is not being considered, and a call
to sd_dhcp_client_set_iaid_duid() is being done always
Lennart Poettering [Wed, 30 Aug 2017 09:31:37 +0000 (11:31 +0200)]
Merge pull request #6691 from yuwata/man-journal-remote2
journal-remote: small fixes
Lennart Poettering [Wed, 30 Aug 2017 08:50:01 +0000 (10:50 +0200)]
update TODO
Lennart Poettering [Wed, 30 Aug 2017 08:45:24 +0000 (10:45 +0200)]
Merge pull request #6672 from yuwata/drop-priv
use !! prefix in networkd and timesyncd
Yu Watanabe [Wed, 30 Aug 2017 08:03:37 +0000 (17:03 +0900)]
man: journal-remote: add detailed condition when SplitMode=none must be used
g0tar [Wed, 30 Aug 2017 08:00:44 +0000 (10:00 +0200)]
terminal reset should honour default_utf8 kernel setting (#6606)
terminal reset should honour default_utf8 kernel setting
Yu Watanabe [Wed, 30 Aug 2017 07:56:41 +0000 (16:56 +0900)]
journal-remote: show error if SplitMode=host with 'active' source is specified
Yu Watanabe [Sat, 26 Aug 2017 16:48:23 +0000 (01:48 +0900)]
test: drop Exec* prefixes to obtain paths of executables
Yu Watanabe [Wed, 30 Aug 2017 06:59:57 +0000 (15:59 +0900)]
timesync: move stamp file to /var/lib/systemd/timesync/clock
Lennart Poettering [Tue, 29 Aug 2017 16:58:56 +0000 (18:58 +0200)]
Merge pull request #6585 from poettering/seccomp-lock-personality
Seccomp lock personality
Lennart Poettering [Tue, 29 Aug 2017 16:04:50 +0000 (18:04 +0200)]
Merge pull request #6677 from yuwata/man-journal-remote
journal-remote: improve man page and error message
Topi Miettinen [Tue, 29 Aug 2017 15:31:24 +0000 (15:31 +0000)]
namespace: avoid assertion failure (#6649)
If the root image is not decrypted, it must not be relinquished.
Lennart Poettering [Tue, 29 Aug 2017 15:28:06 +0000 (17:28 +0200)]
Merge pull request #6670 from fsateler/disable-networkd
build-sys: don't build networkctl if networkd is disabled
Lennart Poettering [Wed, 9 Aug 2017 18:52:54 +0000 (20:52 +0200)]
core: open up LockPersonality= for transient units
Let's make "systemd-run -p LockPersonality=1 -t /bin/sh" work.
Lennart Poettering [Wed, 9 Aug 2017 18:43:35 +0000 (20:43 +0200)]
seccomp: rework seccomp_lock_personality() to apply filter to all archs
Lennart Poettering [Wed, 9 Aug 2017 18:40:26 +0000 (20:40 +0200)]
seccomp: default to something resembling the current personality when locking it
Let's lock the personality to the currently set one, if nothing is
specifically specified. But do so with a grain of salt, and never
default to any exotic personality here, but only PER_LINUX or
PER_LINUX32.
Topi Miettinen [Tue, 4 Jul 2017 12:48:18 +0000 (15:48 +0300)]
seccomp: LockPersonality boolean (#6193)
Add LockPersonality boolean to allow locking down personality(2)
system call so that the execution domain can't be changed.
This may be useful to improve security because odd emulations
may be poorly tested and source of vulnerabilities, while
system services shouldn't need any weird personalities.
Lennart Poettering [Tue, 29 Aug 2017 13:19:44 +0000 (15:19 +0200)]
Merge pull request #6636 from sourcejedi/fsync
"Don't fear the fsync()"
Alan Jenkins [Tue, 29 Aug 2017 09:56:32 +0000 (10:56 +0100)]
fileio: rename function parameter to avoid masking global symbol
> glibc exports a function called sync(), we should probably avoid
> overloading that as a variable here locally (gcc even used to warn about
> that, not sure why it doesn't anymore), to avoid confusion around what
> "if (sync)" actually means
Jonathan Teh [Mon, 28 Aug 2017 22:32:59 +0000 (23:32 +0100)]
hwdb: Add various USB mice (#6676)
Lennart Poettering [Mon, 28 Aug 2017 17:12:35 +0000 (19:12 +0200)]
Merge pull request #6653 from yuwata/man-link
Small fixes
Felipe Sateler [Mon, 28 Aug 2017 16:49:03 +0000 (13:49 -0300)]
shared: Add a linker script so that all functions are tagget @SD_SHARED instead of @Base (#6669)
This helps prevent symbol collisions with other programs and libraries. In particular,
because PAM modules are loaded into the process that is creating the session, and
systemd creates PAM sessions, the potential for collisions is high.
Disambiguate all systemd calls by tagging a 'version' SD_SHARED.
Fixes #6624
vliaskov [Mon, 28 Aug 2017 16:46:01 +0000 (18:46 +0200)]
Revert "mount-setup: mount xenfs filesystem (#6491)" (#6662)
This reverts commit
b305bd3aab0446095bf28ffc28b3d908a7ace6b9.
Diogo Pereira [Mon, 28 Aug 2017 16:38:29 +0000 (17:38 +0100)]
Fix typo in man/systemd.exec.xml (#6683)
dasj19 [Mon, 28 Aug 2017 16:24:09 +0000 (18:24 +0200)]
Added Romanian Translation (#6674)
Jason Gunthorpe [Mon, 28 Aug 2017 15:22:10 +0000 (09:22 -0600)]
Support 'rdma' as a ListenNetlink= argument (#6626)
NETLINK_RDMA has been in the kernel since v3.0.
Felipe Sateler [Mon, 28 Aug 2017 14:37:23 +0000 (11:37 -0300)]
editorconfig: add rule for meson.build files (#6671)
Felipe Sateler [Sun, 27 Aug 2017 13:49:10 +0000 (10:49 -0300)]
networkd: do not install the socket when networkd is not enabled
Yu Watanabe [Sun, 27 Aug 2017 07:34:53 +0000 (16:34 +0900)]
journal-remote: show error message if output file name does not end with .journal
`journalctl -o export | systemd-journal-remote -o /tmp/dir -`
gives the following error messages.
```
Failed to open output journal /tmp/dir: Invalid argument
Failed to get writer for source stdin: Invalid argument
Failed to create source for fd:0 (stdin): Invalid argument
```
And these are hard to understand what is the problem.
This commit makes journal-remote check whether the output file name
ends with .journal suffix or not, and if not, output error message.
Yu Watanabe [Sun, 27 Aug 2017 07:20:12 +0000 (16:20 +0900)]
man: journal-remote: active mode without --url option requires output filename
Closes #6675.
Yu Watanabe [Thu, 10 Aug 2017 07:07:08 +0000 (16:07 +0900)]
units: make use of !! ExecStart= prefix in systemd-timesyncd.service
Let's make use of !! to run timesyncd with ambient capabilities on
systems supporting them.
Yu Watanabe [Sat, 26 Aug 2017 16:40:47 +0000 (01:40 +0900)]
units: make use of !! ExecStart= prefix in systemd-networkd.service
Let's make use of !! to run networkd with ambient capabilities on
systems supporting them.
Evgeny Vereshchagin [Sat, 26 Aug 2017 14:21:23 +0000 (17:21 +0300)]
build-sys: fix the script used for generating load_fragment_gperf_nulstr (#6646)
This prevents `systemd --dump-configuration-items` from crashing.
Closes #6596.
Susant Sahani [Sat, 26 Aug 2017 13:37:46 +0000 (19:07 +0530)]
Networkd Bond DOC: Move ActiveSlave and PrimarySlave to [Network] (#6610)
Fixes #6545
Lennart Poettering [Sat, 26 Aug 2017 13:19:26 +0000 (15:19 +0200)]
logind: make sure we don't process the same method call twice (#6583)
Tiny mistake, big effect.
Fixes: #6375
Yu Watanabe [Sat, 26 Aug 2017 13:12:48 +0000 (22:12 +0900)]
Merge pull request #6582 from poettering/logind-tty
various tty path parsing fixes
Lennart Poettering [Sat, 26 Aug 2017 13:07:23 +0000 (15:07 +0200)]
core: disable the effect of Restart= if there's a stop job pending for a service (#6581)
We shouldn't undo the job already enqueued, under any circumstances.
Fixes: #6504
Lennart Poettering [Sat, 26 Aug 2017 12:59:21 +0000 (14:59 +0200)]
man: fix example indentation in tmpfiles.d(5) (#6578)
docboc actually copies the indentation 1:1 into the final man page and
that makes the example really weirdly aligned. Let's fix that.
Yu Watanabe [Sat, 26 Aug 2017 12:49:05 +0000 (21:49 +0900)]
Merge pull request #6577 from poettering/more-exec-flags
add ! and !! ExecStart= flags to make ambient caps useful
Michal Sekletar [Fri, 25 Aug 2017 13:36:10 +0000 (15:36 +0200)]
service: attempt to execute next main command only for oneshot services (#6619)
This commit fixes crash described in
https://github.com/systemd/systemd/issues/6533
Multiple ExecStart lines are allowed only for oneshot services
anyway so it doesn't make sense to call service_run_next_main() with
services of type other than SERVICE_ONESHOT.
Referring back to reproducer from the issue, previously we didn't observe
this problem because s->main_command was reset after daemon-reload hence
we never reached the assert statement in service_run_next_main().
Fixes #6533
Alan Jenkins [Thu, 24 Aug 2017 14:21:21 +0000 (15:21 +0100)]
logind: tighten assertion in execute_shutdown_or_sleep()
Following commit
b498d6ea, I belated realized we should tighten the
assertions as well, to make sure that we're setting `m->action_what` to
represent an action in progress. (The check for an action in progress is
to compare `m->action_what` to zero)
Alan Jenkins [Thu, 24 Aug 2017 09:33:24 +0000 (10:33 +0100)]
logind: add missing resume signal when we fail to initiate sleep/shutdown
This fixed https://bugzilla.redhat.com/show_bug.cgi?id=1476313
as much as I was able to reproduce it in a VM, at least.
E.g. this signal might wake the screen back up, providing a more visible
indicator of suspend failure. In my VM testing, it was also required in
order to unblock keyboard input in gnome-shell after the failed suspend.
At the same time, fix the error handling for scheduled shutdowns. This now
mirrors the behaviour of when you use `shutdown -k` - it sends all the
scary messages about shutting down, "but you'll have to do it [shut down
the system] yourself". It also avoids the risk of locking out the admin
(nologin file), in case they logged out for some reason (and they use
`sudo` instead of root).
Not that I have any idea why you'd want to use `shutdown -k`, but the code
is easier to analyze if it rolls back on error (in the absence of any code
comment as to why that's not wanted).
Alan Jenkins [Mon, 21 Aug 2017 16:28:35 +0000 (17:28 +0100)]
logind: respect "delay" inhibitors in scheduled shutdowns
There is no justification not to wait an extra (default) 5 seconds, for
a more graceful shutdown of user programs. Again, you don't get to ignore
delay inhibitors for unscheduled shutdowns, short of
`systemctl poweroff -f`.
It is simplest if we move the test for `m->shutdown_dry_run` into
manager_scheduled_shutdown_handler().
However we need to not add such delays during a "dry run". Otherwise, we
would still have to be considered "in progress" for some seconds after our
admin has seen the final wall message. If they go to `poweroff`, we would
have blocked them with a misleading error message. Note this `poweroff`
will still process delay inhibitors as needed. If the admin planned to
use a more forceful method... eh. It's their responsibility to assess
whether that's safe.
There is an argument that the alternative behaviour could be used (racily!)
to kludge around them not being able to shutdown to "single user mode". If
we cared about that case, we would have easily preserved non-racy support
for it in `shutdown`.
Additionally, though I think this code does read more easily by reducing
inconsistencies, we didn't come up with any use case for delay inhibitors
v.s. shutdown.[1] The SIGTERM v.s. SIGKILL delay is more general, and we
allow a whole 90 seconds for it, not just 5. So I don't think keeping this
approach bears a risk of significant damage.
[1] https://www.freedesktop.org/wiki/Software/systemd/inhibit/
Alan Jenkins [Mon, 21 Aug 2017 10:49:25 +0000 (11:49 +0100)]
logind: add missing check for conflicting operation v.s. scheduled shutdown
> We don't want to shutdown while a suspend is running, and vice versa.
> This would be confusing and could lead to data loss in the worst case.
https://bugs.launchpad.net/ubuntu/+source/systemd/+bug/1441253/comments/4
According to the above comment, if the conflicting operation is hung,
we don't want to force things when the admin has not passed a force option.
Similarly if you're not an admin, you probably shouldn't get to sneak
around this check by using a scheduled shutdown instead of an unscheduled
one. (And no-one so far thought it necessary to add such a permission in
PolKit).
Note that if the conflicting operation was _not_ hung, and we lost the
race with suspend, the system might not have shut down at the scheduled
time anyway. Which is no good if you were scheduling a power outage.
And scheduling a shutdown for an arbitrary time when the system is resumed,
does not seem a very useful semantic. More likely, scheduled shutdowns are
useful on systems which do not use suspend, such as multi-user servers.
(In which case even PolKit defaults likely don't let the users trigger
suspend).
Alan Jenkins [Tue, 22 Aug 2017 12:54:21 +0000 (13:54 +0100)]
logind: method_schedule_shutdown() already rejects empty `type`
Don't test for an empty `type` afterwards. This is not how you cancel
scheduled shutdowns - there's a separate method for that.
Alan Jenkins [Wed, 23 Aug 2017 14:58:03 +0000 (15:58 +0100)]
logind: remember to remove '/run/systemd/shutdown/scheduled'
Felipe Sateler [Mon, 21 Aug 2017 12:48:41 +0000 (09:48 -0300)]
build-sys: don't build networkctl if networkd is disabled
Yu Watanabe [Wed, 23 Aug 2017 03:38:56 +0000 (12:38 +0900)]
network,resolve: remove comments related to kdbus
Yu Watanabe [Wed, 23 Aug 2017 03:36:36 +0000 (12:36 +0900)]
networkd: do not fail manager_connect_bus() if dbus is not active yet
Fixes #6618.
Yu Watanabe [Tue, 22 Aug 2017 04:27:21 +0000 (13:27 +0900)]
man: mention configuration directories to sysusers.d
Yu Watanabe [Tue, 22 Aug 2017 11:19:19 +0000 (20:19 +0900)]
Merge pull request #6615 from ssahani/client-id
networkd: fix spell DCHPClientIdentifier (DCHP => DHCP)
Yu Watanabe [Tue, 22 Aug 2017 04:26:09 +0000 (13:26 +0900)]
man: fix wrong citation in systemd-sysctl.service.xml
Michael Biebl [Mon, 21 Aug 2017 07:47:07 +0000 (09:47 +0200)]
CONTRIBUTING: stop mentioning "make check"
Since the switch to meson this information is no longer valid. HACKING already documents how to run the test suite.
See #6642
Charles Huber [Thu, 17 Aug 2017 19:53:25 +0000 (14:53 -0500)]
hwdb: Add Logitech G100s Optical Gaming Mouse (#6570)
Alan Jenkins [Thu, 17 Aug 2017 16:09:44 +0000 (17:09 +0100)]
"Don't fear the fsync()"
For files which are vital to boot
1. Avoid opening any window where power loss will zero them out or worse.
I know app developers all coded to the ext3 implementation, but
the only formal documentation we have says we're broken if we actually
rely on it. E.g.
* `man mount`, search for `auto_da_alloc`.
* http://www.linux-mtd.infradead.org/faq/ubifs.html#L_atomic_change
* https://thunk.org/tytso/blog/2009/03/15/dont-fear-the-fsync/
2. If we tell the kernel we're interested in writing them to disk, it will
tell us if that fails. So at minimum, this means we play our part in
notifying the user about errors.
I refactored error-handling in `udevadm-hwdb` a little. It turns out I did
exactly the same as had already been done in the `systemd-hwdb` version,
i.e. commit d702dcd.
Alan Jenkins [Thu, 17 Aug 2017 16:21:34 +0000 (17:21 +0100)]
localed: don't remove xorg.conf.d/00-keyboard.conf on failures
One of the benefits of updating a file "atomically", is to avoid losing the
old version. For example, if we run out of disk space half-way through.
Fix localed to enjoy this benefit.
Alan Jenkins [Tue, 15 Aug 2017 13:22:44 +0000 (14:22 +0100)]
units: order service(s) before udevd, not udev-trigger (coldplug)
Since hotplugs happen as soon as udevd is started, there is not much sense
in giving udev-trigger an After= dependency on any service. The device
could be hotplugged before coldplug starts.
This is intended to avoid the race window where we create the hwdb with
the wrong selinux context (then fix it up afterwards).
https://github.com/systemd/systemd/issues/3458#issuecomment-
322444107
Alan Jenkins [Tue, 15 Aug 2017 13:11:23 +0000 (14:11 +0100)]
units: Sockets= already implies Wants= and After= (systemd-udevd.service)
I grepped for other `After=` on a socket unit as well. This was the only
instance.
Susant Sahani [Tue, 15 Aug 2017 04:50:25 +0000 (10:20 +0530)]
networkd: fix spell DCHPClientIdentifier (DCHP => DHCP)
Evgeny Vereshchagin [Fri, 11 Aug 2017 04:02:02 +0000 (07:02 +0300)]
Merge pull request #6475 from martinpitt/test-set-e
test: Run qemu/nspawn tests with "set -e"