1
0
mirror of https://github.com/systemd/systemd.git synced 2024-10-27 18:55:40 +03:00
Commit Graph

1386 Commits

Author SHA1 Message Date
Lennart Poettering
a6278b8830 bus: replace sd_bus_label_{escape,unescape}() by new sd_bus_path_{encode,decode}()
The new calls work similarly, but enforce a that a common, fixed bus
path prefix is used.

This follows discussions with Simon McVittie on IRC that it should be a
good idea to make sure that people don't use the escaping applied here
too wildly as anything other than the last label of a bus path.
2014-03-11 19:03:50 +01:00
Lennart Poettering
e41969e3d1 core: support globbing matches in DeviceAllow= when checking for device groups 2014-03-11 17:43:41 +01:00
Andrey Borzenkov
4a77ca700d man: fix description of systemctl --after/--before
It was backward - --after fetches After property, so units shown really
come *before* unit given as argument. Same for --before.
2014-03-11 05:29:43 +01:00
Lennart Poettering
252094eb05 man: multiple sleep modes are to be separated by whitespace, not commas
As pointed out by Jason A. Donenfeld.
2014-03-11 05:24:22 +01:00
Lennart Poettering
1b9e5b1263 nspawn: add --image= switch to boot GPT disk images that follow the Discoverable Partitions Specification 2014-03-10 20:35:52 +01:00
Lennart Poettering
79fbcd8869 man: fix formatting of uuids 2014-03-10 17:21:16 +01:00
poma
7abaad1ab0 man: fix example in systemd.link
'man/systemd.link.xml' recovery from:

commit eac684ef1c
Author: Tom Gundersen <teg@jklm.no>
Date:   Tue Feb 25 19:30:40 2014 +0100

    man: split out systemd.net{work,dev}(5) from systemd-networkd(8)
2014-03-09 18:22:18 +01:00
Lennart Poettering
fb255b31c5 man: reference the Discoverable Partitions Spec from the gpt-auto-generator man page 2014-03-07 18:50:43 +01:00
Zbigniew Jędrzejewski-Szmek
7d06ef0a5c man: add missing comma
marcosf0> missing comma in udevadm "see also" section
2014-03-07 00:17:18 -05:00
Zbigniew Jędrzejewski-Szmek
d86dd07d46 build-sys: update intructions for Makefile-man.am regeneration 2014-03-06 23:24:30 -05:00
Zbigniew Jędrzejewski-Szmek
effbc8e4f7 man: describe functions for appending to messages 2014-03-06 23:24:20 -05:00
Lennart Poettering
73b80ec2d9 gpt-auto-generator: automatically find the root disk of the system
When run in an initrd and no root= argument is set (or is set to
root=gpt-auto) we will automatically look for the root partition on the
same disk the EFI ESP is located on.

Since we look for swap, /home and /srv on the disk the root partition is
located on, we hence have a fully discoverable chain:

    Firmware discovers the EFI ESP partition → the initrd discovers the
    root partition → the host OS discovers swap, /home, and /srv.

Note that this requires an EFI boot loader that sets the
LoaderDevicePartUUID EFI variable, such as Gummiboot.
2014-03-07 04:31:26 +01:00
Zachary Cook
82ed60080d man: systemd-bootchart - fix spacing in command
Use the same formatting as the systemd-analyze man page, so that man shows a space.
2014-03-06 12:41:50 -08:00
Zbigniew Jędrzejewski-Szmek
27d14fb331 man: update link to LSB
https://bugzilla.redhat.com/show_bug.cgi?id=1073402
2014-03-06 08:11:14 -05:00
Lennart Poettering
9788205f45 man: bring gpt-auto-generator up to date 2014-03-06 05:04:51 +01:00
Umut Tezduyar Lindskog
848e3e24b0 man: ipv4 link-local 2014-03-05 21:46:31 +01:00
Lennart Poettering
4de33e7f32 systemd-run: make sure --nice=, --uid=, --gid=, --setenv= also work in --scope mode 2014-03-05 19:03:10 +01:00
Lennart Poettering
981ee55194 man: document missing options of systemd-run 2014-03-05 03:37:48 +01:00
Lennart Poettering
df31a6c0fe systemd-run: add new --property= switch that can set arbitrary properties for the unit that is created
The code for parsing these properties is shared with "systemctl
set-property", which means all the resource control settings are
immediately available.
2014-03-05 03:36:22 +01:00
Lennart Poettering
1c231f5648 logind: make $XDG_RUNTIME_DIR a per-user tmpfs
This way each user allocates from his own pool, with its own size limit.

