summaryrefslogtreecommitdiff
path: root/src
AgeCommit message (Collapse)Author
2016-08-04basic/set: remove some spurious spacesZbigniew Jędrzejewski-Szmek
2016-08-04Merge pull request #3885 from keszybz/help-outputLennart Poettering
Update help for "short-full" and shorten to 80 columns
2016-08-04networkd: add support to configure NOARP/ARP for interface (#3854)Susant Sahani
https://lists.freedesktop.org/archives/systemd-devel/2016-August/037268.html
2016-08-04networkd: remove route if carrier is lost (#3831)Susant Sahani
Fixes #3669.
2016-08-04src/test: add tests for parse_percent_unbounded (#3889)Jonathan Boulle
2016-08-04nspawn,resolve: short --help output to fit within 80 columnsZbigniew Jędrzejewski-Szmek
make dist-check-help FTW!
2016-08-04journalctl,systemctl: add "short-full", "short-unix" mode to --helpZbigniew Jędrzejewski-Szmek
2016-08-04util-lib: add parse_percent_unbounded() for percentages over 100% (#3886)David Michael
This permits CPUQuota to accept greater values as documented.
2016-08-03Merge pull request #3820 from poettering/nspawn-resolvconfZbigniew Jędrzejewski-Szmek
nspawn resolv.conf handling improvements, and inherit $TERM all the way through nspawn → console login
2016-08-03journalctl: add new output mode "short-full" (#3880)Lennart Poettering
This new output mode formats all timestamps using the usual format_timestamp() call we use pretty much everywhere else. Timestamps formatted this way are some ways more useful than traditional syslog timestamps as they include weekday, month and timezone information, while not being much longer. They are also not locale-dependent. The primary advantage however is that they may be passed directly to journalctl's --since= and --until= switches as soon as #3869 is merged. While we are at it, let's also add "short-unix" to shell completion.
2016-08-03util-lib: make timestamp generation and parsing reversible (#3869)Lennart Poettering
This patch improves parsing and generation of timestamps and calendar specifications in two ways: - The week day is now always printed in the abbreviated English form, instead of the locale's setting. This makes sure we can always parse the week day again, even if the locale is changed. Given that we don't follow locale settings for printing timestamps in any other way either (for example, we always use 24h syntax in order to make uniform parsing possible), it only makes sense to also stick to a generic, non-localized form for the timestamp, too. - When parsing a timestamp, the local timezone (in its DST or non-DST name) may be specified, in addition to "UTC". Other timezones are still not supported however (not because we wouldn't want to, but mostly because libc offers no nice API for that). In itself this brings no new features, however it ensures that any locally formatted timestamp's timezone is also parsable again. These two changes ensure that the output of format_timestamp() may always be passed to parse_timestamp() and results in the original input. The related flavours for usec/UTC also work accordingly. Calendar specifications are extended in a similar way. The man page is updated accordingly, in particular this removes the claim that timestamps systemd prints wouldn't be parsable by systemd. They are now. The man page previously showed invalid timestamps as examples. This has been removed, as the man page shouldn't be a unit test, where such negative examples would be useful. The man page also no longer mentions the names of internal functions, such as format_timestamp_us() or UNIX error codes such as EINVAL.
2016-08-03systemctl: consider service running only when it is in active or reloading ↵Lukáš Nykrýn
state (#3874) Otherwise for example services that are failing on start and have Restart=on-failure and bigger RestartSec systemctl status will return 0. Fixes: #3864
2016-08-03nspawn: if we can't mark the boot ID RO let's failLennart Poettering
It's probably better to be safe here.
2016-08-03execute: don't set $SHELL and $HOME for services, if they don't contain ↵Lennart Poettering
interesting data
2016-08-03core: inherit TERM from PID 1 for all services started on /dev/consoleLennart Poettering
This way, invoking nspawn from a shell in the best case inherits the TERM setting all the way down into the login shell spawned in the container. Fixes: #3697
2016-08-03core: drop spurious newlineLennart Poettering
2016-08-03nspawn: deprecate --share-system supportLennart Poettering
This removes the --share-system switch: from the documentation, the --help text as well as the command line parsing. It's an ugly option, given that it kinda contradicts the whole concept of PID namespaces that nspawn implements. Since it's barely ever used, let's just deprecate it and remove it from the options. It might be useful as a debugging option, hence the functionality is kept around for now, exposed via an undocumented $SYSTEMD_NSPAWN_SHARE_SYSTEM environment variable.
2016-08-03nspawn: try to bind mount resolved's resolv.conf snippet into the containerLennart Poettering
This has the benefit that the container can follow the host's DNS server changes without us having to constantly update the container's resolv.conf settings.
2016-08-03Merge pull request #3828 from keszybz/drop-systemd-vconsole-setup-serviceLennart Poettering
Update documentation for systemd-vconsole-setup
2016-08-02socket: add support to control no. of connections from one source (#3607)Susant Sahani
Introduce MaxConnectionsPerSource= that is number of concurrent connections allowed per IP. RFE: 1939
2016-08-02Merge pull request #3858 from jfilak/coredump-containers-v2Zbigniew Jędrzejewski-Szmek
Coredump: save information useful for debuging crashes in containers - v2
2016-08-02test: fix test-execute personality tests on ppc64 and aarch64 (#3825)Jan Synacek
2016-08-02gitignore: libsystemd-journal.pc is no more (#3863)Zbigniew Jędrzejewski-Szmek
…since 4de282cf9324ab.
2016-08-02coredump: save process container parent cmdlineJakub Filak
Process container parent is the process used to start processes with a new user namespace - e.g systemd-nspawn, runc, lxc, etc. There is not standard way how to find such a process - or I do not know about it - hence I have decided to find the first process in the parent process hierarchy with a different mount namespace and different /proc/self/root's inode. I have decided for this criteria because in ABRT we take special care only if the crashed process runs different code than installed on the host. Other processes with namespaces different than PID 1's namespaces are just processes running code shipped by the OS vendor and bug reporting tools can get information about the provider of the code without the need to deal with changed root and so on.
2016-08-02main: load Smack policy before IMA policy (#3859)Ismo Puustinen
IMA wiki says: "If the IMA policy contains LSM labels, then the LSM policy must be loaded prior to the IMA policy." Right now, in case of Smack, the IMA policy is loaded before the Smack policy. Move the order around to allow Smack labels to be used in IMA policy.
2016-08-02coredump: save /proc/[pid]/mountinfoJakub Filak
The file contains information one can use to debug processes running within a container.
2016-08-01machinectl: hide legend in a case when no data (#3839)0xAX
For this moment machinectl prints legend and count of machines/images/etc. But in a case when we have no images,machines,etc., there is no sense to show legend: ~$ machinectl MACHINE CLASS SERVICE 0 machines listed. Let's print only 'No machines', 'No images', 'No transfers' in this case.
2016-08-01virt: detect bhyve (FreeBSD hypervisor) (#3840)Leonardo Brondani Schenkel
The CPUID and DMI vendor strings do not seem to be documented. Values were found experimentally and by inspecting the source code.
2016-08-01main: get rid of ACTION_DONE (#3849)0xAX
the ACTION_DONE was introduced in the 4288f61921 (dbus: automatically generate and install introspection files ) commit and was used in systemd --introspect command. Later 'introspect' command was removed in the ca2871d9b (bus: remove static introspection file export) commit and have no users anymore. So we can remove it.
2016-07-31vconsole-setup: add lots of debug messagesZbigniew Jędrzejewski-Szmek
For error messages, make them more meaningful by printing the tty name. Follow-up for #3742.
2016-07-31Add enable_disable() helperZbigniew Jędrzejewski-Szmek
In this patch "enabled" and "disabled" is used exclusively, but "enable" and "disable" forms are need for the following patch.
2016-07-31Merge pull request 3821 from davide125/fix-testsZbigniew Jędrzejewski-Szmek
2016-07-31test-path-util: check for /lt-test-path-util or /test-path-util (#3841)Mike Gilbert
Depending on how binutils was configured and the --enable-fast-install configure option, the test binary might be called either name. Fixes: https://github.com/systemd/systemd/issues/3838
2016-07-31logind: 0% and 100% should be valid for UserTasksMax (#3836)Tejun Heo
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-29tests: don't run private device tests if running in a containerSteve Muir
Private devices don't exist when running in a container, so skip the related tests.
2016-07-29tests: skip process 1 tests if systemd not is runningDavide Cavalca
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-29tests: don't test hostname if it looks like an id128Steve Muir
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-28Merge pull request #3742 from msoltyspl/vconfix2Zbigniew Jędrzejewski-Szmek
vconsole-setup: updates & fixes V2
2016-07-27systemctl: be sure to be quiet with 'systemctl is-enabled --quiet' (#3819)Christian Rebischke
Fixes #3813.
2016-07-26string-util: rework memory_erase() to not use GCC optimize attribute (#3812)Michael Biebl
"#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-27vconsole: correct kernel command line namespaceMichal Soltys
2016-07-27vconsole: add copyright lineMichal Soltys
2016-07-27vconsole: use KD_FONT_OP_GET/SET to handle copyingMichal Soltys
We now use KD_FONT_OP_GET & KD_FONT_OP_SET instead of problematic KD_FONT_OP_COPY.
2016-07-27vconsole: updates of keyboard/font loading functionsMichal Soltys
Change return convention to -errno/==0 and use isempty() instead of just pointer tests.
2016-07-27vconsole: Add generic is_*() functionsMichal Soltys
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-27vconsole: add two new toggle functions, remove old enable/disable onesMichal Soltys
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-27vconsole: copy font to 63 consoles instead of 15Michal Soltys
We copy only to allocated consoles, so the cost of looping over all possible ones is minuscule.
2016-07-27vconsole: don't do GIO_SCRNMAP / GIO_UNISCRNMAPMichal Soltys
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-26nspawn: add SYSTEMD_NSPAWN_USE_CGNS env variable (#3809)Christian Brauner
SYSTEMD_NSPAWN_USE_CGNS allows to disable the use of cgroup namespaces.
2016-07-26systemctl: allow disable on the unit file path, but warn about it (#3806)Michal Sekletar
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.