1
0
mirror of https://github.com/systemd/systemd.git synced 2024-11-02 10:51:20 +03:00
Commit Graph

25138 Commits

Author SHA1 Message Date
Zbigniew Jędrzejewski-Szmek
134953c99c Enable test-daemon, test-log, test-watchdog by default
Those should be safe to run, resulting in some messages in logs.
2016-03-04 21:45:45 -05:00
Zbigniew Jędrzejewski-Szmek
67a47c6096 shared/acpi-fpdt: use ENODATA for missing data and skip test
This data is simply missing on non-UEFI systems, and it is useful
to distinguish that from corrupted data.
2016-03-04 21:45:45 -05:00
Zbigniew Jędrzejewski-Szmek
a4bfedec70 Rename test-boot-timestamp to test-boot-timestamps and enable by default
The source file name and the binary name were mismatched.
Rename binary to match.

Make the test exit with TEST_SKIP if the data is missing or we
have no permissions. Otherwise, the data will be printed, which
should be safe to enable by default.
2016-03-04 21:45:45 -05:00
Zbigniew Jędrzejewski-Szmek
f26b57d12a Move test-loopback to normal tests
In the normal case lo should be already configured and this should be
a noop, even when run under root.
2016-03-04 21:45:44 -05:00
Lennart Poettering
04c760d2fe Merge pull request #2781 from keszybz/selinux-and-warnings
Selinux loading fix and warning cleanups
2016-03-03 17:46:56 +01:00
Zbigniew Jędrzejewski-Szmek
7e6be9c2ec Merge pull request #2787 from ronnychevalier/rc/systemctl_edit_rm_empty_dropin_dirs
systemctl: rm empty dropin dirs after cancelled edit
2016-03-03 11:34:09 -05:00
Ronny Chevalier
5f18271ec1 systemctl: rm empty dropin dirs after cancelled edit
Fixes #2734
2016-03-02 22:06:47 +01:00
Zbigniew Jędrzejewski-Szmek
6307c39b94 Redefine 32bit time_t format to signed
It seems that it is signed both on i386 and arm.

Avoids a stupid gcc warning on arm:

src/udev/udevadm-monitor.c: In function ‘print_device’:
src/udev/udevadm-monitor.c:44:16: warning: format ‘%u’ expects argument of type ‘unsigned int’, but argument 3 has type ‘__time_t {aka long int}’ [-Wformat=]
         printf("%-6s[%"PRI_TIME".%06ld] %-8s %s (%s)\n",
                ^
2016-03-02 10:42:28 -05:00
Zbigniew Jędrzejewski-Szmek
fed527aa5b test-sizeof: add a helper which prints variable sizes and signedness
This helps to understand misleading gcc warnings about type mismatches.
2016-03-02 10:42:27 -05:00
Zbigniew Jędrzejewski-Szmek
ada94e69cd test-selinux: add some simple tests which call functions and print the results and timings 2016-03-02 10:42:27 -05:00
Zbigniew Jędrzejewski-Szmek
5c5433ad32 selinux: use raw variants of security_compute_create and setfscreatecon
As suggested by Evgeny Vereshchagin as a follow up for
https://github.com/systemd/systemd/pull/2781#issuecomment-191043402.
2016-03-02 10:42:27 -05:00
Daniel Mack
77f911c56b Merge pull request #2779 from 0xAX/openat-opath-excess-flags
tree-wide: no need to pass excess flags to open()/openat() if O_PATH …
2016-03-02 09:16:08 +01:00
Daniel Mack
2a0b102fd4 Merge pull request #2782 from AOSC-Dev/master
po/zh_CN: attempt to refresh zh_CN translation
2016-03-02 09:14:59 +01:00
Mingcong Bai
0e44ceee3b po/zh_CN: attempt to refresh zh_CN translation 2016-03-01 20:40:18 -07:00
Zbigniew Jędrzejewski-Szmek
c3dacc8bbf selinux: always try to load the full selinux db
https://github.com/systemd/systemd/pull/2508#issuecomment-190901170
Maybe fixes https://bugzilla.redhat.com/show_bug.cgi?id=1308771.
2016-03-01 20:39:30 -05:00
Zbigniew Jędrzejewski-Szmek
e05a030f90 Merge pull request #2754 from eworm-de/ask-password
ask-password: do no print password when storing in keyring
2016-03-01 16:03:32 -05:00
Martin Pitt
1e6f55e3d5 Merge pull request #2777 from martinpitt/keymap
keymap fixes
2016-03-01 19:49:39 +01:00
Alexander Kuleshov
c4b6915670 tree-wide: no need to pass excess flags to open()/openat() if O_PATH is passed
As described in the documentation:

When O_PATH is specified in flags, flag bits other than O_CLOEXEC,
O_DIRECTORY, and O_NOFOLLOW are ignored.

So, we can remove unnecessary flags in a case when O_PATH is passed
to the open() or openat().
2016-03-02 00:42:49 +06:00
Christian Hesse
a5a4e3658d ask-password: add option --no-output to not print password to stdout
systemd-ask-password can store passwords in kernel keyring. However it
uses to print the passwords to standard output nevertheless. Depending
on where systemd-ask-password is called passwords may end on display
or in log, leaking sensitive information.
This allows to make systemd-ask-password quiet, effectively disabling
printing passwords to standard output.
2016-03-01 19:02:11 +01:00
Martin Pitt
325de0ac23 keymap: Some HP refactoring, add Probook 440 G3 keys
Apparently the vendor string for newer models now uses "svnHP" instead of
"svnHewlett-Packard", so add this alternative match to the global HP map.

Generalize matches for micmute key on ProBook 4xx.

Silence two hardwired keys on the ProBook 440 G3 that should not produce evdev
events. Thanks to Hermann Kraus for those! (See PR #2679)
2016-03-01 14:51:29 +01:00
Martin Pitt
5104943722 keymap: Add HP ZBook
https://launchpad.net/bugs/1535219
2016-03-01 14:43:43 +01:00
Daniel Mack
114761866a Merge pull request #2773 from eliasp/type-warnings
Use `PRIu64` to print `uint64_t` in log msgs
2016-03-01 10:06:51 +01:00
Zbigniew Jędrzejewski-Szmek
6014237390 Merge pull request #2702 from poettering/resolved-iterate-fix
resolved iteration fix
2016-02-29 23:18:16 -05:00
Zbigniew Jędrzejewski-Szmek
97a437d24c Merge pull request #2767 from benjarobin/fix-warn
systemctl: Fix warn: action_to_runlevel() is not used
2016-02-29 20:45:42 -05:00
Elias Probst
82e24b0068
Use PRIu64 to print uint64_t in log msgs 2016-02-29 23:00:21 +01:00
Lennart Poettering
cae027de59 Merge pull request #2771 from 0xAX/core-kernel-timestamp-cleanup
core: use DUAL_TIMESTAMP_NULL to reset kernel_timestamp
2016-02-29 20:33:51 +01:00
Lennart Poettering
ecb7c4488e Merge pull request #2769 from martinpitt/adjtime
Fixes for adjtime parsing
2016-02-29 20:32:02 +01:00
Martin Pitt
07edd3b9e5 test-clock: fix FILE* leak
Close the FILE* instead of the underlying fd.
2016-02-29 17:40:08 +01:00
Zbigniew Jędrzejewski-Szmek
95979cb3e6 Merge pull request #2752 from eliasp/no-container-name-escaping
Don't escape the name of the container nspawn service
2016-02-29 10:10:55 -05:00
Lennart Poettering
2e8294bc20 Merge pull request #2763 from tblume/shorten-hostname-before-removing-dots
shorten hostname before checking for trailing dot
2016-02-29 16:05:48 +01:00
Lennart Poettering
0522e11f59 Merge pull request #2756 from thom311/master
core: avoid compiler warning when compiling with -fexceptions
2016-02-29 16:03:32 +01:00
Martin Pitt
d69d951b11 test-clock: fix assertions
Use assert_se() to ensure that they don't get optimized away.
2016-02-29 15:19:30 +01:00
Martin Pitt
cb971cc031 timedated: trivial stylistic fix
Don't use {} for single-line "then" blocks.
2016-02-29 15:19:30 +01:00
Martin Pitt
450e89f6b1 Merge pull request #2766 from keszybz/coverity
test-clock: fix fd "leak"
2016-02-29 15:19:10 +01:00
Benjamin ROBIN
d2e796739d systemctl: Fix warn: action_to_runlevel() is not used
If HAVE_SYSV_COMPAT is not defined: ‘action_to_runlevel’ defined but not used
2016-02-29 15:07:09 +01:00
Zbigniew Jędrzejewski-Szmek
fe4f8fd1d9 test-clock: fix fd "leak"
CID #1352301.
2016-02-29 08:03:32 -05:00
Alexander Kuleshov
0f5f63c328 core: use DUAL_TIMESTAMP_NULL to reset kernel_timestamp
instead of direct reset of kernel_timestamp fields.
2016-02-29 18:56:57 +06:00
Ronny Chevalier
3113d885fe Merge pull request #2764 from benjarobin/fix-stdio-bridge
stdio-bridge: Correctly propagate error
2016-02-29 12:23:55 +01:00
Benjamin Robin
20268e0c3e stdio-bridge: Correctly propagate error
Return EXIT_FAILURE and print the correct errno code if sd_bus_get_fd() or sd_bus_get_events() fail
2016-02-29 10:45:34 +01:00
Thomas Blume
46e1a22781 shorten hostname before checking for trailing dot
Shortening can lead to a hostname that has a trailing dot.
Therefore it should be done before checking from trailing dots.
2016-02-29 10:19:01 +01:00
Zbigniew Jędrzejewski-Szmek
5df2b16d4b Merge pull request #2746 from daurnimator/patch-1
ISSUE_TEMPLATE: Use a list for submission type so that it appears as a checkbox
2016-02-28 19:23:29 -05:00
Zbigniew Jędrzejewski-Szmek
0493ccd9ed Merge pull request #2753 from phomes/trivial-fixes2
Trivial fixes
2016-02-28 19:12:31 -05:00
Zbigniew Jędrzejewski-Szmek
8f462d878c Merge pull request #2749 from martinpitt/adjtime 2016-02-28 18:56:56 -05:00
Thomas Haller
3587161ade core: avoid compiler warning when compiling with -fexceptions
Initialize auto variables with cleanup attribute, otherwise we
get a compiler warning with -fexceptions.

    ./configure CFLAGS='-Wmaybe-uninitialized -fexceptions -O2'
2016-02-27 13:40:50 +01:00
Thomas Hindoe Paaboel Andersen
17a8630621 stdio-bridge: remove dead code 2016-02-26 22:23:38 +01:00
Thomas Hindoe Paaboel Andersen
7f508f2c74 tree-wide: indentation fixes 2016-02-26 22:23:38 +01:00
Elias Probst
7a8c9e4457
Don't escape the name of the container in instances of
When using `%I` for instances of `systemd-nspawn@.service`, the result
will be `systemd-nspawn` trying to launch a container named e.g.
`fedora/23` instead of `fedora-23`.
Using `%i` instead prevents escaping `-` in a container name and uses
the unmodified container name from the machine store.
2016-02-26 20:39:10 +01:00
Martin Pitt
c9410dd47f timedated: be more tolerant in parsing /etc/adjtime
Similarly to the previous commit, make context_write_data_local_rtc()
understand /etc/adjtime files with just one or two lines, with or without a
final newline.

Normalize the file to the current definition in hwclock(8), in the spirit of
"be liberal what you accept and strict what you produce": Add line terminators,
and set the second line to "0" if missing.

Fixes: #2638
2016-02-26 16:03:26 +01:00
Martin Pitt
35f7216f96 clock-util: be more tolerant in parsing /etc/adjtime
As we default to "hardware clock is in UTC" if /etc/adjtime is not present, it
also makes sense to have that default if /etc/adjtime contains only one or two
lines.

Drop the "gibberish" test case, as this was just EIO because of not containing
three lines, which is already contained in other tests. clock_is_localtime()
never actually validated the format of the first two lines, and there is little
point in doing that.

This addresses the reading half of issue #2638.
2016-02-26 12:33:41 +01:00
Martin Pitt
6369641d6f clock-util: make clock_is_localtime() testable and add initial tests
Add path argument to clock_is_localtime() and default to "/etc/adjtime" if it's
NULL. This makes the function testable.

Add test-clock: initial test cases for some scenarios, using a temporary file.
This also checks the behaviour with a NULL (i. e. the system's /etc/adjtime)
file.
2016-02-26 11:28:49 +01:00