This puts the size limit by default to 10% of the physical RAM size but
makes it configurable in logind.conf.
2014-03-04 20:02:50 +01:00
Umut Tezduyar Lindskog
2149158578 man: networkd - fix typo 2014-03-04 10:51:42 +01:00
Lennart Poettering
6a79c58603 logind: ignore lid switch if more than 1 display is connected
Previously we expected the desktop environment to take an inhibitor
lock, but this opened a race on boot-up where logind might already be
running but no DE is active.

Hence, let's move checking for additional displays into logind. This
also opens up this logic for other DEs, given that only GNOME
implemented the inhibitor logic so far.
2014-03-03 19:32:43 +01:00
Tom Gundersen
ae833394d6 man: networkd - mention resolv.conf symlink 2014-03-03 18:25:55 +01:00
Lennart Poettering
e66cf1a3f9 core: introduce new RuntimeDirectory= and RuntimeDirectoryMode= unit settings
As discussed on the ML these are useful to manage runtime directories
below /run for services.
2014-03-03 17:55:32 +01:00
Zbigniew Jędrzejewski-Szmek
1ae383a8a3 Use /var/run/dbus/system_bus_socket for the D-Bus socket 2014-02-25 21:26:42 -05:00
Lennart Poettering
df1e020461 Revert back to /var/run at a couple of problems
This partially reverts 41a55c46ab

Some specifications we want to stay compatibility actually document
/var/run, not /run, and we should stay compatible with that. In order to
make sure our D-Bus implementation works on any system, regardless if
running systemd or not, we should always use /var/run which is the
only path mandated by the D-Bus spec.

Similar, glibc hardcodes the utmp location to /var/run, and this is
exposed in _UTMP_PATH in limits.h, hence let's stay in sync with this
public API, too.

We simply do not support systems where /var/run is not a symlink → /run.
Hence both are equivalent. Staying compatible with upstream
specifications hence weighs more than cleaning up superficial
appearance.
2014-02-26 02:47:43 +01:00
Zbigniew Jędrzejewski-Szmek
41a55c46ab Replace /var/run with /run in remaining places
/run was already used almost everywhere, fix the remaining places
for consistency.
2014-02-25 20:41:24 -05:00
Lennart Poettering
f513e420c8 exec: imply NoNewPriviliges= only when seccomp filters are used in user mode 2014-02-26 02:28:52 +01:00
Lennart Poettering
4298d0b512 core: add new RestrictAddressFamilies= switch
This new unit settings allows restricting which address families are
available to processes. This is an effective way to minimize the attack
surface of services, by turning off entire network stacks for them.

