b26fa1a2fbcfee7d03b0c8fd15ec3aa64ae70b9f |
|
10-Feb-2016 |
Daniel Mack <daniel@zonque.org> |
tree-wide: remove Emacs lines from all files
This should be handled fine now by .dir-locals.el, so need to carry that
stuff in every file. |
b43d75c378d919900e5c1e82a82e3e17dd3de9f9 |
|
10-Dec-2015 |
Lennart Poettering <lennart@poettering.net> |
importd: drop dkr support
The current code is not compatible with current dkr protocols anyway,
and dkr has a different focus ("microservices") than nspawn anyway
("whole machine containers"), hence drop support for it, we cannot
reasonably keep this up to date, and it creates the impression we'd
actually care for the microservices usecase. |
4afd3348c7506dd1d36305b7bcb9feb8952b9d6b |
|
27-Nov-2015 |
Lennart Poettering <lennart@poettering.net> |
tree-wide: expose "p"-suffix unref calls in public APIs to make gcc cleanup easy
GLIB has recently started to officially support the gcc cleanup
attribute in its public API, hence let's do the same for our APIs.
With this patch we'll define an xyz_unrefp() call for each public
xyz_unref() call, to make it easy to use inside a
__attribute__((cleanup())) expression. Then, all code is ported over to
make use of this.
The new calls are also documented in the man pages, with examples how to
use them (well, I only added docs where the _unref() call itself already
had docs, and the examples, only cover sd_bus_unrefp() and
sd_event_unrefp()).
This also renames sd_lldp_free() to sd_lldp_unref(), since that's how we
tend to call our destructors these days.
Note that this defines no public macro that wraps gcc's attribute and
makes it easier to use. While I think it's our duty in the library to
make our stuff easy to use, I figure it's not our duty to make gcc's own
features easy to use on its own. Most likely, client code which wants to
make use of this should define its own:
#define _cleanup_(function) __attribute__((cleanup(function)))
Or similar, to make the gcc feature easier to use.
Making this logic public has the benefit that we can remove three header
files whose only purpose was to define these functions internally.
See #2008. |
b5efdb8af40ea759a1ea584c1bc44ecc81dd00ce |
|
27-Oct-2015 |
Lennart Poettering <lennart@poettering.net> |
util-lib: split out allocation calls into alloc-util.[ch] |
ee104e11e303499a637c5cd8157bd12ad5cc116d |
|
27-Oct-2015 |
Lennart Poettering <lennart@poettering.net> |
user-util: move UID/GID related macros from macro.h to user-util.h |
49cf4170d0b586551527ebf4297f8a3fe6bd71a3 |
|
27-Oct-2015 |
Lennart Poettering <lennart@poettering.net> |
util-lib: move web-related calls into web-util.[ch] |
7ccbd1ae843d77275f2c542582a9a80e5e058a70 |
|
27-Oct-2015 |
Lennart Poettering <lennart@poettering.net> |
util-lib: split out syslog-related calls into syslog-util.[ch] |
8b43440b7ef4b81c69c31de7ff820dc07a780254 |
|
27-Oct-2015 |
Lennart Poettering <lennart@poettering.net> |
util-lib: move string table stuff into its own string-table.[ch] |
6bedfcbb2970e06a4d3280c8fb62083d252ede73 |
|
27-Oct-2015 |
Lennart Poettering <lennart@poettering.net> |
util-lib: split string parsing related calls from util.[ch] into parse-util.[ch] |
3ffd4af22052963e7a29431721ee204e634bea75 |
|
25-Oct-2015 |
Lennart Poettering <lennart@poettering.net> |
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. |
3ee897d6c2401effbc82f5eef35fce405781d6c8 |
|
29-Sep-2015 |
Lennart Poettering <lennart@poettering.net> |
tree-wide: port more code to use send_one_fd() and receive_one_fd()
Also, make it slightly more powerful, by accepting a flags argument, and
make it safe for handling if more than one cmsg attribute happens to be
attached. |
3be78ab2b8f26c3c868275cac2458553efeda8a5 |
|
22-Sep-2015 |
Lennart Poettering <lennart@poettering.net> |
importd: make sure we don't accidentally close fd 0
Fixes #1330 |
ece174c5439021e32ebcc858842de9586072c006 |
|
09-Sep-2015 |
Lennart Poettering <lennart@poettering.net> |
tree-wide: drop {} from one-line if blocks
Patch via coccinelle. |
403ed0e5c914f2a0a683403d8ba7eaf96e3ffcdf |
|
05-Sep-2015 |
Michael Chapman <mike@very.puzzling.org> |
bus-util: support details in CheckAuthorization calls
Extra details for an action can be supplied when calling polkit's
CheckAuthorization method. Details are a list of key/value string pairs.
Custom policy can use these details when making authorization decisions. |
25300b5a1fcf54674a69d0f4ab08925be00b0227 |
|
24-Aug-2015 |
Lennart Poettering <lennart@poettering.net> |
util: make machine_name_is_valid() a macro and move it to hostname-util.h
As it turns out machine_name_is_valid() does the exact same thing as
hostname_is_valid() these days, as it just invoked that and checked the
name length was < 64. However, hostname_is_valid() checks the length
against HOST_NAME_MAX anyway (which is 64 on Linux), hence any
additional check is redundant.
We hence replace machine_name_is_valid() by a macro that simply maps it
to hostname_is_valid() but sets the allow_trailing_dot parameter to
false. We also move this this call to hostname-util.h, to the same place
as the hostname_is_valid() declaration. |
03976f7b4a84b8b1492a549a3470b2bba8f37008 |
|
03-Jul-2015 |
Lennart Poettering <lennart@poettering.net> |
sd-bus: introduce new sd_bus_flush_close_unref() call
sd_bus_flush_close_unref() is a call that simply combines sd_bus_flush()
(which writes all unwritten messages out) + sd_bus_close() (which
terminates the connection, releasing all unread messages) +
sd_bus_unref() (which frees the connection).
The combination of this call is used pretty frequently in systemd tools
right before exiting, and should also be relevant for most external
clients, and is hence useful to cover in a call of its own.
Previously the combination of the three calls was already done in the
_cleanup_bus_close_unref_ macro, but this was only available internally.
Also see #327 |
72c0a2c255b172ebbb2a2b7dab7c9aec4c9582d9 |
|
15-Jun-2015 |
Lennart Poettering <lennart@poettering.net> |
everywhere: port everything to sigprocmask_many() and friends
This ports a lot of manual code over to sigprocmask_many() and friends.
Also, we now consistly check for sigprocmask() failures with
assert_se(), since the call cannot realistically fail unless there's a
programming error.
Also encloses a few sd_event_add_signal() calls with (void) when we
ignore the return values for it knowingly. |
2a1288ff89322a2f49c79f6d1832c8164c14a05c |
|
10-Jun-2015 |
Lennart Poettering <lennart@poettering.net> |
util: introduce CMSG_FOREACH() macro and make use of it everywhere
It's only marginally shorter then the usual for() loop, but certainly
more readable. |
ce30c8dcb41dfe9264f79f30c7f51c0e74576638 |
|
10-Jun-2015 |
Lennart Poettering <lennart@poettering.net> |
tree-wide: whenever we fork off a foreign child process reset signal mask/handlers
Also, when the child is potentially long-running make sure to set a
death signal.
Also, ignore the result of the reset operations explicitly by casting
them to (void). |
24882e06c135584f16f31ba8a00fecde8b7f6fad |
|
29-May-2015 |
Lennart Poettering <lennart@poettering.net> |
util: split out signal-util.[ch] from util.[ch]
No functional changes. |
9030ca462bd13cd6536299814e4a71d5c5e85be9 |
|
29-Apr-2015 |
Lennart Poettering <lennart@poettering.net> |
sd-bus: allow passing NULL as bus parameter to sd_bus_send()
If NULL is specified for the bus it is now automatically derived from
the passed in message.
This commit also changes a number of invocations of sd_bus_send() to
make use of this. |
190700621f95160d364f8ec1d3e360246c41ce75 |
|
29-Apr-2015 |
Lennart Poettering <lennart@poettering.net> |
sd-bus: drop bus parameter from message callback prototype
This should simplify the prototype a bit. The bus parameter is redundant
in most cases, and in the few where it matters it can be derived from
the message via sd_bus_message_get_bus(). |
0b452006de98294d1690f045f6ea2f7f6630ec3b |
|
10-Apr-2015 |
Ronny Chevalier <chevalier.ronny@gmail.com> |
shared: add process-util.[ch] |
39505e3c3b38c968396b503054a81ed9e2ea9909 |
|
08-Apr-2015 |
Ronny Chevalier <chevalier.ronny@gmail.com> |
remove duplicated includes |
be3ce3014eacd66fa292fc9e4e6b3d3b0ef7de23 |
|
26-Mar-2015 |
Lennart Poettering <lennart@poettering.net> |
importd: simplify expression |
587fec427c80b6c34dcf1d7570f891fcb652a7c5 |
|
09-Mar-2015 |
Lennart Poettering <lennart@poettering.net> |
importd: add API for exporting container/VM images
Also, expose it in machinectl. |
b6e676ce41508e2aeea22202fc8f234126177f52 |
|
05-Mar-2015 |
Lennart Poettering <lennart@poettering.net> |
importd: add new bus calls for importing local tar and raw images
This also adds "machinectl import-raw" and "machinectl import-tar" to
wrap these new bus calls.
THe commands basically do for local files that "machinectl pull-raw" and
friends do for remote files. |
4cee5eede280b7fd48c18a1942616c4ac896a554 |
|
02-Mar-2015 |
Lennart Poettering <lennart@poettering.net> |
machined: also set up /var/lib/machines as btrfs, if "machinectl set-limit" is called |
432cea008720480f6eaae7e75e6ad255e91fe2b4 |
|
02-Mar-2015 |
Lennart Poettering <lennart@poettering.net> |
importd: split out setup logic for /var/lib/machines into its own API file |
754061ce7173fd8cb66ade1a48381e2cead35522 |
|
24-Feb-2015 |
Lennart Poettering <lennart@poettering.net> |
importd: enable btrfs quota in /var/lib/machines, if necessary |
113b3fc1a8061f4a24dd0db74e9a3cd0083b2251 |
|
24-Feb-2015 |
Lennart Poettering <lennart@poettering.net> |
importd: create a loopback btrfs file system for /var/lib/machines, if necessary
When manipulating container and VM images we need efficient and atomic
directory snapshots and file copies, as well as disk quota. btrfs
provides this, legacy file systems do not. Hence, implicitly create a
loopback file system in /var/lib/machines.raw and mount it to
/var/lib/machines, if that directory is not on btrfs anyway.
This is done implicitly and transparently the first time the user
invokes "machinectl import-xyz".
This allows us to take benefit of btrfs features for container
management without actually having the rest of the system use btrfs.
The loopback is sized 500M initially. Patches to grow it dynamically are
to follow. |
ce06fdfb3de7a6591041828361f8d10c04a4677e |
|
24-Feb-2015 |
Lennart Poettering <lennart@poettering.net> |
import: print nice warning if we need btrfs but /var/lib/machines is not btrfs |
1c8da044469acabcfc479ba3276954da53210830 |
|
18-Feb-2015 |
Lennart Poettering <lennart@poettering.net> |
shared: introduce cmsg_close_all() call
The call iterates through cmsg list and closes all fds passed via
SCM_RIGHTS.
This patch also ensures the call is used wherever appropriate, where we
might get spurious fds sent and we should better close them, then leave
them lying around. |
c529695e7a30b300fdaa61ace4a8a4ed0e94ad1c |
|
18-Feb-2015 |
Lennart Poettering <lennart@poettering.net> |
logind: open up most bus calls for unpriviliged processes, using PolicyKit
Also, allow clients to alter their own objects without any further
priviliges. i.e. this allows clients to kill and lock their own sessions
without involving PK. |
a97dcc12e486ecff531809802930a26c4da827f2 |
|
05-Feb-2015 |
Tom Gundersen <teg@jklm.no> |
networkd: exit on idle
We will be woken up on rtnl or dbus activity, so let's just quit if some time has passed and that is the only thing that can happen.
Note that we will always stay around if we expect network activity (e.g. DHCP is enabled), as we are not restarted on that. |
7079cfeffb6d520f20ddff53fd78467e72e6cc94 |
|
23-Jan-2015 |
Lennart Poettering <lennart@poettering.net> |
importd: when listing transfers, show progress percentage
With this change the pull protocol implementation processes will pass
progress data to importd which then passes this information on via the
bus. We use sd_notify() as generic transport for this communication,
making importd listen to them, while matching the incoming messages to
the right transfer. |
b9a5f8588facd64fcff0f75fa91e3f80730b93f2 |
|
22-Jan-2015 |
Lennart Poettering <lennart@poettering.net> |
import: only define the _to_string() enum mapping function, thus making gcc shut up |
aa9bd4992ff0240f6ceecb70ec364d5d9c7574f4 |
|
22-Jan-2015 |
Lennart Poettering <lennart@poettering.net> |
import: now that the worker binary is called "systemd-pull" we can shorten the verbs
Atfer all "systemd-pull pull-tar" is unnecessarily redundant, over
"systemd-pull tar"... |
ff828763c40cd138658abf9ed7a19da73c92dec1 |
|
22-Jan-2015 |
Lennart Poettering <lennart@poettering.net> |
importd: try to minimize confusion by renaming "systemd-import" binary to "systemd-pull"
This way "systemd-importd" is the daemon that uses "systemd-pull" as
backend worker. |
09d46cfd41d14f65cb5fe8798a6f7d964700fcd0 |
|
22-Jan-2015 |
Lennart Poettering <lennart@poettering.net> |
importd: minor log improvements |
3d7415f43f0fe6a821d7bc4a341ba371e8a30ef3 |
|
22-Jan-2015 |
Lennart Poettering <lennart@poettering.net> |
import: introduce new mini-daemon systemd-importd, and make machinectl a client to it
The old "systemd-import" binary is now an internal tool. We still use it
as asynchronous backend for systemd-importd. Since the import tool might
require some IO and CPU resources (due to qcow2 explosion, and
decompression), and because we might want to run it with more minimal
priviliges we still keep it around as the worker binary to execute as
child process of importd.
machinectl now has verbs for pulling down images, cancelling them and
listing them. |