Commit graph

26804 commits

Author SHA1 Message Date
Tejun Heo cb3e441759 logind: 0% and 100% should be valid for UserTasksMax (#3836)
config_parse_user_tasks_max() was incorrectly accepting percentage value
between 1 and 99.  Update it to accept 0% and 100%.  This brings it in line
with TasksMax handling in systemd.
2016-07-31 21:38:47 -04:00
Zbigniew Jędrzejewski-Szmek 0d5299ef5a Merge pull request #3843 from maxime1986/minor-systemd.resource-control 2016-07-31 21:15:17 -04:00
Maxime de Roucy c23b2c70bf documentation: cgroup-v1 and systemd user instance
Explain in the systemd.resource-control man that systemd user instance can't use resource control on
cgroup-v1.
2016-07-31 15:00:59 +02:00
Maxime de Roucy 65c1cdb282 documentation: add cgroup-v2.txt link
add cgroup-v2.txt link in section "Unified and Legacy Control Group
Hierarchies" of systemd.resource-control man.
2016-07-31 14:38:56 +02:00
Steve Muir 4dd4cb8fe4 tests: don't run private device tests if running in a container
Private devices don't exist when running in a container, so skip the related
tests.
2016-07-29 14:30:46 -07:00
Davide Cavalca 76c19e9f6c tests: skip process 1 tests if systemd not is running
No point running tests against process 1 if systemd is not running as that
process. This is a rework of an unpublished patch by @9muir.
2016-07-29 14:30:46 -07:00
Steve Muir 40a23924ef tests: don't test hostname if it looks like an id128
The condition tests for hostname will fail if hostname looks like an id128.
The test function attempts to convert hostname to an id128, and if that
succeeds compare it to the machine ID (presumably because the 'hostname'
condition test is overloaded to also test machine ID). That will typically
fail, and unfortunately the 'mock' utility generates a random hostname that
happens to have the same format as an id128, thus causing a test failure.
2016-07-29 14:30:39 -07:00
Davide Cavalca e4d214efc2 tests: skip udev-test if running inside a chroot 2016-07-29 09:20:11 -07:00
Zbigniew Jędrzejewski-Szmek 0fbd465f41 Merge pull request #3742 from msoltyspl/vconfix2
vconsole-setup: updates & fixes V2
2016-07-28 23:59:06 -04:00
Davide Cavalca 4e3382bdd7 build-sys: conditionally disable LTO if requested (#3823)
This adds a --disable-lto option to ./configure, but does not change the
default behavior.
2016-07-28 23:42:45 -04:00
Christian Rebischke 689e4e6a94 systemctl: be sure to be quiet with 'systemctl is-enabled --quiet' (#3819)
Fixes #3813.
2016-07-27 22:40:20 -04:00
Dennis Wassenberg 57b8b16237 hwdb: add Lenovo X260 pointing stick speed fix
Like many other recent thinkpads the factory default pointingstick
sensitivity on these devices is quite low, making the pointingstick
very slow in moving the cursor.

This extends the existing hwdb rules for tweaking the sensitivity to
also apply to the X260 models.
2016-07-27 11:01:27 +02:00
Dennis Wassenberg 4499df99c1 hwdb: add Lenovo T560 pointing stick speed fix
Like many other recent thinkpads the factory default pointingstick
sensitivity on these devices is quite low, making the pointingstick
very slow in moving the cursor.

This extends the existing hwdb rules for tweaking the sensitivity to
also apply to the T560 models.
2016-07-27 11:00:56 +02:00
Dennis Wassenberg ded495d947 hwdb: add Lenovo T460s pointing stick speed fix
Like many other recent thinkpads the factory default pointingstick
sensitivity on these devices is quite low, making the pointingstick
very slow in moving the cursor.

This extends the existing hwdb rules for tweaking the sensitivity to
also apply to the T460s models.
2016-07-27 11:00:27 +02:00
Dennis Wassenberg 95f6fc608d hwdb: add Lenovo L460 pointing stick speed fix
Like many other recent thinkpads the factory default pointingstick
sensitivity on these devices is quite low, making the pointingstick
very slow in moving the cursor.

This extends the existing hwdb rules for tweaking the sensitivity to
also apply to the L460 models.
2016-07-27 10:59:38 +02:00
Dennis Wassenberg 612ad80482 hwdb: add Lenovo X250 pointing stick speed fix
Like many other recent thinkpads the factory default pointingstick
sensitivity on these devices is quite low, making the pointingstick
very slow in moving the cursor.

This extends the existing hwdb rules for tweaking the sensitivity to
also apply to the X250 models.
2016-07-27 10:56:50 +02:00
Dennis Wassenberg 9e67418c40 hwdb: add Lenovo T450s pointing stick speed fix
Like many other recent thinkpads the factory default pointingstick
sensitivity on these devices is quite low, making the pointingstick
very slow in moving the cursor.

This extends the existing hwdb rules for tweaking the sensitivity to
also apply to the T450s models.
2016-07-27 10:47:20 +02:00
Dennis Wassenberg f8a0b229d2 hwdb: add Lenovo L450 pointing stick speed fix
Like many other recent thinkpads the factory default pointingstick
sensitivity on these devices is quite low, making the pointingstick
very slow in moving the cursor.

This extends the existing hwdb rules for tweaking the sensitivity to
also apply to the L450 models.
2016-07-27 10:47:16 +02:00
Dennis Wassenberg d5317f3544 hwdb: add Lenovo T440p pointing stick speed fix
Like many other recent thinkpads the factory default pointingstick
sensitivity on these devices is quite low, making the pointingstick
very slow in moving the cursor.

This extends the existing hwdb rules for tweaking the sensitivity to
also apply to the T440p models.
2016-07-27 10:47:11 +02:00
Michael Biebl b6b609dbc2 string-util: rework memory_erase() to not use GCC optimize attribute (#3812)
"#pragma GCC optimize" is merely a convenience to decorate multiple
functions with attribute optimize. And the manual has this to say about
this attribute:

  This attribute should be used for debugging purposes only. It
  is not suitable in production code.

Some versions of GCC also seem to have a problem with this pragma in
combination with LTO, resulting in ICEs.

So use a different approach (indirect the memset call via a volatile
function pointer) as implemented in openssl's crypto/mem_clr.c.

Closes: #3811
2016-07-26 23:32:37 -04:00
Michal Soltys 61eca97fce vconsole: update man page
- about namespace
- about udev rules
2016-07-27 00:57:01 +02:00
Michal Soltys 9e303250ac vconsole: correct kernel command line namespace 2016-07-27 00:57:01 +02:00
Michal Soltys af7a5213f1 vconsole: add copyright line 2016-07-27 00:57:01 +02:00
Michal Soltys 8125e8d38e vconsole: Don't do static installation under sysinit.target
Udev rules cover all the necessary initializations.

As the service now is neither installed, nor installable - we can
remove explicit dependencies and RemainAfterExit=yes option.
2016-07-27 00:57:01 +02:00
Michal Soltys eb22d84b47 vconsole: use KD_FONT_OP_GET/SET to handle copying
We now use KD_FONT_OP_GET & KD_FONT_OP_SET instead of
problematic KD_FONT_OP_COPY.
2016-07-27 00:57:01 +02:00
Michal Soltys c9d2b3d0f0 vconsole: updates of keyboard/font loading functions
Change return convention to -errno/==0 and use isempty() instead
of just pointer tests.
2016-07-27 00:57:01 +02:00
Michal Soltys 03044059bf vconsole: Add generic is_*() functions
is_allocated() and is_allocated_byfd():

Checks if the console is allocated by its index (first function) or
its open descriptor (second function).

is_settable():

Checks if the console is in xlate or unicode mode, so we can adjust
is safely without interfering with X.
2016-07-27 00:57:01 +02:00
Michal Soltys 042d7f5065 vconsole: add two new toggle functions, remove old enable/disable ones
Add toggle_utf8() and toggle_utf8_sysfs() and use them in place of old
enable/disable functions. toggle_utf8() also adds iutf8 setting and is
set up to be called per-console (in subsequent patches).

Note, that old disable_utf8() didn't bother checking if it was ok
to change the kbdmode.
2016-07-27 00:57:01 +02:00
Michal Soltys 9fa71843bb vconsole: copy font to 63 consoles instead of 15
We copy only to allocated consoles, so the cost of looping over
all possible ones is minuscule.
2016-07-27 00:57:01 +02:00
Michal Soltys c2f2c51c53 vconsole: don't do GIO_SCRNMAP / GIO_UNISCRNMAP
GIO_SCRNMAP / GIO_UNISCRNMAP are related to what setfont does with -m
option - namely setting intermediate map from 8bit values into unicode
values. This map is global, so single setfont invocation sets it for
all applicable consoles.

Furthermore calling GIO_SCRNMAP before GIO_UNISCRNMAP causes issues as
the former corrupts values > 255 (UNI alone would be sufficient).

The bug can be easily tested with the following conf:

KEYMAP=pl
FONT=LatArCyrHeb-16
FONT_MAP=8859-2
2016-07-27 00:57:01 +02:00
Christian Brauner 5a8ff0e61d nspawn: add SYSTEMD_NSPAWN_USE_CGNS env variable (#3809)
SYSTEMD_NSPAWN_USE_CGNS allows to disable the use of cgroup namespaces.
2016-07-26 16:49:15 +02:00
Michal Sekletar 1d3c86c06f systemctl: allow disable on the unit file path, but warn about it (#3806)
systemd now returns an error when it is asked to perform disable on the
unit file path. In the past this was allowed, but systemd never really
considered an actual content of the [Install] section of the unit
file. Instead it performed disable on the unit name, i.e. purged all
symlinks pointing to the given unit file (undo of implicit link action
done by systemd when enable is called on the unit file path) and all
symlinks that have the same basename as the given unit file.

However, to notice that [Install] info of the file is not consulted one
must create additional symlinks manually. I argue that in most cases
users do not create such links. Let's be nice to our users and don't
break existing scripts that expect disable to work with the unit file
path.

Fixes #3706.
2016-07-26 08:25:52 -04:00
Zbigniew Jędrzejewski-Szmek 76153ad45f journald: deprecate SplitMode=login (#3805)
In this mode, messages from processes which are not part of the session
land in the main journal file, and only output of processes which are
properly part of the session land in the user's journal. This is
confusing, in particular because systemd-coredump runs outside of the
login session.

"Deprecate" SplitMode=login by removing it from documentation, to
discourage people from using it.
2016-07-26 08:19:33 +02:00
Zbigniew Jędrzejewski-Szmek dadd6ecfa5 Merge pull request #3728 from poettering/dynamic-users 2016-07-25 16:40:26 -04:00
Zbigniew Jędrzejewski-Szmek e28973ee18 Merge pull request #3757 from poettering/efi-search 2016-07-25 16:34:18 -04:00
Lennart Poettering 1a0b98c437 Merge pull request #3589 from brauner/cgroup_namespace
Cgroup namespace
2016-07-25 22:23:00 +02:00
Martin Pitt c92fcc4f43 units: add graphical-session.target user unit (#3678)
This unit acts as a dynamic "alias" target for any concrete graphical user
session like gnome-session.target; these should declare
"BindsTo=graphical-session.target" so that both targets stop and start at the
same time.

This allows services that run in a particular graphical user session (e. g.
gnome-settings-daemon.service) to declare "PartOf=graphical-session.target"
without having to know or get updated for all/new session types. This will
ensure that stopping the graphical session will stop all services which are
associated to it.
2016-07-25 22:01:35 +02:00
Lennart Poettering 38b383d9fe build-sys: metadata updates for v231 (#3803) 2016-07-25 15:49:47 -04:00
Lennart Poettering 9d372fe9af CODING_STYLE fixes (#3804)
As noted by @evverx:

0b81133fac (r72126018)
0b81133fac (r72126432)
2016-07-25 22:34:42 +03:00
Zbigniew Jędrzejewski-Szmek f86f6f829c Merge pull request #3802 from poettering/id128-fixes
Id128 fixes and more
2016-07-25 15:08:29 -04:00
Lennart Poettering 82fda58bc3 Merge pull request #3800 from keszybz/systemctl-more-cleanup
Systemctl more cleanup
2016-07-25 21:01:01 +02:00
Lennart Poettering 91c8861526 man: extend documentation on the SplitMode= setting (#3801)
Adressing https://github.com/systemd/systemd/issues/3755#issuecomment-234214273
2016-07-25 14:56:24 -04:00
Lennart Poettering 0b81133fac CODING_STYLE: document src/shared ←→ src/basic split
Addresses: https://github.com/systemd/systemd/pull/3580#issuecomment-227931168

While we are at it, also document that we focus on glibc, not any other libcs.
2016-07-25 20:54:34 +02:00
Lennart Poettering 65548c58dd sd-id128: be more liberal when reading files with 128bit IDs
Accept both files with and without trailing newlines. Apparently some rkt
releases generated them incorrectly, missing the trailing newlines, and we
shouldn't break that.
2016-07-25 20:53:26 +02:00
Lennart Poettering 87410f166e fileio: imply /tmp as directory if passed as NULL to open_tmpfile_unlinkable()
We can make this smarter one day, to honour $TMPDIR and friends, but for now,
let's just use /tmp.
2016-07-25 20:35:04 +02:00
Lennart Poettering 91fe95e158 man: minor man page fix
Addressing:

b541146bf8 (commitcomment-17997074)
2016-07-25 20:14:13 +02:00
Michael Olbrich 87d41d6244 automount: don't cancel mount/umount request on reload/reexec (#3670)
All pending tokens are already serialized correctly and will be handled
when the mount unit is done.

Without this a 'daemon-reload' cancels all pending tokens. Any process
waiting for the mount will continue with EHOSTDOWN.
This can happen when the mount unit waits for it's dependencies, e.g.
network, devices, fsck, etc.
2016-07-25 20:04:02 +02:00
Michael Olbrich 2de0b9e913 transaction: don't cancel jobs for units with IgnoreOnIsolate=true (#3671)
This is important if a job was queued for a unit but not yet started.
Without this, the job will be canceled and is never executed even though
IgnoreOnIsolate it set to 'true'.
2016-07-25 20:02:55 +02:00
Zbigniew Jędrzejewski-Szmek 9bb7194019 systemctl: use _cleanup_ for UnitCondition 2016-07-25 13:51:34 -04:00
Zbigniew Jędrzejewski-Szmek f8654baa08 systemctl: simplify machine_info_clear
It is only used with info allocated on the stack, so the pointer cannot be
NULL.
2016-07-25 13:51:34 -04:00