]> git.ipfire.org Git - thirdparty/systemd.git/log
thirdparty/systemd.git
7 years agoman: make chroot less prominent in discussion of nspawn
Zbigniew Jędrzejewski-Szmek [Fri, 22 Jul 2016 20:31:55 +0000 (16:31 -0400)] 
man: make chroot less prominent in discussion of nspawn

Not as many people use chroot as before, so make the flow a bit nicer by
talking less about chroot.

"change to the either" is awkward and unclear. Just remove that part,
because all changes are lost, period.

7 years agoshared/install: allow "enable" on linked unit files (#3790)
Zbigniew Jędrzejewski-Szmek [Mon, 25 Jul 2016 14:20:16 +0000 (10:20 -0400)] 
shared/install: allow "enable" on linked unit files (#3790)

User expectations are broken when "systemctl enable /some/path/service.service"
behaves differently to "systemctl link ..." followed by "systemctl enable".
From user's POV, "enable" with the full path just combines the two steps into
one.

Fixes #3010.

7 years agogetty@.service.m4: add Conflicts=/Before= against rescue.service (#3792)
Michal Soltys [Mon, 25 Jul 2016 14:18:00 +0000 (16:18 +0200)] 
getty@.service.m4: add Conflicts=/Before= against rescue.service (#3792)

If user isolates rescue target from multi-user or graphical target (or just
starts the service), IgnoreOnIsolate will cause issues with sulogin which is
directly started on current virtual console. This patch adds necessary
Conflicts= and Before= against rescue.service.

Note that this is not needed for emergency target, as implicit Requires= and
After= against sysinit.target is in effect for this service
(DefaultDependencies=yes).

7 years agoMerge pull request #3796 from poettering/mailmap
Martin Pitt [Mon, 25 Jul 2016 13:47:24 +0000 (15:47 +0200)] 
Merge pull request #3796 from poettering/mailmap

documentation, NEWS and mailmap fixes

7 years agonamespace: don't fail on masked mounts (#3794)
Alban Crequy [Mon, 25 Jul 2016 13:39:46 +0000 (15:39 +0200)] 
namespace: don't fail on masked mounts (#3794)

Before this patch, a service file with ReadWriteDirectories=/file...
could fail if the file exists but is not a mountpoint, despite being
listed in /proc/self/mountinfo. It could happen with masked mounts.

Fixes https://github.com/systemd/systemd/issues/3793

7 years agoNEWS: document the new shared library for internal code 3796/head
Lennart Poettering [Mon, 25 Jul 2016 13:27:10 +0000 (15:27 +0200)] 
NEWS: document the new shared library for internal code

7 years agoupdate hwdb (#3795)
Lennart Poettering [Mon, 25 Jul 2016 13:24:15 +0000 (15:24 +0200)] 
update hwdb (#3795)

"make update-hwdb" in preparation for v231.

7 years agoman: update systemctl man page for unit file commands, in particular "systemctl enable"
Lennart Poettering [Mon, 25 Jul 2016 13:10:15 +0000 (15:10 +0200)] 
man: update systemctl man page for unit file commands, in particular "systemctl enable"

Clarify that "systemctl enable" can operate either on unit names or on unit
file paths (also, adjust the --help text to clarify this). Say that "systemctl
enable" on unit file paths also links the unit into the search path.

Many other fixes.

This should improve the documentation to avoid further confusion around #3706.

7 years agoNEWS: update mailmap to bring NEWS and "make git-contrib" in line
Lennart Poettering [Mon, 25 Jul 2016 13:03:46 +0000 (15:03 +0200)] 
NEWS: update mailmap to bring NEWS and "make git-contrib" in line

Let's make sure that "make git-contrib" prints a useful contributors list
directly useful for NEWS and fixes up contributors's IDs a bit.

7 years agoNEWS: more stuff for v231 (#3786)
Zbigniew Jędrzejewski-Szmek [Sat, 23 Jul 2016 08:11:30 +0000 (04:11 -0400)] 
NEWS: more stuff for v231 (#3786)

7 years agoMerge pull request #3785 from keszybz/less-return-errno
Martin Pitt [Sat, 23 Jul 2016 08:10:53 +0000 (10:10 +0200)] 
Merge pull request #3785 from keszybz/less-return-errno

Use "return log_error_errno(...)" in more places + related fixes

7 years agoNEWS: remove duplicate names and fix a few typos
Zbigniew Jędrzejewski-Szmek [Sat, 23 Jul 2016 01:40:46 +0000 (21:40 -0400)] 
NEWS: remove duplicate names and fix a few typos

7 years agoMerge pull request #3784 from poettering/NEWS-v231
Zbigniew Jędrzejewski-Szmek [Sat, 23 Jul 2016 01:28:31 +0000 (21:28 -0400)] 
Merge pull request #3784 from poettering/NEWS-v231

7 years agonspawn: don't skip cleanup on locking error 3785/head
Zbigniew Jędrzejewski-Szmek [Sat, 23 Jul 2016 00:28:57 +0000 (20:28 -0400)] 
nspawn: don't skip cleanup on locking error

7 years agoimport: don't log "fake" errno values
Zbigniew Jędrzejewski-Szmek [Sat, 23 Jul 2016 00:28:30 +0000 (20:28 -0400)] 
import: don't log "fake" errno values

7 years agoUse "return log_error_errno" in more places"
Zbigniew Jędrzejewski-Szmek [Sat, 23 Jul 2016 00:27:45 +0000 (20:27 -0400)] 
Use "return log_error_errno" in more places"

7 years agoMerge pull request #3777 from poettering/id128-rework
Zbigniew Jędrzejewski-Szmek [Sat, 23 Jul 2016 01:18:41 +0000 (21:18 -0400)] 
Merge pull request #3777 from poettering/id128-rework

uuid/id128 code rework

7 years agoPopulate NEWS a bit, in preparation for v231 3784/head
Lennart Poettering [Fri, 22 Jul 2016 18:18:34 +0000 (20:18 +0200)] 
Populate NEWS a bit, in preparation for v231

(Note complete yet.)

7 years agoman: rework resolved.conf's Cache= documentation
Lennart Poettering [Fri, 22 Jul 2016 18:17:23 +0000 (20:17 +0200)] 
man: rework resolved.conf's Cache= documentation

Let's not mention the supposed security benefit of turning off caching. It is
really questionnable, and I#d rather not create the impression that we actually
believed turning off caching would be a good idea.

Instead, mention that Cache=no is implicit if a DNS server on the local host is
used.

7 years agomailmap: add a few more names
Lennart Poettering [Fri, 22 Jul 2016 18:16:56 +0000 (20:16 +0200)] 
mailmap: add a few more names

Let's do something about my OCD and map a numbre of commiters to proper names.

7 years agoMerge pull request #3783 from poettering/fix-3285
Lennart Poettering [Fri, 22 Jul 2016 16:37:42 +0000 (18:37 +0200)] 
Merge pull request #3783 from poettering/fix-3285

coredump: make sure to handle crashes of PID 1 and journald special

7 years agocoredump: turn off coredump collection entirely after journald or PID 1 crashed 3783/head
Lennart Poettering [Fri, 22 Jul 2016 16:01:50 +0000 (18:01 +0200)] 
coredump: turn off coredump collection entirely after journald or PID 1 crashed

Safe is safe, let's turn off the whole logic if we can, after all it is
unlikely we'll be able to process further crashes in a reasonable way.

7 years agocoredump: make sure to handle crashes of PID 1 and journald special
Lennart Poettering [Fri, 22 Jul 2016 14:45:43 +0000 (16:45 +0200)] 
coredump: make sure to handle crashes of PID 1 and journald special

Fixes: #3285
7 years agoMerge pull request #3753 from poettering/tasks-max-scale
Lennart Poettering [Fri, 22 Jul 2016 15:40:12 +0000 (17:40 +0200)] 
Merge pull request #3753 from poettering/tasks-max-scale

Add support for relative TasksMax= specifications, and bump default for services

7 years agocoredump: truncate overly long coredump metadata fields (#3780)
Lennart Poettering [Fri, 22 Jul 2016 15:39:47 +0000 (17:39 +0200)] 
coredump: truncate overly long coredump metadata fields (#3780)

Fixes: #3573
Replaces: #3588

7 years agosystemctl: never check inhibitors if -H or -M are used (#3781)
Lennart Poettering [Fri, 22 Jul 2016 15:39:21 +0000 (17:39 +0200)] 
systemctl: never check inhibitors if -H or -M are used (#3781)

Don't check inhibitors when operating remotely. The interactivity inhibitors
imply can#t be provided anyway, and the current code checks for local sessions
directly, via various sd_session_xyz() APIs, hence bypass it entirely if we
operate on remote systems.

Fixes: #3476
7 years agoMerge pull request #3779 from kinvolk/alessandro/nspawn-inaccessible-devs
Lennart Poettering [Fri, 22 Jul 2016 15:37:54 +0000 (17:37 +0200)] 
Merge pull request #3779 from kinvolk/alessandro/nspawn-inaccessible-devs

cgroup: whitelist inaccessible devices for "auto" and "closed" DevicePolicy

7 years agocgroup: whitelist inaccessible devices for "auto" and "closed" DevicePolicy. 3779/head
Alessandro Puccetti [Fri, 22 Jul 2016 10:00:49 +0000 (12:00 +0200)] 
cgroup: whitelist inaccessible devices for "auto" and "closed" DevicePolicy.

https://github.com/systemd/systemd/pull/3685 introduced
/run/systemd/inaccessible/{chr,blk} to map inacessible devices,
this patch allows systemd running inside a nspawn container to create
/run/systemd/inaccessible/{chr,blk}.

7 years agonspawn: set DevicesPolicy closed and clean up duplicated devices
Alessandro Puccetti [Fri, 22 Jul 2016 09:58:03 +0000 (11:58 +0200)] 
nspawn: set DevicesPolicy closed and clean up duplicated devices

7 years agonamespace: ensure to return a valid inaccessible nodes (#3778)
Alessandro Puccetti [Fri, 22 Jul 2016 13:59:14 +0000 (15:59 +0200)] 
namespace: ensure to return a valid inaccessible nodes (#3778)

Because /run/systemd/inaccessible/{chr,blk} are devices with
major=0 and minor=0 it might be possible that these devices cannot be created
so we use /run/systemd/inaccessible/sock instead to map them.

7 years agoupdate TODO 3728/head
Lennart Poettering [Thu, 14 Jul 2016 10:26:07 +0000 (12:26 +0200)] 
update TODO

7 years agonss: add new "nss-systemd" NSS module for mapping dynamic users
Lennart Poettering [Thu, 14 Jul 2016 17:19:49 +0000 (19:19 +0200)] 
nss: add new "nss-systemd" NSS module for mapping dynamic users

With this NSS module all dynamic service users will be resolvable via NSS like
any real user.

7 years agocore: enforce user/group name validity also when creating transient units
Lennart Poettering [Thu, 14 Jul 2016 17:17:18 +0000 (19:17 +0200)] 
core: enforce user/group name validity also when creating transient units

7 years agocore: add a concept of "dynamic" user ids, that are allocated as long as a service...
Lennart Poettering [Thu, 14 Jul 2016 10:37:28 +0000 (12:37 +0200)] 
core: add a concept of "dynamic" user ids, that are allocated as long as a service is running

This adds a new boolean setting DynamicUser= to service files. If set, a new
user will be allocated dynamically when the unit is started, and released when
it is stopped. The user ID is allocated from the range 61184..65519. The user
will not be added to /etc/passwd (but an NSS module to be added later should
make it show up in getent passwd).

For now, care should be taken that the service writes no files to disk, since
this might result in files owned by UIDs that might get assigned dynamically to
a different service later on. Later patches will tighten sandboxing in order to
ensure that this cannot happen, except for a few selected directories.

A simple way to test this is:

        systemd-run -p DynamicUser=1 /bin/sleep 99999

7 years agocore: be stricter when parsing User=/Group= fields
Lennart Poettering [Thu, 14 Jul 2016 10:28:06 +0000 (12:28 +0200)] 
core: be stricter when parsing User=/Group= fields

Let's verify the validity of the syntax of the user/group names set.

7 years agosysusers: move various user credential validity checks to src/basic/
Lennart Poettering [Thu, 14 Jul 2016 10:23:39 +0000 (12:23 +0200)] 
sysusers: move various user credential validity checks to src/basic/

This way we can reuse them for validating User=/Group= settings in unit files
(to be added in a later commit).

Also, add some tests for them.

7 years agocore: check for overflow when handling scaled MemoryLimit= settings 3753/head
Lennart Poettering [Fri, 22 Jul 2016 13:30:23 +0000 (15:30 +0200)] 
core: check for overflow when handling scaled MemoryLimit= settings

Just in case...

7 years agomacros.systemd.in: add %systemd_ordering (#3776)
Harald Hoyer [Fri, 22 Jul 2016 13:33:13 +0000 (15:33 +0200)] 
macros.systemd.in: add %systemd_ordering (#3776)

To remove the hard dependency on systemd, for packages, which function
without a running systemd the %systemd_ordering macro can be used to
ensure ordering in the rpm transaction. %systemd_ordering makes sure,
the systemd rpm is installed prior to the package, so the %pre/%post
scripts can execute the systemd parts.

Installing systemd afterwards though, does not result in the same outcome.

7 years agocore: change TasksMax= default for system services to 15%
Lennart Poettering [Tue, 19 Jul 2016 15:29:00 +0000 (17:29 +0200)] 
core: change TasksMax= default for system services to 15%

As it turns out 512 is max number of tasks per service is hit by too many
applications, hence let's bump it a bit, and make it relative to the system's
maximum number of PIDs. With this change the new default is 15%. At the
kernel's default pids_max value of 32768 this translates to 4915. At machined's
default TasksMax= setting of 16384 this translates to 2457.

Why 15%? Because it sounds like a round number and is close enough to 4096
which I was going for, i.e. an eight-fold increase over the old 512

Summary:

            | on the host | in a container
old default |         512 |           512
new default |        4915 |          2457

7 years agologind: change TasksMax= value for user logins to 33%
Lennart Poettering [Tue, 19 Jul 2016 15:19:58 +0000 (17:19 +0200)] 
logind: change TasksMax= value for user logins to 33%

Let's change from a fixed value of 12288 tasks per user to a relative value of
33%, which with the kernel's default of 32768 translates to 10813. This is a
slight decrease of the limit, for no other reason than "33%" sounding like a nice
round number that is close enough to 12288 (which would translate to 37.5%).
(Well, it also has the nice effect of still leaving a bit of room in the PID
space if there are 3 cooperating evil users that try to consume all PIDs...
Also, I like my bikesheds blue).

Since the new value is taken relative, and machined's TasksMax= setting
defaults to 16384, 33% inside of containers is usually equivalent to 5406,
which should still be ample space.

To summarize:

               | on the host | in the container
   old default |       12288 |            12288
   new default |       10813 |             5406

7 years agomain: simplify things a bit by moving container check into fixup_environment()
Lennart Poettering [Tue, 19 Jul 2016 15:00:36 +0000 (17:00 +0200)] 
main: simplify things a bit by moving container check into fixup_environment()

7 years agocore: rename MemoryLimitByPhysicalMemory transient property to MemoryLimitScale
Lennart Poettering [Tue, 19 Jul 2016 14:10:15 +0000 (16:10 +0200)] 
core: rename MemoryLimitByPhysicalMemory transient property to MemoryLimitScale

That way, we can neatly keep this in line with the new TasksMaxScale= option.

Note that we didn't release a version with MemoryLimitByPhysicalMemory= yet,
hence this change should be unproblematic without breaking API.

7 years agocore: support percentage specifications on TasksMax=
Lennart Poettering [Tue, 19 Jul 2016 13:58:49 +0000 (15:58 +0200)] 
core: support percentage specifications on TasksMax=

This adds support for a TasksMax=40% syntax for specifying values relative to
the system's configured maximum number of processes. This is useful in order to
neatly subdivide the available room for tasks within containers.

7 years agomachine-id-setup: add new --print switch 3777/head
Lennart Poettering [Fri, 22 Jul 2016 10:21:21 +0000 (12:21 +0200)] 
machine-id-setup: add new --print switch

If specified we'll simply output the used machine ID.

7 years agocore: rework machine-id-setup.c to use the calls from id128-util.[ch]
Lennart Poettering [Fri, 22 Jul 2016 10:12:27 +0000 (12:12 +0200)] 
core: rework machine-id-setup.c to use the calls from id128-util.[ch]

This allows us to delete quite a bit of code and make the whole thing a lot
shorter.

7 years agosd-id128: handle NULL return parameter in sd_id128_from_string() nicer
Lennart Poettering [Thu, 21 Jul 2016 18:23:51 +0000 (20:23 +0200)] 
sd-id128: handle NULL return parameter in sd_id128_from_string() nicer

If the return parameter is NULL, simply validate the string, and return no
error.

7 years agomain: make sure set_machine_id() doesn't clobber arg_machine_id on failure
Lennart Poettering [Thu, 21 Jul 2016 18:22:42 +0000 (20:22 +0200)] 
main: make sure set_machine_id() doesn't clobber arg_machine_id on failure

7 years agomachine-id-setup: port machine_id_commit() to new id128-util.c APIs
Lennart Poettering [Thu, 21 Jul 2016 17:12:50 +0000 (19:12 +0200)] 
machine-id-setup: port machine_id_commit() to new id128-util.c APIs

7 years agonspawn: rework /etc/machine-id handling
Lennart Poettering [Thu, 21 Jul 2016 16:53:40 +0000 (18:53 +0200)] 
nspawn: rework /etc/machine-id handling

With this change we'll no longer write to /etc/machine-id from nspawn, as that
breaks the --volatile= operation, as it ensures the image is never considered
in "first boot", since that's bound to the pre-existance of /etc/machine-id.

The new logic works like this:

- If /etc/machine-id already exists in the container, it is read by nspawn and
  exposed in "machinectl status" and friends.

- If the file doesn't exist yet, but --uuid= is passed on the nspawn cmdline,
  this UUID is passed in $container_uuid to PID 1, and PID 1 is then expected
  to persist this to /etc/machine-id for future boots (which systemd already
  does).

- If the file doesn#t exist yet, and no --uuid= is passed a random UUID is
  generated and passed via $container_uuid.

The result is that /etc/machine-id is never initialized by nspawn itself, thus
unbreaking the volatile mode. However still the machine ID configured in the
machine always matches nspawn's and thus machined's idea of it.

Fixes: #3611
7 years agosystemctl: fix format string for uint64_t field
Lennart Poettering [Thu, 21 Jul 2016 16:08:52 +0000 (18:08 +0200)] 
systemctl: fix format string for uint64_t field

7 years agosystemctl: fix output alignment in "systemctl status"
Lennart Poettering [Thu, 21 Jul 2016 16:05:58 +0000 (18:05 +0200)] 
systemctl: fix output alignment in "systemctl status"

If we show both a control and a main PID for a service fix this line in the
output of "systemctl status":

 Main PID: 19670 (sleep);         : 19671 (sleep)

to become this:

 Main PID: 19670 (sleep); Control PID: 19671 (sleep)

7 years agonspawn: rework machine/boot ID handling code to use new calls from id128-util.[ch]
Lennart Poettering [Thu, 21 Jul 2016 16:01:55 +0000 (18:01 +0200)] 
nspawn: rework machine/boot ID handling code to use new calls from id128-util.[ch]

7 years agosd-id128: split UUID file read/write code into new id128-util.[ch]
Lennart Poettering [Thu, 21 Jul 2016 15:57:57 +0000 (17:57 +0200)] 
sd-id128: split UUID file read/write code into new id128-util.[ch]

We currently have code to read and write files containing UUIDs at various
places. Unify this in id128-util.[ch], and move some other stuff there too.

The new files are located in src/libsystemd/sd-id128/ (instead of src/shared/),
because they are actually the backend of sd_id128_get_machine() and
sd_id128_get_boot().

In follow-up patches we can use this reduce the code in nspawn and
machine-id-setup by adopted the common implementation.

7 years agotree-wide: use sd_id128_is_null() instead of sd_id128_equal where appropriate
Lennart Poettering [Thu, 21 Jul 2016 14:06:31 +0000 (16:06 +0200)] 
tree-wide: use sd_id128_is_null() instead of sd_id128_equal where appropriate

It's a bit easier to read because shorter. Also, most likely a tiny bit faster.

7 years agoMerge pull request #3762 from poettering/sigkill-log
Martin Pitt [Fri, 22 Jul 2016 07:18:30 +0000 (09:18 +0200)] 
Merge pull request #3762 from poettering/sigkill-log

log about all processes we forcibly kill

7 years agoMerge pull request #3764 from poettering/assorted-stuff-2
Martin Pitt [Fri, 22 Jul 2016 07:10:04 +0000 (09:10 +0200)] 
Merge pull request #3764 from poettering/assorted-stuff-2

Assorted fixes

7 years agonspawn: enable major=0/minor=0 devices inside the container (#3773)
Alessandro Puccetti [Thu, 21 Jul 2016 15:39:38 +0000 (17:39 +0200)] 
nspawn: enable major=0/minor=0 devices inside the container (#3773)

https://github.com/systemd/systemd/pull/3685 introduced
/run/systemd/inaccessible/{chr,blk} to map inacessible devices,
this patch allows systemd running inside a nspawn container to create
/run/systemd/inaccessible/{chr,blk}.

7 years agomissing_syscall: add __NR_copy_file_range for powerpc architecture (#3772)
Alessio Igor Bogani [Thu, 21 Jul 2016 09:40:35 +0000 (11:40 +0200)] 
missing_syscall: add __NR_copy_file_range for powerpc architecture (#3772)

7 years agogpt-generator: relax EFI check a bit 3757/head
Lennart Poettering [Thu, 21 Jul 2016 09:30:02 +0000 (11:30 +0200)] 
gpt-generator: relax EFI check a bit

Previously, we'd not mount the ESP except on EFI boots, and only when the ESP
used for booting matches the ESP we found.

With this change on non-EFI boots we'll mount a discovered ESP anyway, and on
EFI boots we'll only mount it if it matches the ESP we booted from.

7 years agokernel-install: when searching for location to place kernel consider /efi
Lennart Poettering [Tue, 19 Jul 2016 19:08:57 +0000 (21:08 +0200)] 
kernel-install: when searching for location to place kernel consider /efi

With this change kernel-install will now first look for an existing kernel
installation in /efi, /boot and /boot/efi. If none is found, /efi is used if it
is a mount point, otherwise /boot/efi if it is one. If nothing of that worked
/boot is used without further checking.

This means /boot should be the default unless something was installed before or
something else was explicitly mounted.

7 years agobootctl: modernize install_loader_config()
Lennart Poettering [Tue, 19 Jul 2016 18:48:22 +0000 (20:48 +0200)] 
bootctl: modernize install_loader_config()

let's the proper APIs to read the machine ID, and properly check for all
errors.

7 years agobootctl: various coding style updates
Lennart Poettering [Tue, 19 Jul 2016 18:47:09 +0000 (20:47 +0200)] 
bootctl: various coding style updates

7 years agobootctl: clean up get_file_version()
Lennart Poettering [Tue, 19 Jul 2016 18:46:17 +0000 (20:46 +0200)] 
bootctl: clean up get_file_version()

Make sure that we always initialize the return parameter on success, and that
all errors result in an error message, not just some.

7 years agobootctl: use F_TYPE_EQUAL() to compare statfs' .f_type field
Lennart Poettering [Tue, 19 Jul 2016 18:45:10 +0000 (20:45 +0200)] 
bootctl: use F_TYPE_EQUAL() to compare statfs' .f_type field

After all, the field is kinda borked.

7 years agobootctl: move toupper() implementation to string-util.h
Lennart Poettering [Tue, 19 Jul 2016 18:43:54 +0000 (20:43 +0200)] 
bootctl: move toupper() implementation to string-util.h

We already have tolower() calls there, hence let's unify this at one place.
Also, update the code to only use ASCII operations, so that we don't end up
being locale dependant.

7 years agoman: add missing whitespace to bootctl command lines
Lennart Poettering [Tue, 19 Jul 2016 18:30:16 +0000 (20:30 +0200)] 
man: add missing whitespace to bootctl command lines

7 years agoman: use <filename> in bootctl man page where appropriate
Lennart Poettering [Tue, 19 Jul 2016 18:29:21 +0000 (20:29 +0200)] 
man: use <filename> in bootctl man page where appropriate

7 years agobootctl: make use of STRV_FOREACH() where we can
Lennart Poettering [Tue, 19 Jul 2016 18:26:24 +0000 (20:26 +0200)] 
bootctl: make use of STRV_FOREACH() where we can

7 years agobootctl: rework to use common verbs parsing, and add searching of ESP path
Lennart Poettering [Tue, 19 Jul 2016 18:19:20 +0000 (20:19 +0200)] 
bootctl: rework to use common verbs parsing, and add searching of ESP path

This rearranges bootctl a bit, so that it uses the usual verbs parsing
routines, and automatically searches the ESP in /boot, /efi or /boot/efi, thus
increasing compatibility with mainstream distros that insist on /boot/efi.

This also adds minimal support for running bootctl in a container environment:
when run inside a container verification of the ESP via raw block device
access, trusting the container manager to mount the ESP correctly. Moreover,
EFI variables are not accessed when running in the container.

7 years agobootctl: fix error message check
Lennart Poettering [Tue, 19 Jul 2016 16:40:03 +0000 (18:40 +0200)] 
bootctl: fix error message check

7 years agobootctl: minor coding style improvements
Lennart Poettering [Tue, 19 Jul 2016 16:39:54 +0000 (18:39 +0200)] 
bootctl: minor coding style improvements

7 years agonspawn: if an ESP is part of the disk image to operate on, mount it to /efi or /boot
Lennart Poettering [Tue, 19 Jul 2016 16:36:04 +0000 (18:36 +0200)] 
nspawn: if an ESP is part of the disk image to operate on, mount it to /efi or /boot

Matching the behaviour of gpt-auto-generator, if we find an ESP while
dissecting a container image, mount it to /efi or /boot if those dirs exist and
are empty.

This should enable us to run "bootctl" inside a container and do the right
thing.

7 years agogpt-generator: use /efi as mount point for the ESP if it exists
Lennart Poettering [Tue, 19 Jul 2016 16:19:29 +0000 (18:19 +0200)] 
gpt-generator: use /efi as mount point for the ESP if it exists

Let's make the EFI generator a bit smarter: if /efi exists it is used as mount
point for the ESP, otherwise /boot is used. This should increase compatibility
with distros which use legacy boot loaders that insist on having /boot as
something that isn't the ESP.

7 years agoupdate TODO
Lennart Poettering [Thu, 21 Jul 2016 09:09:24 +0000 (11:09 +0200)] 
update TODO

7 years agohwdb: axis resolution override for the Lenovo Y700 (#3769)
Peter Hutterer [Thu, 21 Jul 2016 08:55:36 +0000 (18:55 +1000)] 
hwdb: axis resolution override for the Lenovo Y700 (#3769)

https://bugs.freedesktop.org/show_bug.cgi?id=97011

7 years agoMerge pull request #3770 from AlexanderKurtz/master
Lennart Poettering [Thu, 21 Jul 2016 08:55:05 +0000 (10:55 +0200)] 
Merge pull request #3770 from AlexanderKurtz/master

bootctl: Always use upper case for "/EFI/BOOT" and "/EFI/BOOT/BOOT*.EFI".

7 years agocore: remove duplicate includes (#3771)
Thomas H. P. Andersen [Thu, 21 Jul 2016 08:52:07 +0000 (10:52 +0200)] 
core: remove duplicate includes (#3771)

7 years agoMerge pull request #3760 from poettering/rfkill-fix
Zbigniew Jędrzejewski-Szmek [Thu, 21 Jul 2016 02:19:05 +0000 (22:19 -0400)] 
Merge pull request #3760 from poettering/rfkill-fix

rfkill dead-lock fix

7 years agodocumentation: add a short document describing how to test your systemd build tree...
Lennart Poettering [Thu, 21 Jul 2016 02:15:54 +0000 (04:15 +0200)] 
documentation: add a short document describing how to test your systemd build tree (#3763)

7 years agobootctl: Always use upper case for "/EFI/BOOT" and "/EFI/BOOT/BOOT*.EFI". 3770/head
Alexander Kurtz [Thu, 21 Jul 2016 00:29:54 +0000 (02:29 +0200)] 
bootctl: Always use upper case for "/EFI/BOOT" and "/EFI/BOOT/BOOT*.EFI".

If the ESP is not mounted with "iocharset=ascii", but with "iocharset=utf8"
(which is for example the default in Debian), the file system becomes case
sensitive. This means that a file created as "FooBarBaz" cannot be accessed as
"foobarbaz" since those are then considered different files.

Moreover, a file created as "FooBar" can then also not be accessed as "foobar",
and it also prevents such a file from being created, as both would use the same
8.3 short name "FOOBAR".

Even though the UEFI specification [0] does give the canonical spelling for
the files mentioned above, not all implementations completely conform to that,
so it's possible that those files would already exist, but with a different
spelling, causing subtle bugs when scanning or modifying the ESP.

While the proper fix would of course be that everybody conformed to the
standard, we can work around this problem by just referencing the files by
their 8.3 short names, i.e. using upper case.

Fixes: #3740
[0] <http://www.uefi.org/specifications>, version 2.6, section 3.5.1.1

7 years agobootctl: Use lower case string constants in case-insensitive comparisons.
Alexander Kurtz [Thu, 21 Jul 2016 00:20:12 +0000 (02:20 +0200)] 
bootctl: Use lower case string constants in case-insensitive comparisons.

7 years agonamespace: fix wrong return value from mount(2) (#3758)
Topi Miettinen [Wed, 20 Jul 2016 14:43:21 +0000 (14:43 +0000)] 
namespace: fix wrong return value from mount(2) (#3758)

Fix bug introduced by #3263: mount(2) return value is 0 or -1, not errno.

Thanks to Evgeny Vereshchagin (@evverx) for reporting.

7 years agobasic: fix macro definition in nss-util.h 3764/head
Lennart Poettering [Thu, 14 Jul 2016 17:16:19 +0000 (19:16 +0200)] 
basic: fix macro definition in nss-util.h

Fix a copy/paste mistake.

7 years agoexecute: make sure JoinsNamespaceOf= doesn't leak ns fds to executed processes
Lennart Poettering [Thu, 14 Jul 2016 11:12:01 +0000 (13:12 +0200)] 
execute: make sure JoinsNamespaceOf= doesn't leak ns fds to executed processes

7 years agonamespace: add a (void) cast
Lennart Poettering [Thu, 14 Jul 2016 10:28:54 +0000 (12:28 +0200)] 
namespace: add a (void) cast

7 years agonspawn: when netns is on, mount /proc/sys/net writable
Lennart Poettering [Thu, 14 Jul 2016 14:53:13 +0000 (16:53 +0200)] 
nspawn: when netns is on, mount /proc/sys/net writable

Normally we make all of /proc/sys read-only in a container, but if we do have
netns enabled we can make /proc/sys/net writable, as things are virtualized
then.

7 years agonspawn: document why the uid shift range is the way it is
Lennart Poettering [Thu, 14 Jul 2016 10:25:32 +0000 (12:25 +0200)] 
nspawn: document why the uid shift range is the way it is

7 years agoconf-parser: minor coding style improvements
Lennart Poettering [Thu, 14 Jul 2016 10:24:59 +0000 (12:24 +0200)] 
conf-parser: minor coding style improvements

7 years agounits: fix TasksMax=16384 for systemd-nspawn@.service
Lennart Poettering [Thu, 14 Jul 2016 10:20:29 +0000 (12:20 +0200)] 
units: fix TasksMax=16384 for systemd-nspawn@.service

When a container scope is allocated via machined it gets 16K set already since
cf7d1a30e44bf380027a2e73f9bf13f423a33cc1. Make sure when a container is run as
system service it gets the same values.

7 years agocore: normalize header inclusion in execute.h a bit
Lennart Poettering [Sat, 2 Jul 2016 02:58:14 +0000 (19:58 -0700)] 
core: normalize header inclusion in execute.h a bit

We don't actually need any functionality from cgroup.h in execute.h, hence
don't include that. However, we do need the Unit structure from unit.h, hence
include that, and move it as late as possible, since it needs the definitions
from execute.h.

7 years agoexecute: normalize connect_logger_as() parameters slightly
Lennart Poettering [Sat, 2 Jul 2016 02:57:21 +0000 (19:57 -0700)] 
execute: normalize connect_logger_as() parameters slightly

All other functions in execute.c that need the unit id take a Unit* parameter
as first argument. Let's change connect_logger_as() to follow a similar logic.

7 years agologind: always abandon session scopes before killing them 3762/head
Lennart Poettering [Wed, 20 Jul 2016 11:42:36 +0000 (13:42 +0200)] 
logind: always abandon session scopes before killing them

This way systemd is informed that we consider everything inside the scope as
"left-over", and systemd can log about killing it.

With this change systemd will log about all processes killed due to the session
clean-up on KillUserProcesses=yes.

7 years agocore: when a scope was abandoned, always log about processes we kill
Lennart Poettering [Wed, 20 Jul 2016 11:41:32 +0000 (13:41 +0200)] 
core: when a scope was abandoned, always log about processes we kill

After all, if a unit is abandoned, all processes inside of it may be considered
"left over" and are something we should better log about.

7 years agocore: make sure RequestStop signal is send directed
Lennart Poettering [Wed, 20 Jul 2016 11:39:23 +0000 (13:39 +0200)] 
core: make sure RequestStop signal is send directed

This was accidentally left commented out for debugging purposes, let's fix that
and make the signal directed again.

7 years agocgroup: suppress sending follow-up SIGCONT after sending SIGCONT/SIGKILL anyway
Lennart Poettering [Wed, 20 Jul 2016 09:16:53 +0000 (11:16 +0200)] 
cgroup: suppress sending follow-up SIGCONT after sending SIGCONT/SIGKILL anyway

7 years agocore: when forcibly killing/aborting left-over unit processes log about it
Lennart Poettering [Wed, 20 Jul 2016 09:16:05 +0000 (11:16 +0200)] 
core: when forcibly killing/aborting left-over unit processes log about it

Let's lot at LOG_NOTICE about any processes that we are going to
SIGKILL/SIGABRT because clean termination of them didn't work.

This turns the various boolean flag parameters to cg_kill(), cg_migrate() and
related calls into a single binary flags parameter, simply because the function
now gained even more parameters and the parameter listed shouldn't get too
long.

Logging for killing processes is done either when the kill signal is SIGABRT or
SIGKILL, or on explicit request if KILL_TERMINATE_AND_LOG instead of LOG_TERMINATE
is passed. This isn't used yet in this patch, but is made use of in a later
patch.

7 years agoPO: italian updates (#3761)
Daniele Medri [Wed, 20 Jul 2016 11:02:28 +0000 (13:02 +0200)] 
PO: italian updates (#3761)

7 years agoutil: don't send SIGCONT following a SIGCONT or SIGKILL in kill_and_sigcont()
Lennart Poettering [Wed, 20 Jul 2016 09:14:48 +0000 (11:14 +0200)] 
util: don't send SIGCONT following a SIGCONT or SIGKILL in kill_and_sigcont()

7 years agologind: minor coding style improvements
Lennart Poettering [Wed, 20 Jul 2016 09:14:18 +0000 (11:14 +0200)] 
logind: minor coding style improvements

7 years agoMerge pull request #3759 from poettering/namespace-fixup
Lennart Poettering [Wed, 20 Jul 2016 07:22:40 +0000 (09:22 +0200)] 
Merge pull request #3759 from poettering/namespace-fixup

minor follow-up fixes for #3685