Commit Graph

24 Commits

Author SHA1 Message Date
Lennart Poettering 787dfb82f5 portabled: generate a more useful error when invalid image types are attempted to be attached
Fixes: #10095
2018-10-08 18:49:45 +02:00
Lennart Poettering d09d85a2a0 portable: create/remove the 'attached' unit file directory when we can
Let's not litter the system with this unit directory unnecessarily, and
let's try to create/remove it when necessary.
2018-10-08 18:49:45 +02:00
Lennart Poettering 339731dba1 portable: properly handle if the unit file directory for portable service images doesn't exist
if the dir doesn#t exist then let's consider this indication for "this
image isn't attached".
2018-10-08 18:49:45 +02:00
Lennart Poettering 40a7b232de portable: make use of the new unit file path
Note that this breaks compatibility with older versions, as the detach
code won't find unit files attached with older releases anymore. But
given that the portable service logic was not deemed stable so far, and
this was explicitly documented and enforced through portablectl's
installation to /usr/lib/systemd/ such a compat breakage should be fine.
2018-10-08 18:49:45 +02:00
Lennart Poettering 37ec0fdd34 tree-wide: add clickable man page link to all --help texts
This is a bit like the info link in most of GNU's --help texts, but we
don't do info but man pages, and we make them properly clickable on
terminal supporting that, because awesome.

I think it's generally advisable to link up our (brief) --help texts and
our (more comprehensive) man pages a bit, so this should be an easy and
straight-forward way to do it.
2018-08-20 11:33:04 +02:00
Yu Watanabe f330408d62 tree-wide: drop empty lines in comments 2018-07-23 08:44:24 +02:00
Yu Watanabe 99c89da02d portable: fix error handling 2018-06-25 13:56:27 +09:00
Yu Watanabe f18edd8a0a tree-wide: add multiple inclusion guard 2018-06-25 13:04:59 +09:00
Lennart Poettering a6887cc03e tree-wide: drop MSG_NOSIGNAL flag from recvmsg() invocations
MSG_NOSIGNAL is only defined for sendmsg(), not for recvmsg(), hence
let's drop it's use, in particular as it appears to create problems on
older kernels. See:

https://lists.freedesktop.org/archives/systemd-devel/2018-June/040869.html
2018-06-20 16:12:55 +02:00
Yu Watanabe 31d99bd172 tree-wide: do not assign values if not used 2018-06-19 08:44:55 +02:00
Yu Watanabe 9c7f1abbe2 portable: update polkit messages 2018-06-19 13:21:17 +09:00
Lennart Poettering 6f659e5075 portable: add SystemCallFilter=@system-service to the three main portable service profiles
… but leave the "trusted" profile unmodified, it shall have full access
to all system calls, as before.
2018-06-14 17:44:20 +02:00
Lennart Poettering ef31828d06 tree-wide: unify how we define bit mak enums
Let's always write "1 << 0", "1 << 1" and so on, except where we need
more than 31 flag bits, where we write "UINT64(1) << 0", and so on to force
64bit values.
2018-06-12 21:44:00 +02:00
Yu Watanabe 858d36c1ec path-util: introduce path_simplify()
The function is similar to path_kill_slashes() but also removes
initial './', trailing '/.', and '/./' in the path.
When the second argument of path_simplify() is false, then it
behaves as the same as path_kill_slashes(). Hence, this also
replaces path_kill_slashes() with path_simplify().
2018-06-03 23:39:26 +09:00
Lennart Poettering 9554591d45 tree-wide: drop some double newlines 2018-05-31 12:19:34 +02:00
Lennart Poettering b3c66c4497 portablectl: no need to validate profile name before checking whether it is 'help' 2018-05-31 12:06:37 +02:00
Lennart Poettering f524522bde portablectl: support 'help' parameter on --copy= 2018-05-31 12:06:12 +02:00
Lennart Poettering 21cffed715 portablectl: don't join strv if we don't want to display it 2018-05-31 12:05:53 +02:00
Lennart Poettering 810aa42575 portablectl: coccinelle says we should use TAKE_PTR() here, do so 2018-05-31 12:05:20 +02:00
Yu Watanabe 66c9dfdddc portable: fix memleak
Fixes CID#1391382.
2018-05-31 13:16:51 +09:00
Yu Watanabe 8d93d7d84b portablectl: fix memleaks
Fixes #9089.
2018-05-26 16:57:02 +02:00
Yu Watanabe c5a935b018 portable: fix memleak
Closes #9086.
2018-05-26 16:57:02 +02:00
Yu Watanabe c1a1b409ce tree-wide: drop unused variables
Follow-ups for #8620.
2018-05-25 11:33:28 +02:00
Lennart Poettering 61d0578b07 add new portable service framework
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.
2018-05-24 17:01:57 +02:00