This is based on seccomp, and does not work on x86-32, since seccomp
cannot filter socketcall() syscalls on that platform.
2014-02-26 02:19:28 +01:00
Tom Gundersen
fe6b2d55bc networkd: add basic support for MACVLANs 2014-02-25 21:19:08 +01:00
Tom Gundersen
e3ab0c0e19 man: refer to systemd.net{work,dev}(5) from systemd-networkd(8) 2014-02-25 19:50:26 +01:00
Tom Gundersen
eac684ef1c man: split out systemd.net{work,dev}(5) from systemd-networkd(8) 2014-02-25 19:30:40 +01:00
Tom Gundersen
1ff28eaee3 man: split out systemd.link(5) from udev(7) 2014-02-25 17:04:13 +01:00
Tom Gundersen
c7f3ba1ecd man: networkd - clarify that multiple addresses/routes are supported 2014-02-25 16:06:45 +01:00
Lennart Poettering
c74e630d0c nspawn: add new switch --network-macvlan= to add a macvlan device to the container 2014-02-25 02:37:59 +01:00
Lennart Poettering
085afe36cb core: add global settings for enabling CPUAccounting=, MemoryAccounting=, BlockIOAccounting= for all units at once 2014-02-24 23:50:10 +01:00
Lennart Poettering
8f03fd0891 man: document that per-interface sysctl variables are applied as network interfaces show up
https://bugzilla.redhat.com/show_bug.cgi?id=1062955
2014-02-23 16:43:19 +01:00
Lennart Poettering
5556b5fe41 core: clean up some confusing regarding SI decimal and IEC binary suffixes for sizes
According to Wikipedia it is customary to specify hardware metrics and
transfer speeds to the basis 1000 (SI decimal), while software metrics
and physical volatile memory (RAM) sizes to the basis 1024 (IEC binary).
So far we specified everything in IEC, let's fix that and be more
true to what's otherwise customary. Since we don't want to parse "Mi"
instead of "M" we document each time what the context used is.
2014-02-23 03:19:04 +01:00
Tom Gundersen
733f7a2c69 udev: net - allow MTU and Speed to be specified with units
This also changes the names to MTUBytes and BitsPerSecond, respectively. Notice
that the speed was mistakenly documented to be in bytes before this change.
2014-02-22 18:29:43 +01:00
Lennart Poettering
90060676c4 cgroup: Extend DeviceAllow= syntax to whitelist groups of devices, not just particular devices nodes 2014-02-22 03:05:34 +01:00
Tom Gundersen
bf175aafd2 net-util: match on the driver as exposed by ethtool if DRIVER not set
Also fix a copy-paste error that broke matching on interface name.
2014-02-21 22:59:29 +01:00
Thomas Hindoe Paaboel Andersen
d7c9a162f1 man: networkd typo fixes 2014-02-21 21:00:39 +01:00
Lennart Poettering
c8f57f5963 man: suffix networkd config file options with "="
That's what we do for all options in the other man pages. It helps
clarifying that these are options that values need to be assigned to.
2014-02-21 19:22:24 +01:00
Lennart Poettering
f7be6ffa92 man: split settings documentaiton in systemd.unit(5) into two sections 2014-02-21 19:22:24 +01:00
Lennart Poettering
b8e7a47baf man: don't document ".include" in configuration files anymore as first step to deprecate them one day 2014-02-21 19:22:24 +01:00
Tom Gundersen
edbb03e95a .network/.netdev/.link: allow to match on architecture 2014-02-21 16:05:02 +01:00
Lennart Poettering
c32acc96ef man: there is no ExecStopPre= for service units
https://bugs.freedesktop.org/show_bug.cgi?id=73177
2014-02-21 15:25:04 +01:00
Zbigniew Jędrzejewski-Szmek
6a70f3aa63 man: xinclude pkg-config note 2014-02-20 22:43:27 -05:00
Zbigniew Jędrzejewski-Szmek
4f50d2efba man: xinclude --host/--machine
As usual, those common options are pushed to the end.
2014-02-20 22:43:27 -05:00
Zbigniew Jędrzejewski-Szmek
88ae7333ee man: xinclude --user/--system 2014-02-20 22:43:27 -05:00
Zbigniew Jędrzejewski-Szmek
dfdebb1b92 man: xinclude --help/--version/--no-pager 2014-02-20 22:43:27 -05:00
Zbigniew Jędrzejewski-Szmek
7c071fda94 build-sys: add conditionals and regenerate manpage list
The list of man pages is auto generated, based on conditonal='...'
attributes in the man page itself.
2014-02-20 22:43:27 -05:00
Lennart Poettering
08af0da269 nspawn: when adding a veth interface to a bridge, use the "vb-" rather than "ve-" interface name prefix
This way we can recognize the interfaces later on to apply different
host-side configuration to them.
2014-02-21 04:02:12 +01:00
Michael Scherer
eef65bf3ee core: Add AppArmor profile switching
This permit to switch to a specific apparmor profile when starting a daemon. This
will result in a non operation if apparmor is disabled.
It also add a new build requirement on libapparmor for using this feature.
2014-02-21 03:44:20 +01:00
Lennart Poettering
099524d7b0 core: add new ConditionArchitecture() that checks the architecture returned by uname()'s machine field. 2014-02-21 02:43:14 +01:00
Tom Gundersen
a03c5fd2d8 man: networkd/udev - add to [Match] documentation 2014-02-20 23:26:52 +01:00
Tom Gundersen
e51660ae56 udev: net-config - allow interface names to be set from the hwdb 2014-02-19 23:29:51 +01:00
Lennart Poettering
14bf87881b man: fix references to .pc files which aren't separate anymore 2014-02-19 18:31:03 +01:00
Lennart Poettering
26e3ff59a6 man: don't advertise sd-daemon as embeddable anymore
It's now part of libsystemd, and should be used like any other API.
2014-02-19 18:20:12 +01:00
Thomas Hindoe Paaboel Andersen
17d47d8d2d busctl: add --no-legend and use in bash completion 2014-02-19 17:35:35 +01:00
Thomas Hindoe Paaboel Andersen
f5ca75f4a1 man: busctl typo fix 2014-02-19 17:02:45 +01:00
Lennart Poettering
b67f562c9c man: document $MAINPID 2014-02-19 03:27:03 +01:00
Lennart Poettering
ac45f971a1 core: add Personality= option for units to set the personality for spawned processes 2014-02-19 03:27:03 +01:00
Lennart Poettering
6afc95b736 nspawn: add new --personality= switch to make it easier to run 32bit containers on a 64bit host 2014-02-18 23:37:27 +01:00
Tom Gundersen
9b1c2626ce net-match: fix Driver= match
It should match on the driver of the parent device.
2014-02-18 22:34:26 +01:00
Lennart Poettering
e9642be2cc seccomp: add helper call to add all secondary archs to a seccomp filter
And make use of it where appropriate for executing services and for
nspawn.
2014-02-18 22:14:00 +01:00
Thomas Hindoe Paaboel Andersen
6bebb0add4 machinectl: remove unused --no-ask-password 2014-02-18 21:14:40 +01:00
Thomas Hindoe Paaboel Andersen
e56056e93d machinectl: add bash completion 2014-02-18 21:14:30 +01:00
Thomas Hindoe Paaboel Andersen
773e264d13 man: machinectl: there is no command 'kill-machine' 2014-02-18 17:44:03 +01:00
Tom Gundersen
482e2ac193 man: minor fixes to networkd page
Also enforce that we don't allow setting the Broadcast for IPv6 addresses.
2014-02-18 15:50:45 +01:00
Jan Engelhardt
38bf2b26bd doc: orthographic corrections 2014-02-18 03:05:19 +01:00
Jan Engelhardt
ed7e5fe37d doc: utilize the DocBook markup for some literals 2014-02-17 19:03:07 -05:00
Jan Engelhardt
deb480d1a7 doc: reword "shared per-thread" wording
Either it is shared across threads, or it is per-thread: decide.

