Commit Graph

33877 Commits

Author SHA1 Message Date
Lennart Poettering 4a0dbb8129
Merge pull request #9083 from yuwata/empty-assignment
load-fragment: make many settings accept empty string
2018-05-31 11:13:52 +02:00
Yu Watanabe 4156e767f6 locale: assume locale is for LANG= when variable name is not specified
Closes #6070.
2018-05-31 17:57:41 +09:00
Lennart Poettering 6696e2a631 smack: make mac_smack_fix() deal somewhat sensible with non-absolute paths
This tries to improve the mac_smack_fix() logic a bit, by properly
handling non-absolute paths.

It's still pretty broken though, which is sad for security technology:
non-normalized paths (for example "/usr/../dev/sda") will still not be
treated correctly. I am not sure how to fix that properly though, and I
don't understand SMACK well enough to do so. This fix hence just fixes
to most obvious glaring issue.
2018-05-31 10:50:50 +02:00
Lennart Poettering a8d1b2422d
Merge pull request #9142 from yuwata/coverity-fixes
Coverity fixes
2018-05-31 10:50:10 +02:00
Yu Watanabe b613b01920 doc: update TODO 2018-05-31 17:39:13 +09:00
Yu Watanabe 33ab22fcb9 man: mention that systemd-sysusers understand the specifier. 2018-05-31 17:37:57 +09:00
Yu Watanabe b8bed70068 sysusers: support specifier expansion for GECOS and home directory fields 2018-05-31 17:36:22 +09:00
Yu Watanabe df4fd2c757 locale: re-read configuration files if changed
Closes #8491.
2018-05-31 16:24:45 +09:00
Yu Watanabe 6a837b035f locale: use _cleanup_free_ and free_and_replace 2018-05-31 16:17:18 +09:00
Yu Watanabe fe28d88746 locale: check xkb data before requesting authentication 2018-05-31 16:16:25 +09:00
Yu Watanabe b47ff73b18 locale: return earlier if no operation will be done 2018-05-31 16:15:21 +09:00
Yu Watanabe 17ee3d72da load-fragment: use free_and_replace() 2018-05-31 13:27:06 +09:00
Yu Watanabe 3c381a671f load-fragment: add missing oom check
Fixes CID#1391379.
2018-05-31 13:26:27 +09:00
Yu Watanabe 66c9dfdddc portable: fix memleak
Fixes CID#1391382.
2018-05-31 13:16:51 +09:00
Yu Watanabe 7be9df7d4a core/socket: fix coding style 2018-05-31 11:09:41 +09:00
Yu Watanabe 535775805a load-fragment: move macro-defined config parsers 2018-05-31 11:09:41 +09:00
Yu Watanabe 984faf29da load-fragment: use DEFINE_CONFIG_PARSE_*() macros 2018-05-31 11:09:41 +09:00
Yu Watanabe e405b67d23 load-fragment: make IPTOS= accept the empty string 2018-05-31 11:09:41 +09:00
Yu Watanabe 00463fbf0d load-fragment: make SocketProtocol= accept the empty string 2018-05-31 11:09:41 +09:00
Yu Watanabe fa65c28176 namespace: rename parse_protect_{home,system}_or_bool() to protect_{home,system}_or_bool_to_string()
Hence, we can define config_parse_protect_{home,system}() by using
DEFINE_CONFIG_PARSE_ENUM() macro.
2018-05-31 11:09:41 +09:00
Yu Watanabe b54e98ef8e socket-util: rename parse_socket_address_bind_ipv6_only_or_bool() to socket_address_bind_ipv6_only_or_bool_from_string()
Hence, we can define config_parse_socket_bind() by using
DEFINE_CONFIG_PARSE_ENUM() macro.
2018-05-31 11:09:41 +09:00
Yu Watanabe 2d1729ca3f conf-parser: introduce DEFINE_CONFIG_PARSE*() macros
This introduces several macros for defining config parsers.
Also this fixes errno in DEFINE_CONFIG_PARSE_ENUM() and _ENUMV()
and makes the log level lower when a duplicated item is
specified to the settings parsed by the function defined by
DEFINE_CONFIG_PARSE_ENUMV().
2018-05-31 11:09:41 +09:00
Yu Watanabe 0a9e363870 load-fragment: drop config_parse_no_new_privileges() and use config_parse_bool() instead 2018-05-31 11:09:41 +09:00
Yu Watanabe 862fcffd9c load-fragment: make WorkingDirectory= accept the empty string 2018-05-31 11:09:41 +09:00
Yu Watanabe fb27be3f60 load-fragment: use parse_sec_fix_0() instead of updating the value later 2018-05-31 11:09:41 +09:00
Yu Watanabe 6c58305ac3 load-fragment: use config_parse_sec_fix_0() for TimeoutStopSec= 2018-05-31 11:09:41 +09:00
Yu Watanabe 71e270150f load-fragment: always include config_parse_warn_compat() in the table used by unit_dump_config_items() 2018-05-31 11:09:41 +09:00
Yu Watanabe 47544ea1cb load-fragment: drop unused function config_parse_sysv_priority() 2018-05-31 11:09:41 +09:00
Yu Watanabe b00e1a9e2a load-fragment: make CPUSchedulingPolicy= accept the empty string 2018-05-31 11:09:41 +09:00
Yu Watanabe 617d253afa load-fragment: make IOScheduling{Class,Priority}= accept the empty string 2018-05-31 11:09:41 +09:00
Yu Watanabe de5e6038ca load-fragment: setting empty string to Nice= resets the previous assignments 2018-05-31 11:09:41 +09:00
Jared Kazimir 18944130b0 hwdb: consolidate multiple razer evdev sections 2018-05-31 00:59:07 +02:00
Lennart Poettering 4afae2a820
Merge pull request #9132 from poettering/sd-bus-slot-set-floating
make sure we don't leak bus slots when sd_bus_add_match_async() is used
2018-05-31 00:58:41 +02:00
Sergio Lindo Mansilla c2f32f616b Fix pattern to detect distribution
With operator '=', when in /etc/os-release:
ID_LIKE="opensuse suse" # Tumbleweed since at least 2018-04-24
or
ID_LIKE="suse opensuse" # Leap 15
2018-05-30 18:13:14 +02:00
Lennart Poettering fc2d4c89b8 sd-bus: make add match method callback slot "floating"
When we allocate an asynchronous match object we will allocate an
asynchronous bus call object to install the match server side.
Previously the call slot would be created as regular slot, i.e.
non-floating which meant installing the match even if it was itself
floating would result in a non-floating slot to be created internally,
which ultimately would mean the sd_bus object would be referenced by it,
and thus never be freed.

