Age | Commit message (Collapse) | Author |
|
|
|
|
|
|
|
strv_split will only return NULL on oom so we should return -ENOMEM
instead.
Looks like an oversight from the changes in 0f474365
|
|
core: don't allow manual start with reload-or-restart too
|
|
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
|
|
split up util.[ch] into more pieces, and other stuff
|
|
|
|
journald-server: port to extract_first_word
|
|
|
|
fix bug: systemctl reload-or-restart starts a service with RefuseManualStart=yes
|
|
|
|
socket-util.[ch]
|
|
|
|
|
|
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.
|
|
That way it's in sync with the other SMACK label settings.
https://github.com/systemd/systemd/pull/1664#issuecomment-150891270
|
|
libc isn't that strict, but it's a good idea if we are, to not create
confusion around invalid user ids.
|
|
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.
|
|
|
|
|
|
|
|
|
|
run: fix "couldn't find executable" for the existing executables
|
|
Fixes: #1672
|
|
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.
|
|
It returns the position where the suffix begins, which can be used for
strndup to extract the prefix without calling strlen.
|
|
networkd: fix asserts
|
|
Various changes to src/basic/
|
|
systemd-run can launch units with ProtectSystem
|
|
It's only a header file, definining format strings for basic system
types, hence it should be in src/basic/, not src/shared/.
|
|
There are more than enough to deserve their own .c file, hence move them
over.
|
|
journal: fix error handling when compressing journal objects
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Exported header files should not include internal headers. Fix that.
Exported header files should not use the bool type. So far we opted to
stick to C89 for exported headers, and hence use "int" for bools in
them. Continue to do so.
Exported header files should have #include lines for everything they use
including inttypes.h and sys/types.h, so that they may be included in
any order.
Exported header files should have C++ guards, hence add them.
Exported header files should not use gcc extensions like #pragma once,
get rid of it.
|
|
|
|
* check memory allocation errors in specifier_cgroup_slice
* %I doesn't fail for non-instantiated units (%i doesn't fail too)
* EOPNOTSUPP for consistency
|
|
string-util.[ch]
There are more than enough calls doing string manipulations to deserve
its own files, hence do something about it.
This patch also sorts the #include blocks of all files that needed to be
updated, according to the sorting suggestions from CODING_STYLE. Since
pretty much every file needs our string manipulation functions this
effectively means that most files have sorted #include blocks now.
Also touches a few unrelated include files.
|
|
This really deserves its own file, given how much code this is now.
|
|
- Really warn in all error cases, not just some. We need to make sure
that all errors are logged to not confuse the user.
- Explicitly check for EINVAL error code before claiming anything about
invalid escapes, could be ENOMEM after all.
|
|
This is quite a lot of code these days, hence move it to its own source
file.
|
|
Let's introduce a common function that makes relative paths absolute and
warns about any errors while doing so.
|
|
get_current_dir_name() can return a variety of errors, not just ENOMEM,
hence don't blindly turn its errors to ENOMEM, but return correct errors
in path_make_absolute_cwd().
This trickles down into a couple of other functions, some of which
receive unrelated minor fixes too with this commit.
|
|
Modernize the code a bit:
- Get rid of FOREACH_WORD_SEPARATOR() loop in favour of a
extract_first_word() loop.
- Remove find_binary()'s "local" flag. It's not reasonably possible to
look for binaries on remote systems, we hence should not pretend we
could.
- When we cannot find a suitable binary, return the last error returned
from access() rather than ENOENT unconditionally.
- Rework fsck_exists() and mkfs_exists() to return 1 on success, 0 if
the implementation is missing and negative on real errors. This is
more like we do it in other functions.
- Make sure we also detect direct fsck symlinks to "true", rather than
just absolute ones to /bin/true.
|
|
|