summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAge
* sd-bus: add new sd_bus_slot_set_floating() callLennart Poettering2018-08-24
| | | | | | | | | | 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.
* man: fix minor typoLennart Poettering2018-08-24
|
* tree-wide: fix typo in comments and NEWSYu Watanabe2018-08-24
|
* conf-parser: add a bit more whitespaceLennart Poettering2018-08-24
| | | | | | | | 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 }...
* update TODOLennart Poettering2018-08-24
|
* doc: mention RestrictNamespaces= merges multiple assignment nowYu Watanabe2018-08-24
| | | | Follow-up for #8817.
* meson: use a convenience static library for nspawn coreZbigniew Jędrzejewski-Szmek2018-08-24
| | | | | | | | | | | This makes it easier to link the nspawn implementation to the tests. Right now this just means that nspawn-patch-uid.c is not compiled twice, which is nice, but results in test-patch-uid being slightly bigger, which is not nice. But in general, we should use convenience libs to compile everything just once, as far as possible. Otherwise, once we start compiling a few files here twice, and a few file there thrice, we soon end up in a state where we are doing hundreds of extra compilations. So let's do the "right" thing, even if is might not be more efficient.
* meson: test out headers with more standard versionsZbigniew Jędrzejewski-Szmek2018-08-24
| | | | They all pass fine, but let's keep testing regularly.
* bash-completion: add completion for portablectlYu Watanabe2018-08-24
|
* core: add --dump-bus-properties option to systemdYu Watanabe2018-08-24
| | | | | If systemd is invoked with this option, this dumps all bus properties. This may be useful for shell completion for `systemctl --property`.
* sd-bus: use _cleanup_ moreZbigniew Jędrzejewski-Szmek2018-08-24
|
* journalctl: add with-unit modeLuca Boccassi2018-08-24
| | | | | | | | | | When dealing with a large number of template instances, for example when launching daemons per VRF, it is hard for operators to correlate log lines to arguments. Add a new with-unit mode which, if available, prefixes unit and user unit names when displaying its log messages instead of the syslog identifier. It will also use the full timestamp with timezones, like the short-full mode.
* tree-wide: drop unused variablesYu Watanabe2018-08-24
| | | | Follow-ups for #8620.
* update TODOLennart Poettering2018-08-24
|
* man: add man pages for the portable service stuffLennart Poettering2018-08-24
|
* add new portable service frameworkLennart Poettering2018-08-24
| | | | | | | | | | | This adds a small service "systemd-portabled" and a matching client "portablectl", which implement the "portable service" concept. The daemon implements the actual operations, is PolicyKit-enabled and is activated on demand with exit-on-idle. Both the daemon and the client are an optional build artifact, enabled by default rhough.
* machined: move bus_reply_pair_array() into generic utilitiesLennart Poettering2018-08-24
| | | | This way, we can reuse it in portabled.
* conf-files: beef up conf-files.[ch] a bitLennart Poettering2018-08-24
| | | | | | | | | | | | | | | | | | | | | | | | | | | This adds fozr new flags: - If CONF_FILES_DIRECTORY is specified conf_file_list() and friends will look for directories only. - Similar CONF_FILES_REGULAR means we'll look only for regular files. - If CONF_FILES_BASENAME is specified the resulting list will contain only the basenames of all discovered files or directories, not the full paths. - If CONF_FILES_FILTER_MASKED is specified the resulting list will have masked entries removed (i.e. those symlinked to /dev/null and suchlike) These four flags are useful for discovering portable service profile information. While we are at it, also improve a couple of other things: - More debug logging - use path_hash_ops instead of string_hash_ops when putting together the path lists
* fileio: make sure read_full_stream() works on memory-backed streamsLennart Poettering2018-08-24
|
* os-util: add helpers for finding /etc/os-releaseLennart Poettering2018-08-24
| | | | | Place this new helpers in a new source file os-util.[ch], and move the existing and related call path_is_os_tree() to it as well.
* fileio: add parse_env_filev() that is like parse_env_file() but takes a va_listLennart Poettering2018-08-24
|
* fileio: accept FILE* in addition to path in parse_env_file()Lennart Poettering2018-08-24
| | | | | | | Most our other parsing functions do this, let's do this here too, internally we accept that anyway. Also, the closely related load_env_file() and load_env_file_pairs() also do this, so let's be systematic.
* process-util: add a new FORK_MOUNTNS_SLAVE flag for safe_fork()Lennart Poettering2018-08-24
| | | | | | | | We already have a flag for creating a new mount namespace for the child. Let's add an extension to that: a new FORK_MOUNTNFS_SLAVE flag. When used in combination will mark all mounts in the child namespace as MS_SLAVE so that the child can freely mount or unmount stuff but it won't leak into the parent.
* fd-util: add new helper call fd_duplicate_data_fd()Lennart Poettering2018-08-24
| | | | | | | | | | | | This call creates an fd from another fd containing the same data. Specifically, repeated read() on the returned fd should return the same data as the original fd. This call is useful when we want to copy data out of disk images and suchlike, and want to be pass fds with the data around without having to keep the disk image continously mounted. The implementation tries to be somewhat smart and tries to prefer memfds/pipes over files in /tmp or /var/tmp based on the size of the data, but has appropropriate fallbacks in place.
* basic: fix raw_clone() on 32-bit sparcMike Gilbert2018-08-24
| | | | | | | The clone syscall uses the same semantics as on 64-bit. The trap number for syscall entry is different. Bug: https://bugs.gentoo.org/656368
* load-fragment: allow to specify RestrictNamespaces= multiple timesYu Watanabe2018-08-24
| | | | | If multiple RestrictNamespaces= settings are set, then merge the settings. This also drops supporting "~yes" and "~no".
* nsflsgs: drop namespace_flag_{from,to}_string()Yu Watanabe2018-08-24
| | | | | | This also drops namespace_flag_to_string_many_with_check(), and renames namespace_flag_{from,to}_string_many() to namespace_flags_{from,to}_string().
* nsflags: drop namespace_flag_to_string_many_with_check()Yu Watanabe2018-08-24
| | | | | We always ignore the unused bits. So, it is not necessary to check them.
* logind: let's change the type of the runtime directory size to uint64_tLennart Poettering2018-08-24
| | | | | | | Externally it's an uint64_t anyway, and internally we most just initialize it to physical_memory() which returns uint64_t, hence there's exactly zero value in using it as size_t internally. Hence, let's fix that, and use uint64_t everywhere.
* util: add debug logging to system_tasks_max()Lennart Poettering2018-08-24
| | | | | We should always do debug logging when we eat up error conditions. Let's do so here too.
* util: fix physical_memory() to work correctly on cgroupsv2Lennart Poettering2018-08-24
| | | | | | | Let's look into the right cgroupsv2 attribute. Also, while we are at it, add debug logging for all error conditions we eat up silently otherwise.
* update TODOLennart Poettering2018-08-24
|
* nspawn: make sure our container PID 1 keeps logging to the original stderr ↵Lennart Poettering2018-08-24
| | | | | | | | | | | | | | | | | | as long as possible If we log to the pty that is configured as stdin/stdout/stderr of the container too early we risk filling it up in full before we start processing the pty from the parent process, resulting in deadlocks. Let's hence keep a copy of the original tty we were started on before setting up stdin/stdout/stderr, so that we can log to it, and keep using it as long as we can. Since the kernel's pty internal buffer is pretty small this actually triggered deadlocks when we debug logged at lot from nspawn's child processes, see: https://github.com/systemd/systemd/pull/9024#issuecomment-390403674 With this change we won't use the pty at all, only the actual payload we start will, and hence we won't deadlock on it, ever.
* doc: mention in NEWS that AF_INET{,6} are dropped from logindYu Watanabe2018-08-24
| | | | Closes #9072.
* timesync,shared: move logic requesting bus name to sharedYu Watanabe2018-08-24
| | | | | Preparation for setting DynamicUser= to other services which request bus names.
* core: support unit specifiers in IODeviceWeight= and friendsYu Watanabe2018-08-24
|
* tree-wide: remove some double newlines in headers, tooLennart Poettering2018-08-24
|
* find-double-newline: look in headers tooLennart Poettering2018-08-24
|
* conf-parser: make use of free_and_replace() at one more placeLennart Poettering2018-08-24
|
* tree-wide: port over all code to the new CONFIG_PARSER_PROTOTYPE() macroLennart Poettering2018-08-24
| | | | | | | | | | | This makes most header files easier to look at. Also Emacs gets really slow when browsing through large sections of overly long prototypes, which is much improved by this macro. We should probably not do something similar with too many other cases, as macros like this might help readability for some, but make it worse for others. But I think given the complexity of this specific prototype and how often we use it, it's worth doing.
* config-parser: introduce new CONFIG_PARSER_PROTOTYPE() macroLennart Poettering2018-08-24
| | | | | | | | | | | | | | This builds on the previous GENERIC_PARSER_ARGS macro work. I think in general it is a better idea to declare macros that generate full C statements instead of just parts of them, hence, let's introduce CONFIG_PARSER_PROTOTYPE() which defines a full C function prototype, instead of the pre-existing way of defining the C function prototype manually, but then using GENERIC_PARSER_ARGS to define its arguments. This doesn't drop GENERIC_PARSER_ARGS though, but renames it to CONFIG_PARSER_ARGUMENTS, and changes the ConfigParserCallback function type to use it. The new name follows more closely how the other symbols in the header are named.
* basic/rm-rf: include the path in error messagesZbigniew Jędrzejewski-Szmek2018-08-24
| | | | Attempted to remove disk file system under "/tmp/systemd-temporary-aWPkbQ", and we can't allow that.
* tree-wide: port various bits of the tree over to the new DUMP_STRING_TABLE() ↵Lennart Poettering2018-08-24
| | | | macro
* string-table: add new DUMP_STRING_TABLE() macroLennart Poettering2018-08-24
| | | | | | | | | | | The macro is inspired by the other string table macros, and takes the same arguments in the same order and dumps a string table to stdout. Since it's typesafe it's nice to implement this as macro rather than regular function. This new macro is useful for implementing commands such as "systemctl -t help" and similar, i.e. wherever we want to dump all values of an enum to stdout.
* test-sizeof: show that a small 64 field is not enough to force the enum to ↵Zbigniew Jędrzejewski-Szmek2018-08-24
| | | | | | | | | | | | | | be 64 bits On both 32 and 64 bits, the result is: enum Enum → 32 bits, unsigned enum BigEnum → 32 bits, unsigned enum BigEnum2 → 64 bits, unsigned big_enum2_pos → 4 big_enum2_neg → 8 The last two lines show that even if the enum is 64 bit, and the field of an enum is defined with UINT64_C(), the field can still be smaller.
* rpm: add macros for common configuration dirsZbigniew Jędrzejewski-Szmek2018-08-24
| | | | | | | | | | | %_environmnentdir /usr/lib/environment.d %_modulesloaddir /usr/lib/modules-load.d %_modprobedir /usr/lib/modprobe.d This makes installing files there more convenient because people don't need to construct the path from %_prefix/lib/… . See https://lists.fedoraproject.org/archives/list/devel@lists.fedoraproject.org/thread/GBF5WJLTQVSXMHGYGBF3723ZYCWFBR7C/.
* rpm: add macros for common configuration dirsZbigniew Jędrzejewski-Szmek2018-08-24
| | | | | | | | | | | %_environmnentdir /usr/lib/environment.d %_modulesloaddir /usr/lib/modules-load.d %_modprobedir /usr/lib/modprobe.d This makes installing files there more convenient because people don't need to construct the path from %_prefix/lib/… . See https://lists.fedoraproject.org/archives/list/devel@lists.fedoraproject.org/thread/GBF5WJLTQVSXMHGYGBF3723ZYCWFBR7C/.
* fs-util: don't alter errno in unlink_tempfilep()Lennart Poettering2018-08-24
| | | | | | | | | | | Functions whose only purpose is to be used with _cleanup_() should not touch errno, so that failing removals do not alter errno at unexpected places. This is already done in unlink_and_freep(), rmdir_and_freep(), rm_rf_physical_and_freep(), hence do so for unlink_tempfilep(), too. Follow-up for #9013
* meson: use run_target for generating tags with ctagsEvegeny Vereshchagin2018-08-24
| | | | | | | | | | In https://github.com/systemd/systemd/pull/6561, `run_target` was changed to `custom_target`, which inadvertently caused relative paths to be passed to ctags due to https://github.com/mesonbuild/meson/issues/3589. The switch to `run_target` causes absolute paths to be passed again and makes it easier to jump from file to file, hopefully delaying the need to exit Vim :-)
* Use STRLEN in two placesZbigniew Jędrzejewski-Szmek2018-08-24
|