Let's fix that by making the match method callback floating in any case
as we have no interest in leaving the bus allocated beyond the match
slot.

Fixes: #8551
2018-05-30 17:34:34 +02:00
Lennart Poettering 7ae497b936 bus-slot: for bus slot objects with no explicit description use the match string as description
Let's make debugging a but easier with implicit descriptions for some
match objects.
2018-05-30 17:34:34 +02:00
Lennart Poettering 1004b2c7bc man: document the new sd_bus_slot_set_floating() call
Also extend the memory management description of sd-bus highlighting the
effect of "floating" slot objects a bit.
2018-05-30 17:34:34 +02:00
Lennart Poettering 303acb7f2d sd-bus: add new sd_bus_slot_set_floating() call
This new call allows explicit control of the "floating" state of a bus
slot object. This is useful for creating a bus slot object first,
retaining a reference to it, using it for making changes to the slot
object (for example, set a description) and then handing it over to
sd-bus for lifecycle management.

It's also useful to fix #8551.
2018-05-30 17:13:51 +02:00
Lennart Poettering d7828e117a man: fix minor typo 2018-05-30 17:13:51 +02:00
Lennart Poettering d27b725abf tree-wide: make use of memory_startswith() at various places 2018-05-30 13:11:51 +02:00
Lennart Poettering 9b8ff18319 string-util: add new memory_startswith() helper
We have code like this at various placer, let's make things shorter and
more readable with a helper for it.
2018-05-30 13:07:40 +02:00
Susant Sahani e6ebebbe6a networkd: Add ability to set MULTICAST flag on interface
Closes #9113

fix ARP toggling flag
2018-05-30 12:59:24 +02:00
Sylvain Plantefève 714f8d3c37 po: update French translation 2018-05-30 08:21:40 +02:00
Yu Watanabe b014b3a524
Merge pull request #9120 from poettering/timedated-timezone-minifixes
Minor improvements to timedated
2018-05-30 12:56:23 +09:00
Yu Watanabe ead6bd250d tree-wide: fix typo in comments and NEWS 2018-05-29 20:18:45 +02:00
Zbigniew Jędrzejewski-Szmek 706a3df4be man: recommend After= with Requisite=
Fixes #8309.
2018-05-29 18:52:45 +02:00
Vito Caputo 83bf6b6741 journal-file: avoid joining offline thread
In journal_file_set_online() the offline thread doesn't need to be
joined if it's been canceled before actually reaching the phase of
writing the offline state.
2018-05-29 17:01:23 +02:00
Lennart Poettering 2a7ff45f09 timedated: add some debug logging when a number of kernel calls fail 2018-05-29 16:33:06 +02:00
Lennart Poettering 8a50b96f81 timedated: show the short timezone name when changing timezones in logs 2018-05-29 16:31:18 +02:00
Lennart Poettering 7ef7e15bd7 conf-parser: add a bit more whitespace
We usually seperate case statements within a switch from each other by
empty lines. We also often add an empty line after multi-line function
prototypes, let's do so here too

Also, no trailing ; after }...
2018-05-29 15:25:22 +02:00