Reading the source code, I see a thread_local identifier, so that's
that. But that does not yet preclude that a program may pass around
the pointer returned from the function among its own threads.

Do a best effort at saying so.
2014-02-17 19:03:07 -05:00
Jan Engelhardt
8dc385e770 doc: balance C indirections in function prototypes
Shift the asterisks in the documentation's prototypes such that they
are consistent among each other. Use the right side to match source code.
2014-02-17 19:03:07 -05:00
Jan Engelhardt
3c8fa0fd0f doc: properly use XML entities 2014-02-17 19:03:07 -05:00
Jan Engelhardt
dc968941bf doc: choose different words to improve clarity
I suggest the following changes to improve the way the text reads
("flows").
2014-02-17 19:03:07 -05:00
Jan Engelhardt
66f756d437 doc: resolve missing/extraneous words or inappropriate forms
Issues fixed:
* missing words required by grammar
* duplicated or extraneous words
* inappropriate forms (e.g. singular/plural), and declinations
* orthographic misspellings
2014-02-17 19:03:07 -05:00
Jan Engelhardt
73e231abde doc: update punctuation
Resolve spotted issues related to missing or extraneous commas, dashes.
2014-02-17 19:03:07 -05:00
Jan Engelhardt
48b5804a48 doc: detail what "UID" is 2014-02-17 19:03:07 -05:00
Jan Engelhardt
fc9acf252f doc: quote consistently in autoconf code
AS_HELP_STRING has been observed to expand such that the surround
function complains; play it safe and consistenly quote the example
code throughout.
2014-02-17 19:03:07 -05:00
Ansgar Burchardt
c305c32580 man: fix a typo 2014-02-17 23:59:35 +01:00
Lennart Poettering
4a3fa6ac77 Revert "man: systemd.service(5): clarify behavior of SuccessExitStatus"
This reverts commit 29e254f7f0.

Conflicts:
	man/systemd.service.xml
