Commit graph

25214 commits

Author SHA1 Message Date
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
Benjamin ROBIN fa0d5878c6 systemctl: Replace check_one_unit() by get_state_one_unit()
The get_state_one_unit returns the enum of the active state of the unit
Do not rely on the string value of the active state.

Fix #2718 since the refactoring allow to handle more case
2016-02-29 14:38:44 +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
daurnimator 7f4394d2fe .github/ISSUE_TEMPLATE: Use a list for submission type so that it appears as a checkbox 2016-02-26 09:54:30 +11:00
Zbigniew Jędrzejewski-Szmek 06fb28b16e Merge pull request #2671 from 0xAX/move-pager-open-to-one-place
tree-wide: merge pager_open_if_enabled() to the pager_open()
2016-02-25 15:29:59 -05:00
Alexander Kuleshov ea4b98e657 tree-wide: merge pager_open_if_enabled() to the pager_open()
Many subsystems define own pager_open_if_enabled() function which
checks '--no-pager' command line argument and open pager depends
on its value. All implementations of pager_open_if_enabled() are
the same. Let's merger this function with pager_open() from the
shared/pager.c and remove pager_open_if_enabled() from all subsytems
to prevent code duplication.
2016-02-26 01:13:23 +06:00
Lennart Poettering 8984d7bb5c Merge pull request #2743 from pfl/dhcp4_server
sd-dhcp-server: Send replies to BOOTP relay server port
2016-02-25 20:01:56 +01:00
Patrik Flykt 8eb7b6a595 sd-dhcp-server: Send replies to BOOTP relay server port
RFC 2131 Section 4.1 says that

 "If the ’giaddr’ field in a DHCP message from a client is non-zero,
  the server sends any return messages to the ’DHCP server’ port on the
  BOOTP relay agent whose address appears in ’giaddr’."

Fix this by adding a destination port when sending unicast UDP packets
and provide the server port when a BOOTP relay agent is being used.
2016-02-25 15:46:55 +02:00
Daniel Mack 96b08d65a1 Merge pull request #2722 from torstehu/fix-typo2
treewide: fix typos and then/that use
2016-02-24 15:51:34 +01:00
Torstein Husebø 96d4901149 treewide: fix typos and then/that use 2016-02-24 11:56:11 +01:00
Martin Pitt 77d9510adc Merge pull request #2719 from evverx/add-test-to-makefile
tests: various fixes
2016-02-24 08:06:53 +01:00
Zbigniew Jędrzejewski-Szmek 3349f77751 Merge pull request #2726 from ssiloti/master
dnssec: only run tests that require gcrypt if we have it
2016-02-24 00:40:48 -05:00
Zbigniew Jędrzejewski-Szmek f6b052559c Merge pull request #2727 from ian-kelling/man-pr-v3
man: clarify unit ordering language
2016-02-24 00:39:06 -05:00
Ian Kelling 21b0be6bcf man: clarify unit ordering language 2016-02-23 21:30:39 -08:00
Steven Siloti a915abf35a dnssec: only run tests that require gcrypt if we have it 2016-02-23 20:28:52 -08:00
Zbigniew Jędrzejewski-Szmek 03e6b71c06 Merge pull request #2724 from vcaputo/minor-formatting-cleanups
tree-wide: minor formatting inconsistency cleanups
2016-02-23 18:48:37 -05:00
Vito Caputo 9ed794a32d tree-wide: minor formatting inconsistency cleanups 2016-02-23 14:20:34 -08:00
Zbigniew Jędrzejewski-Szmek 703b7ccf41 Merge pull request #2639 from nafets227/master
Bugfix set virt=none when running on XEN Dom0
2016-02-23 17:12:40 -05:00
Stefan Schallenberg aka nafets227 3f61278b56 basic: Bugfix Detect XEN Dom0 as no virtualization
When running in XEN Dom0 the virtualization check:
1) detect_xen returns HYPERVISOR_NONE so next checks are executed
2) /proc/sys/hypervisor detects a XEN hypervisor
   it is lacking the special Dom0 detection as in detect_xen

With this patch, at the end of all virtualization checks we double-check if running in XEN Dom0 or DomU.
2016-02-23 22:32:16 +01:00
Stefan Schallenberg aka nafets227 9f63a08d99 basic: Debug-logging of Virtualisation detection
print out every single detection executed and its result.
2016-02-23 22:32:06 +01:00
Zbigniew Jędrzejewski-Szmek 465306dde9 Merge pull request #2725 from phomes/misc-cleanup
Misc cleanup
2016-02-23 14:58:01 -05:00
Thomas Hindoe Paaboel Andersen 404d53a968 networkctl: fix const 2016-02-23 20:40:51 +01:00
Thomas Hindoe Paaboel Andersen 662ea1b14a tree-wide: remove unused variables 2016-02-23 20:40:51 +01:00
Thomas Hindoe Paaboel Andersen 7c9337dae8 basic: mark unused variable as such 2016-02-23 20:40:51 +01:00
Lennart Poettering c550f7a9b8 Merge pull request #2664 from zonque/bootchart-removal
Remove systemd-bootchart
2016-02-23 20:27:59 +01:00
Zbigniew Jędrzejewski-Szmek 51d97007ed Merge pull request #2723 from poettering/importd-man 2016-02-23 13:47:59 -05:00
Zbigniew Jędrzejewski-Szmek ecb465354d man: style fixes 2016-02-23 13:47:30 -05:00