Lennart Poettering [Wed, 28 Oct 2015 12:06:56 +0000 (13:06 +0100)]
Merge pull request #1699 from filbranden/cpuaffinity9
cpu-set-util: Support ranges in parse_cpu_set_and_warn (v4)
Daniel Mack [Wed, 28 Oct 2015 09:23:36 +0000 (10:23 +0100)]
Merge pull request #1701 from hosiet/l10n-cn
l10n: add Simplified Chinese translation.
Boyuan Yang [Wed, 28 Oct 2015 07:23:58 +0000 (15:23 +0800)]
l10n: add zh_CN translation.
Filipe Brandenburger [Tue, 13 Oct 2015 07:12:39 +0000 (00:12 -0700)]
man: Update man page documentation for CPUAffinity
Document support for commas as a separator and possibility of specifying
ranges of CPU indices.
Tested by regenerating the manpages locally and reading them on man.
Filipe Brandenburger [Fri, 25 Sep 2015 12:23:23 +0000 (05:23 -0700)]
cpu-set-util: Support ranges in parse_cpu_set_and_warn
Tested CPUAffinity ranges on both a service unit and in system.conf and
confirmed they work as expected (by inspecting /proc/PID/status, for the
main pid of the service and for pid 1). Also mixed ranges with both
spaces, commas, trailing commas and spaces.
Added new tests to increase coverage of ranges and prevent regressions.
Filipe Brandenburger [Tue, 13 Oct 2015 06:55:31 +0000 (23:55 -0700)]
parse-util: Introduce new parse_range function
This function will be useful for CPUAffinity settings that involve
ranges of CPUs.
Make it generic and include test coverage to prevent regressions.
Filipe Brandenburger [Fri, 25 Sep 2015 11:45:22 +0000 (04:45 -0700)]
cpu-set-util: Accept commas as separators in parse_cpu_set_and_warn
Tested CPUAffinity settings on both a service unit and in system.conf
and confirmed they work as expected.
Added a new test to confirm that trailing commas and spaces work and to
prevent any regressions in that area.
Tom Gundersen [Tue, 27 Oct 2015 17:09:32 +0000 (18:09 +0100)]
Merge pull request #1698 from poettering/pid-is-unwaited-fix
fixup for previous pr
Lennart Poettering [Tue, 27 Oct 2015 17:02:24 +0000 (18:02 +0100)]
service: exiting early is nicer than deeply-indented code blocks
Lennart Poettering [Tue, 27 Oct 2015 16:59:45 +0000 (17:59 +0100)]
core: all unit types that watch control PIDs should use the same logic
When coldplugging the unit state, make sure to follow the same basic
logic for all unit types: always verify whether the control PID is still
a waitable process before proceeding.
Lennart Poettering [Tue, 27 Oct 2015 16:56:12 +0000 (17:56 +0100)]
core: don't pass uninitialzed PIDs to pid_is_unwaited()
Since
5fd9b2c5467b0a42ccdabc7eb8e516d512609a8e passing a pid of 0 to
pid_is_unwaited() and pid_is_live() is considered as a request on the
current process, similar how the other calls in process-util.c handle a
PID of 0. This broke service.c, which passes a 0 PID and expects it to
be considered an unwaited process.
This fix make sure we can boot again.
Lennart Poettering [Tue, 27 Oct 2015 16:09:05 +0000 (17:09 +0100)]
Merge pull request #1695 from evverx/fix-cap-bounding-merging
core: fix CapabilityBoundingSet merging
Tom Gundersen [Tue, 27 Oct 2015 15:55:16 +0000 (16:55 +0100)]
Merge pull request #1691 from poettering/util-lib-3
split up util.h and macro.h into even more bits
Lennart Poettering [Tue, 27 Oct 2015 13:58:05 +0000 (14:58 +0100)]
util-lib: move inotify-related definitions to fs-util.[ch]
Lennart Poettering [Tue, 27 Oct 2015 13:57:44 +0000 (14:57 +0100)]
util-lib: move fdname_is_valid() to fd-util.[ch]
Lennart Poettering [Tue, 27 Oct 2015 13:25:58 +0000 (14:25 +0100)]
automount: move generically userful call repeat_mount() into mount-util.[ch]
Lennart Poettering [Tue, 27 Oct 2015 13:24:58 +0000 (14:24 +0100)]
process-util: move a couple of process-related calls over
Lennart Poettering [Tue, 27 Oct 2015 13:02:45 +0000 (14:02 +0100)]
process-util: make some minor corrections to PID live detection
Lennart Poettering [Tue, 27 Oct 2015 13:01:48 +0000 (14:01 +0100)]
process-util: rename get_parent_of_pid() → get_process_ppid()
In order to match the other get_process_xyz() calls.
Lennart Poettering [Tue, 27 Oct 2015 12:56:40 +0000 (13:56 +0100)]
process-util: actually move rename_process() over
The prototype was moved long ago, actually move the definition over now,
too.
Lennart Poettering [Tue, 27 Oct 2015 12:45:00 +0000 (13:45 +0100)]
mount-util: move fstype_is_network() and name_to_handle_at() definitions over
Lennart Poettering [Mon, 26 Oct 2015 21:02:13 +0000 (22:02 +0100)]
update TODO
Lennart Poettering [Tue, 27 Oct 2015 02:01:06 +0000 (03:01 +0100)]
util-lib: split out allocation calls into alloc-util.[ch]
Lennart Poettering [Tue, 27 Oct 2015 00:48:17 +0000 (01:48 +0100)]
util-lib: split out globbing related calls into glob-util.[ch]
Lennart Poettering [Tue, 27 Oct 2015 00:26:52 +0000 (01:26 +0100)]
stat-util.h: move F_TYPE_EQUAL() macro definition to stat-util.h
Lennart Poettering [Tue, 27 Oct 2015 00:26:31 +0000 (01:26 +0100)]
util-lib: split out printf() helpers to stdio-util.h
Lennart Poettering [Tue, 27 Oct 2015 00:23:53 +0000 (01:23 +0100)]
macro.h: move definition of MODE_INVALID to parse-util.h
Lennart Poettering [Tue, 27 Oct 2015 00:03:38 +0000 (01:03 +0100)]
macro: move DECIMAL_STR_WIDTH() into macro.h
So that it sets next to DECIMAL_STR_MAX(), where it belongs.
Lennart Poettering [Tue, 27 Oct 2015 00:03:03 +0000 (01:03 +0100)]
socket-util: move CMSG_FOREACH() from macro.h to socket-util.h
Lennart Poettering [Tue, 27 Oct 2015 00:02:30 +0000 (01:02 +0100)]
io-util.h: move iovec stuff from macro.h to io-util.h
Lennart Poettering [Mon, 26 Oct 2015 23:50:14 +0000 (00:50 +0100)]
process-util: move PID related macros from macro.h to process-util.h
Lennart Poettering [Mon, 26 Oct 2015 23:42:07 +0000 (00:42 +0100)]
user-util: move UID/GID related macros from macro.h to user-util.h
Lennart Poettering [Mon, 26 Oct 2015 23:41:29 +0000 (00:41 +0100)]
util-lib: move web-related calls into web-util.[ch]
Lennart Poettering [Mon, 26 Oct 2015 23:40:25 +0000 (00:40 +0100)]
util-lib: split out syslog-related calls into syslog-util.[ch]
Lennart Poettering [Mon, 26 Oct 2015 23:07:54 +0000 (00:07 +0100)]
detect-virt: add new --chroot switch to detect chroot() environments
Lennart Poettering [Mon, 26 Oct 2015 23:07:27 +0000 (00:07 +0100)]
util-lib: move running_in_chroot() into virt.[ch]
It's a very weak kind of virtualization, after all.
Lennart Poettering [Mon, 26 Oct 2015 23:06:29 +0000 (00:06 +0100)]
util-lib: move /proc/cmdline parsing code to proc-cmdline.[ch]
Lennart Poettering [Mon, 26 Oct 2015 23:02:45 +0000 (00:02 +0100)]
util-lib: move is_main_thread() to process-util.[ch]
Lennart Poettering [Mon, 26 Oct 2015 22:32:16 +0000 (23:32 +0100)]
src/basic: rename audit.[ch] → audit-util.[ch] and capability.[ch] → capability-util.[ch]
The files are named too generically, so that they might conflict with
the upstream project headers. Hence, let's add a "-util" suffix, to
clarify that this are just our utility headers and not any official
upstream headers.
Lennart Poettering [Mon, 26 Oct 2015 22:20:41 +0000 (23:20 +0100)]
util-lib: split out umask-related code to umask-util.h
Lennart Poettering [Mon, 26 Oct 2015 22:01:30 +0000 (23:01 +0100)]
util-lib: move more locale-related calls to locale-util.[ch]
Lennart Poettering [Mon, 26 Oct 2015 21:34:47 +0000 (22:34 +0100)]
util-lib: move status printing stuff into src/core/
It's very specific to the core, and not used elsewhere, hence move it
out of terminal-util.[ch].
Lennart Poettering [Mon, 26 Oct 2015 21:31:05 +0000 (22:31 +0100)]
util-lib: move string table stuff into its own string-table.[ch]
Lennart Poettering [Mon, 26 Oct 2015 21:01:44 +0000 (22:01 +0100)]
util-lib: split stat()/statfs()/stavfs() related calls into stat-util.[ch]
Lennart Poettering [Mon, 26 Oct 2015 20:26:33 +0000 (21:26 +0100)]
util: move string_is_safe() to string-util.[ch]
Lennart Poettering [Mon, 26 Oct 2015 20:16:26 +0000 (21:16 +0100)]
util-lib: move a number of fs operations into fs-util.[ch]
Lennart Poettering [Mon, 26 Oct 2015 19:39:23 +0000 (20:39 +0100)]
util-lib: split out file attribute calls to chattr-util.[ch]
Lennart Poettering [Mon, 26 Oct 2015 19:26:23 +0000 (20:26 +0100)]
util-lib: split xattr-related calls into xattr-util.[ch]
Lennart Poettering [Mon, 26 Oct 2015 19:07:55 +0000 (20:07 +0100)]
util-lib: introduce dirent-util.[ch] for directory entry calls
Also, move a couple of more path-related functions to path-util.c.
Lennart Poettering [Mon, 26 Oct 2015 18:40:43 +0000 (19:40 +0100)]
util-lib: split out resource limits related calls into rlimit-util.[ch]
Lennart Poettering [Mon, 26 Oct 2015 18:08:09 +0000 (19:08 +0100)]
util-lib: move take_password_lock() to user-util.[ch]
Also, rename it take_etc_passwd_lock(), in order to make it more
expressive.
Lennart Poettering [Mon, 26 Oct 2015 17:59:36 +0000 (18:59 +0100)]
util: move filename_is_valid() and path_is_safe() to path-util.[ch]
Lennart Poettering [Mon, 26 Oct 2015 17:44:13 +0000 (18:44 +0100)]
util-lib: move mount related utility calls to mount-util.[ch]
Lennart Poettering [Mon, 26 Oct 2015 17:43:29 +0000 (18:43 +0100)]
util-lib: move fstab_node_to_udev_node() to fstab-util.[ch]
Lennart Poettering [Mon, 26 Oct 2015 17:05:03 +0000 (18:05 +0100)]
util-lib: move more file I/O related calls into fileio.[ch]
Lennart Poettering [Mon, 26 Oct 2015 16:30:56 +0000 (17:30 +0100)]
util: remove path_get_parent(), in favour of dirname_malloc()
We don't need two functions that do essentialy the same, hence drop
path_get_parent(), and stick to dirname_malloc(), but move it to
path-util.[ch].
Lennart Poettering [Mon, 26 Oct 2015 15:41:43 +0000 (16:41 +0100)]
util-lib: split out hex/dec/oct encoding/decoding into its own file
Lennart Poettering [Mon, 26 Oct 2015 15:18:16 +0000 (16:18 +0100)]
util-lib: split string parsing related calls from util.[ch] into parse-util.[ch]
Evgeny Vereshchagin [Tue, 27 Oct 2015 11:40:28 +0000 (14:40 +0300)]
core: fix CapabilityBoundingSet merging
Fixes: #1221
Tom Gundersen [Tue, 27 Oct 2015 10:41:06 +0000 (11:41 +0100)]
Merge pull request #1693 from ssahani/word
timesysnd: port to extract_first_word
Susant Sahani [Tue, 27 Oct 2015 03:54:23 +0000 (09:24 +0530)]
resolved: port to extract_first_word
Susant Sahani [Tue, 27 Oct 2015 03:42:04 +0000 (09:12 +0530)]
timesysnd: port to extract_first_word
Lennart Poettering [Tue, 27 Oct 2015 02:07:24 +0000 (03:07 +0100)]
Merge pull request #1688 from phomes/typo-fix
path-util: do not return NULL as int
Thomas Hindoe Paaboel Andersen [Mon, 26 Oct 2015 21:26:49 +0000 (22:26 +0100)]
path-util: do not return NULL as int
strv_split will only return NULL on oom so we should return -ENOMEM
instead.
Looks like an oversight from the changes in
0f474365
Lennart Poettering [Mon, 26 Oct 2015 16:53:59 +0000 (17:53 +0100)]
Merge pull request #1679 from evverx/refuse-manual-start-by-reload-or-restart
core: don't allow manual start with reload-or-restart too
Lennart Poettering [Mon, 26 Oct 2015 16:52:37 +0000 (17:52 +0100)]
Merge pull request #1686 from medhefgo/remount-ro-fix
unmount: Pass in mount options when remounting read-only
Jan Janssen [Mon, 26 Oct 2015 14:13:28 +0000 (15:13 +0100)]
unmount: Pass in mount options when remounting read-only
man 2 mount says that the mountflags and data parameteres should
match the original values except for the desired changes. We only
bother with the mount options since the only flags we can change
are MS_RDONLY, MS_SYNCHRONOUS and MS_MANDLOCK; which shouldn't
matter too much.
Fixes: #351
Tom Gundersen [Mon, 26 Oct 2015 12:21:41 +0000 (13:21 +0100)]
Merge pull request #1676 from poettering/util-lib-2
split up util.[ch] into more pieces, and other stuff
Tom Gundersen [Mon, 26 Oct 2015 12:12:30 +0000 (13:12 +0100)]
journal: add missing include
Lennart Poettering [Mon, 26 Oct 2015 11:25:34 +0000 (12:25 +0100)]
Merge pull request #1681 from ssahani/journal
journald-server: port to extract_first_word
Susant Sahani [Mon, 26 Oct 2015 09:58:03 +0000 (15:28 +0530)]
journald-server: port to extract_first_word
Evgeny Vereshchagin [Mon, 26 Oct 2015 04:23:09 +0000 (04:23 +0000)]
core: don't allow manual start with reload-or-restart too
fix bug: systemctl reload-or-restart starts a service with RefuseManualStart=yes
Lennart Poettering [Mon, 26 Oct 2015 00:43:23 +0000 (01:43 +0100)]
Merge pull request #1675 from evverx/run-protect-home
systemd-run can launch units with ProtectHome
Lennart Poettering [Mon, 26 Oct 2015 00:13:11 +0000 (01:13 +0100)]
process-util: move more process related calls to process-util.[ch]
Lennart Poettering [Mon, 26 Oct 2015 00:09:02 +0000 (01:09 +0100)]
socket-util: move remaining socket-related calls from util.[ch] to socket-util.[ch]
Lennart Poettering [Sun, 25 Oct 2015 23:56:12 +0000 (00:56 +0100)]
build-sys: add missing makefile symlink
Lennart Poettering [Sun, 25 Oct 2015 23:54:08 +0000 (00:54 +0100)]
util-lib: move ether_addr_to_string() into ether-addr-util.c
Lennart Poettering [Sun, 25 Oct 2015 23:46:40 +0000 (00:46 +0100)]
path-util: minor coding style fix
We usually avoid relying on C's degrade-to-boolean functionality when
comparing numerical variables with 0. We use it only for pointers and
actual booleans.
Lennart Poettering [Sun, 25 Oct 2015 23:45:32 +0000 (00:45 +0100)]
core: rename SmackFileSystemRoot= to SmackFileSystemRootLabel=
That way it's in sync with the other SMACK label settings.
https://github.com/systemd/systemd/pull/1664#issuecomment-
150891270
Lennart Poettering [Sun, 25 Oct 2015 23:38:21 +0000 (00:38 +0100)]
user-util: never hand out or accept invalid UIDs
libc isn't that strict, but it's a good idea if we are, to not create
confusion around invalid user ids.
Lennart Poettering [Sun, 25 Oct 2015 22:20:05 +0000 (23:20 +0100)]
util: remove lookup_uid(), replace by uid_to_name()
So far we had two pretty much identical calls in user-util.[ch]:
lookup_uid() and uid_to_name(). Get rid of the former, in favour of the
latter, and while we are at it, rewrite it, to use getpwuid_r()
correctly, inside an allocation loop, as POSIX intended.
Lennart Poettering [Sun, 25 Oct 2015 21:37:43 +0000 (22:37 +0100)]
user-util: simplify uid parsing a bit
Lennart Poettering [Sun, 25 Oct 2015 21:32:30 +0000 (22:32 +0100)]
util-lib: split out user/group/uid/gid calls into user-util.[ch]
Lennart Poettering [Sun, 25 Oct 2015 13:08:25 +0000 (14:08 +0100)]
util-lib: split out IO related calls to io-util.[ch]
Evgeny Vereshchagin [Mon, 26 Oct 2015 00:22:34 +0000 (00:22 +0000)]
shell-completion: systemd-run: add the property ProtectHome
Evgeny Vereshchagin [Mon, 26 Oct 2015 00:20:49 +0000 (00:20 +0000)]
run: can launch units with ProtectHome
Lennart Poettering [Sun, 25 Oct 2015 23:41:45 +0000 (00:41 +0100)]
Merge pull request #1674 from evverx/run-fix-couldnot-find-executable
run: fix "couldn't find executable" for the existing executables
Lennart Poettering [Sun, 25 Oct 2015 21:58:00 +0000 (22:58 +0100)]
Merge pull request #1673 from mustrumr/date-fixes
Date fixes
Evgeny Vereshchagin [Sun, 25 Oct 2015 18:29:24 +0000 (18:29 +0000)]
run: fix "couldn't find executable" for the existing executables
Fixes: #1672
Hristo Venev [Sun, 25 Oct 2015 16:32:05 +0000 (18:32 +0200)]
man: fix systemd.time RAS syndrome and line length
"UTC time" is a RAP phrase (redundant acronym phrase phrase).
Hristo Venev [Sun, 25 Oct 2015 16:25:58 +0000 (18:25 +0200)]
test: "today UTC" is not always "today UTC"
On Oct 25 2015 in EET/EEST there is a UTC+3->UTC+2 transition. This
means that the representation of "today UTC" as local time is ambiguous.
Hristo Venev [Sun, 25 Oct 2015 16:24:39 +0000 (18:24 +0200)]
basic: use the return value of endswith
It returns the position where the suffix begins, which can be used for
strndup to extract the prefix without calling strlen.
Ronny Chevalier [Sun, 25 Oct 2015 16:19:30 +0000 (17:19 +0100)]
Merge pull request #1671 from keszybz/zsh-journalctl-identifier
zsh-completion: journalctl --identifier
Zbigniew Jędrzejewski-Szmek [Sun, 25 Oct 2015 14:49:19 +0000 (10:49 -0400)]
zsh-completion: journalctl --identifier
Fixes #1549.
Tom Gundersen [Sun, 25 Oct 2015 13:35:40 +0000 (14:35 +0100)]
Merge pull request #1668 from ssahani/net1
networkd: fix asserts
Tom Gundersen [Sun, 25 Oct 2015 13:22:43 +0000 (14:22 +0100)]
Merge pull request #1654 from poettering/util-lib
Various changes to src/basic/
Lennart Poettering [Sun, 25 Oct 2015 12:56:40 +0000 (13:56 +0100)]
Merge pull request #1667 from evverx/run-protect-system
systemd-run can launch units with ProtectSystem
Lennart Poettering [Sun, 25 Oct 2015 12:16:10 +0000 (13:16 +0100)]
util-lib: move formats-util.h from shared/ to basic/
It's only a header file, definining format strings for basic system
types, hence it should be in src/basic/, not src/shared/.
Lennart Poettering [Sun, 25 Oct 2015 12:14:12 +0000 (13:14 +0100)]
util-lib: split out fd-related operations into fd-util.[ch]
There are more than enough to deserve their own .c file, hence move them
over.
Zbigniew Jędrzejewski-Szmek [Sun, 25 Oct 2015 04:14:51 +0000 (00:14 -0400)]
Merge pull request #1663 from poettering/journal-compress-fix
journal: fix error handling when compressing journal objects