2014-02-17 16:37:30 +01:00
Zbigniew Jędrzejewski-Szmek
fb4729006a Some modernizations 2014-02-17 02:26:22 -05:00
Tom Gundersen
ab046dde6f nspawn: add new --network-bridge= switch
This adds the host side of the veth link to the given bridge.

Also refactor the creation of the veth interfaces a bit to set it up
from the host rather than the container. This simplifies the addition
to the bridge, but otherwise the behavior is unchanged.
2014-02-16 21:40:28 +01:00
Jason St. John
b200a92cdc man: use spaces instead of tabs
Several sections of the man pages included intermixed tabs and spaces;
this commit replaces all tabs with spaces.
2014-02-14 22:08:10 -05:00
Zbigniew Jędrzejewski-Szmek
6db2742802 man: replace STDOUT with standard output, etc.
Actually 'STDOUT' is something that doesn't appear anywhere: in the
stdlib we have 'stdin', and there's only the constant STDOUT_FILENO,
so there's no reason to use capitals. When refering to code,
STDOUT/STDOUT/STDERR are replaced with stdin/stdout/stderr, and in
other places they are replaced with normal phrases like standard
output, etc.
2014-02-14 22:03:40 -05:00
Jason St. John
bcddd5bf80 man: fix grammatical errors and other formatting issues
* standardize capitalization of STDIN, STDOUT, and STDERR
* reword some sentences for clarity
* reflow some very long lines to be shorter than ~80 characters
* add some missing <literal>, <constant>, <varname>, <option>, and <filename> tags
2014-02-14 22:03:40 -05:00
Lennart Poettering
9fccdb0f64 man: always place <programlisting> and </programlisting> in a line with actual sources, so that we don't get spurious newlines in the man page output 2014-02-14 15:56:19 +01:00
Dave Reisner
29e254f7f0 man: systemd.service(5): clarify behavior of SuccessExitStatus
The behavior of this is a little cryptic in that $MAINPID must exit as
a direct result of receiving a signal in order for a listed signal to
be considered a success condition.
2014-02-14 01:40:52 +01:00
Lennart Poettering
69c79d3c32 nspawn: add new --network-veth switch to add a virtual ethernet link to the host 2014-02-13 18:47:53 +01:00
Lennart Poettering
a42c8b54b1 nspawn: --private-network should imply CAP_NET_ADMIN 2014-02-13 14:07:59 +01:00
Lennart Poettering
aa28aefe61 nspawn: add new --network-interface= switch to move an existing interface into the container 2014-02-13 03:27:39 +01:00
Lennart Poettering
39ed67d146 nspawn: introduce --capability=all for retaining all capabilities 2014-02-13 02:45:11 +01:00
Lennart Poettering
d3b1c50833 core: add a system-wide SystemCallArchitectures= setting
This is useful to prohibit execution of non-native processes on systems,
for example 32bit binaries on 64bit systems, this lowering the attack
service on incorrect syscall and ioctl 32→64bit mappings.
2014-02-13 01:40:50 +01:00
Lennart Poettering
57183d117a core: add SystemCallArchitectures= unit setting to allow disabling of non-native
architecture support for system calls

Also, turn system call filter bus properties into complex types instead
of concatenated strings.
2014-02-13 00:24:00 +01:00
Lennart Poettering
17df7223be core: rework syscall filter
- Allow configuration of an errno error to return from blacklisted
  syscalls, instead of immediately terminating a process.

- Fix parsing logic when libseccomp support is turned off

- Only keep the actual syscall set in the ExecContext, and generate the
  string version only on demand.
2014-02-12 18:30:36 +01:00
Ronny Chevalier
c0467cf387 syscallfilter: port to libseccomp 2014-02-12 18:30:36 +01:00
Zbigniew Jędrzejewski-Szmek
21ac6ff143 man: use xinclude to de-deduplicate common text
I only tested with python-lxml. I'm not sure if xml.etree should be
deprecated.
2014-02-12 01:10:31 -05:00
Jason A. Donenfeld
f366d58dc1 pager: support SYSTEMD_LESS environment variable
This allows customization of the arguments used by less. The main
motivation is that some folks might not like having --no-init on every
invocation of less.
2014-02-12 01:10:31 -05:00
Lennart Poettering
db999e0f92 nspawn: newer kernels (>= 3.14) allow resetting the audit loginuid, make use of this 2014-02-12 03:02:09 +01:00