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. |
40c9fe4c0862114dab390c8ed16f78cf056b9140 |
|
20-Jan-2016 |
Jan Synacek <jsynacek@redhat.com> |
basic/terminal-util: introduce SYSTEMD_COLORS environment variable
... to determine if color output should be enabled. If the variable is not set,
fall back to using on_tty(). Also, rewrite existing code to use
colors_enabled() where appropriate. |
10ba4835042c9815a755f8faa774651ec3d52467 |
|
14-Jan-2016 |
WaLyong Cho <walyong.cho@samsung.com> |
bus-util: print "systemctl --user" on user service manager
When a unit was started with "systemctl --user" and it failed, error
messages is printed as "systemctl status". But it should be "systemctl
--user status". |
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] |
49cf4170d0b586551527ebf4297f8a3fe6bd71a3 |
|
27-Oct-2015 |
Lennart Poettering <lennart@poettering.net> |
util-lib: move web-related calls into web-util.[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. |
0f4743651081b5367ab06f238827ddfd4da74e74 |
|
24-Oct-2015 |
Lennart Poettering <lennart@poettering.net> |
util-lib: get_current_dir_name() can return errors other than ENOMEM
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. |
7705a4053d83b5da22c9354a44be26ffc8e24f5a |
|
22-Oct-2015 |
Lennart Poettering <lennart@poettering.net> |
machinectl: accept "none" and "infinity" as specifier when dropping quotas using "machinectl set-limit"
Previously, we already accepted "-" as special value for dropping
limits. Add "infinity", as that's what we support for RLIMITs and hence
should support here to. Also add "none" as that's what the btrfs tools
use. |
40e1f4ea7458a0a80eaf1ef356e52bfe0835412e |
|
08-Oct-2015 |
Lennart Poettering <lennart@poettering.net> |
machined: when opening a shell via machined, pass tty fds in
With this change we'll open the shell's tty right from machined and then
pass it to the transient unit we create. This way we make sure the pty
is opened exactly as long as the transient service is around, and no
longer, and vice versa. This way pty forwarders do not have to deal with
EIO problems due to vhangup, as the pty is open all the time from the
point we set things up to the point where the service goes away. |
ae3dde801253b1d5f7363bb9fb06bcb230f00eb8 |
|
07-Oct-2015 |
Lennart Poettering <lennart@poettering.net> |
machinectl: fix race when opening new shells with "machinectl shell"
Previously, we'd allocate the TTY, spawn a service on it, but
immediately start processing the TTY and forwarding it to whatever the
commnd was started on. This is however problematic, as the TTY might get
actually opened only much later by the service. We'll hence first get
EIOs on the master as the other side is still closed, and hence
considered it hung up and terminated the session.
With this change we add a flag to the pty forwarding logic:
PTY_FORWARD_IGNORE_INITIAL_VHANGUP. If set, we'll ignore all hangups
(i.e. EIOs) on the master PTY until the first byte is successfully read.
From that point on we consider a hangup/EIO a regular connection termination. This
way, we handle the race: when we get EIO initially we'll ignore it,
until the connection is properly set up, at which time we start
honouring it. |
266f3e269d173f104aa2a5e3ceac9b6979ea5039 |
|
29-Sep-2015 |
Lennart Poettering <lennart@poettering.net> |
bus-util: rename bus_open_transport() to bus_connect_transport()
In sd-bus, the sd_bus_open_xyz() family of calls allocates a new bus,
while sd_bus_default_xyz() family tries to reuse the thread's default
bus. bus_open_transport() sometimes internally uses the former,
sometimes the latter family, but suggests it only calls the former via
its name. Hence, let's avoid this confusion, and generically rename the
call to bus_connect_transport().
Similar for all related calls.
And while we are at it, also change cgls + cgtop to do direct systemd
connections where possible, since all they do is talk to systemd itself. |
3f6fd1ba65f962702753c4ad284b588e59689a23 |
|
29-Sep-2015 |
Lennart Poettering <lennart@poettering.net> |
util: introduce common version() implementation and use it everywhere
This also allows us to drop build.h from a ton of files, hence do so.
Since we touched the #includes of those files, let's order them properly
according to CODING_STYLE. |
1fc464f6fbecfc5d8ba9f7b98d19e21fb324bfb9 |
|
22-Sep-2015 |
Lennart Poettering <lennart@poettering.net> |
cgtop: underline table header
Let's underline the header line of the table shown by cgtop, how it is
customary for tables. In order to do this, let's introduce new ANSI
underline macros, and clean up the existing ones as side effect. |
59f448cf15f94bc5ebfd5b254de6f2441d02fbec |
|
10-Sep-2015 |
Lennart Poettering <lennart@poettering.net> |
tree-wide: never use the off_t unless glibc makes us use it
off_t is a really weird type as it is usually 64bit these days (at least
in sane programs), but could theoretically be 32bit. We don't support
off_t as 32bit builds though, but still constantly deal with safely
converting from off_t to other types and back for no point.
Hence, never use the type anymore. Always use uint64_t instead. This has
various benefits, including that we can expose these values directly as
D-Bus properties, and also that the values parse the same in all cases. |
ece174c5439021e32ebcc858842de9586072c006 |
|
09-Sep-2015 |
Lennart Poettering <lennart@poettering.net> |
tree-wide: drop {} from one-line if blocks
Patch via coccinelle. |
6f883237f1b8a96ec0ea354866e033b6fcea9506 |
|
01-Sep-2015 |
Lennart Poettering <lennart@poettering.net> |
cgroup: drop "ignore_self" argument from cg_is_empty()
In all cases where the function (or cg_is_empty_recursive()) ignoring
the calling process is actually wrong, as a process keeps a cgroup busy
regardless if its the current one or another. Hence, let's simplify
things and drop the "ignore_self" parameter. |
21b735e798c580e7af8c33ace9f8565860b7f8df |
|
28-Aug-2015 |
Lennart Poettering <lennart@poettering.net> |
core: add unit_dbus_interface_from_type() to unit-name.h
Let's add a way to get the type-specific D-Bus interface of a unit from
either its type or name to src/basic/unit-name.[ch]. That way we can
share it with the client side, where it is useful in tools like cgls or
machinectl.
Also ports over machinectl to make use of this. |
89fec31893bd71292de5ab88cd73816148165b2f |
|
26-Aug-2015 |
Lennart Poettering <lennart@poettering.net> |
machinectl: pass $TERM into "machinectl shell" sessions |
c615b4ba9fc12373620012fcaa762a096249370b |
|
25-Aug-2015 |
Thomas Hindoe Paaboel Andersen <phomes@gmail.com> |
machinectl: remove unused variable |
ef3100e9637adda26fa19e7ee8606788320dcde3 |
|
24-Aug-2015 |
Lennart Poettering <lennart@poettering.net> |
machinectl: extend the "shell" syntax to take user@container names
In order to make "machinectl shell" more similar to ssh, allow the
following syntax to connect to a container under a specific username:
machinectl shell lennart@fedora
Also beefs up related man page documentation. |
91913f584af38b29a816cca959ba648acd60ac9f |
|
24-Aug-2015 |
Lennart Poettering <lennart@poettering.net> |
machinectl: make machine name parameters for "shell" and "login" optional
If no machine name is specified, imply that we connect to ".host", i.e.
the local host. |
fee6d013d859bc66f5c993530898fece53fab06d |
|
24-Aug-2015 |
Lennart Poettering <lennart@poettering.net> |
machinectl: don't show ".host" pseudo-machine in list by default
Let's hide all machines whose name begins with "." by default, thus
hiding the ".host" pseudo-machine, unless --all is specified. This
takes inspiration from the ".host" image handling in "machinectl
list-images" which also hides all images whose name starts with ".". |
fbe550738d03b178bb004a1390e74115e904118a |
|
24-Aug-2015 |
Lennart Poettering <lennart@poettering.net> |
machined: introduce pseudo-machine ".host" refererring to the host system
Some of the operations machined/machinectl implement are also very
useful when applied to the host system (such as machinectl login,
machinectl shell or machinectl status), hence introduce a pseudo-machine
by the name of ".host" in machined that refers to the host system, and
may be used top execute operations on the host system with.
This copies the pseudo-image ".host" machined already implements for
image related commands.
(This commit also adds a PK privilege for opening a PTY in a container,
which was previously not accessible for non-root.) |
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. |
c454426c54c9beb274f415a80c64a4f1580700e7 |
|
24-Aug-2015 |
Lennart Poettering <lennart@poettering.net> |
machinectl: add new "machinectl shell" command
This makes use of machined's new OpenShell() command and allows opening
a new interactive shell in any container. |
1fe6fa167902199b6d0190697368bb1e80aeb465 |
|
04-Aug-2015 |
Richard Maw <richard.maw@codethink.co.uk> |
machinectl: support relative host paths in copy-{from,to} |
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. |
e7e55dbdc38f929805ab2407fbd50886043a9e7c |
|
14-Jun-2015 |
David Herrmann <dh.herrmann@gmail.com> |
tree-wide: fix memory leaks in users of bus_map_all_properties()
If you use bus_map_all_properties(), you must be aware that it might
touch output variables even though it may fail. This is, because we parse
many different bus-properties and cannot tell how to clean them up, in
case we fail deep down in the parser.
Fix all callers of bus_map_all_properties() to correctly cleanup any
context structures at all times. |
24882e06c135584f16f31ba8a00fecde8b7f6fad |
|
29-May-2015 |
Lennart Poettering <lennart@poettering.net> |
util: split out signal-util.[ch] from util.[ch]
No functional changes. |
57ab2eabb8f92fad5239c7d4492e9c6e23ee0678 |
|
15-May-2015 |
Jan Synacek <jsynacek@redhat.com> |
systemctl: introduce --now for enable, disable and mask
https://bugs.freedesktop.org/show_bug.cgi?id=42940 |
90615ad79188c360c0571b0a0d2ed81d88ece1ab |
|
06-May-2015 |
Thomas Hindoe Paaboel Andersen <phomes@gmail.com> |
machinectl: remove unused variable |
7410616cd9dbbec97cf98d75324da5cda2b2f7a2 |
|
06-May-2015 |
Lennart Poettering <lennart@poettering.net> |
core: rework unit name validation and manipulation logic
A variety of changes:
- Make sure all our calls distuingish OOM from other errors if OOM is
not the only error possible.
- Be much stricter when parsing escaped paths, do not accept trailing or
leading escaped slashes.
- Change unit validation to take a bit mask for allowing plain names,
instance names or template names or an combination thereof.
- Refuse manipulating invalid unit name |
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(). |
288a74cce597f81d3ba01d8a5ca7d2ba5b654b7e |
|
11-Apr-2015 |
Ronny Chevalier <chevalier.ronny@gmail.com> |
shared: add terminal-util.[ch] |
0b452006de98294d1690f045f6ea2f7f6630ec3b |
|
10-Apr-2015 |
Ronny Chevalier <chevalier.ronny@gmail.com> |
shared: add process-util.[ch] |
15411c0cb1192799b37ec8f25d6f30e8d7292fc6 |
|
13-Mar-2015 |
David Herrmann <dh.herrmann@gmail.com> |
tree-wide: there is no ENOTSUP on linux
Replace ENOTSUP by EOPNOTSUPP as this is what linux actually uses. |
6e9efa59209d48fc69a456fbadb2b5c113f503a6 |
|
10-Mar-2015 |
Lennart Poettering <lennart@poettering.net> |
man: document "machinectl export-tar" and "export-raw" |
061a237dd253653771da8a782dfefa848c096d92 |
|
09-Mar-2015 |
Thomas Hindoe Paaboel Andersen <phomes@gmail.com> |
machinectl: remove unused variables |
587fec427c80b6c34dcf1d7570f891fcb652a7c5 |
|
09-Mar-2015 |
Lennart Poettering <lennart@poettering.net> |
importd: add API for exporting container/VM images
Also, expose it in machinectl. |
e721d697db20c976c9eebd32c461d2b957efa437 |
|
05-Mar-2015 |
Lennart Poettering <lennart@poettering.net> |
machinectl: minor --help text improvements |
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. |
172a6ce5aea8575c61a466d5debf4f5b488085eb |
|
02-Mar-2015 |
Lennart Poettering <lennart@poettering.net> |
machinectl: update --help text to clarify that set-limit can also change pool size |
d6ce17c7f02ed3facdb45f65f546e587c2f00950 |
|
25-Feb-2015 |
Lennart Poettering <lennart@poettering.net> |
machined,machinectl: add calls for changing container/VM quotas |
160e3793adf2da2bd9ae3fe6b8881bb937e6e71b |
|
24-Feb-2015 |
Lennart Poettering <lennart@poettering.net> |
machined/machinectl: when "machinectl image-status" is used without arguments show statistics about pool |
2eec67acbb00593e414549a7e5b35eb7dd776b1b |
|
23-Feb-2015 |
Thomas Hindoe Paaboel Andersen <phomes@gmail.com> |
remove unused includes
This patch removes includes that are not used. The removals were found with
include-what-you-use which checks if any of the symbols from a header is
in use. |
9c857b9d160c10b4454fc9f83442c1878343422f |
|
18-Feb-2015 |
Lennart Poettering <lennart@poettering.net> |
nspawn: when connected to pipes for stdin/stdout, pass them as-is to PID 1
Previously we always invoked the container PID 1 on /dev/console of the
container. With this change we do so only if nspawn was invoked
interactively (i.e. its stdin/stdout was connected to a TTY). In all other
cases we directly pass through the fds unmodified.
This has the benefit that nspawn can be added into shell pipelines.
https://bugs.freedesktop.org/show_bug.cgi?id=87732 |
2723b3b51d409340558e46e37e90525d4f880fe1 |
|
18-Feb-2015 |
Lennart Poettering <lennart@poettering.net> |
machinectl: issue all bus commands while allowing interactive auth |
0370612e0522191f929e3feb7d4937fff3d421e2 |
|
17-Feb-2015 |
Lennart Poettering <lennart@poettering.net> |
machined: make "machinectl copy-to" and "machinectl copy-from" server side operations
This way, any bus client can make use of these calls. |
90adaa25e894a580930ef2c3e65ab8db8295515a |
|
17-Feb-2015 |
Lennart Poettering <lennart@poettering.net> |
machined: move logic for bind mounting into containers from machinectl to machined
This extends the bus interface, adding BindMountMachine() for bind
mounting directories from the host into the container. |
eef46c372f64f40dd75415b2c504c73138719c8d |
|
11-Feb-2015 |
Lennart Poettering <lennart@poettering.net> |
tree-wide: whenever we include libgen.h, immediately undefine basename()
Also, document in adjacent comments and in CODING_STYLE why we do that. |
63c372cb9df3bee01e3bf8cd7f96f336bddda846 |
|
03-Feb-2015 |
Lennart Poettering <lennart@poettering.net> |
util: rework strappenda(), and rename it strjoina()
After all it is now much more like strjoin() than strappend(). At the
same time, add support for NULL sentinels, even if they are normally not
necessary. |
fed6df828d86c053a96d5b50af75c53eb8dd4666 |
|
02-Feb-2015 |
Thomas Hindoe Paaboel Andersen <phomes@gmail.com> |
remove unused variables |
cc98b3025eeb89addb76a27390cb2baca4eab8b9 |
|
26-Jan-2015 |
Torstein Husebø <torstein@huseboe.net> |
treewide: fix multiple typos |
56b921c3d863f0e098f60f934e6c5880575c68ab |
|
25-Jan-2015 |
Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> |
machinectl: fix typo |
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. |
56e6c2abb8f18bba2bb9d96d66ac7e633349ddfb |
|
23-Jan-2015 |
Lennart Poettering <lennart@poettering.net> |
machinectl: fix handling of --verify= argument for dkr downloads |
6adf7b5e46d32376868feef0197e6ada352aa6f2 |
|
22-Jan-2015 |
Lennart Poettering <lennart@poettering.net> |
machinectl: when downloading an image, clarify that C-c will not cancel the download, but continue it in the background |
813c65c34beae2eed1f93d9317f97d7e806389f5 |
|
22-Jan-2015 |
Lennart Poettering <lennart@poettering.net> |
machinectl: minor simplification |
6e18cc9fa078d2a967251017ddb5baefb104b720 |
|
22-Jan-2015 |
Lennart Poettering <lennart@poettering.net> |
machinectl: parse verify setting client-side |
b5b38b41c37dbe1a117af9bf99e94b58ac91239a |
|
22-Jan-2015 |
Lennart Poettering <lennart@poettering.net> |
machinectl: various minor updates to the --help text |
7f444afa1b62920265fec99a61cb4dc53d521956 |
|
22-Jan-2015 |
Lennart Poettering <lennart@poettering.net> |
import: rename --verify=sum to --verify=checksum
This is how we call it internally, and also a bit more descriptive. |
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. |
c19de71113f956809995fc68817e055e9f61f607 |
|
19-Jan-2015 |
Lennart Poettering <lennart@poettering.net> |
machined: refer to the disk space allocated for an image to "usage" rather than "size"
After all, it's closer to the "du"-reported value than to the file
sizes... |
bb4a228207815df88cdf68acd9e46ec19e0d3e30 |
|
14-Jan-2015 |
Lennart Poettering <lennart@poettering.net> |
machinectl: fix minor memory leak |
d538bfc71331d2e48363283decd77a61599021db |
|
14-Jan-2015 |
Cristian Rodríguez <crrodriguez@opensuse.org> |
machinectl: use GNU basename, not the XPG version |
f7621db0e38c3e96d48766ae648f1b7a0949ea13 |
|
08-Jan-2015 |
Lennart Poettering <lennart@poettering.net> |
loginctl: port to generic verbs.h API |
e45fc5e738b0b7700e8b4f3c4b25c58a49b44b27 |
|
08-Jan-2015 |
Lennart Poettering <lennart@poettering.net> |
man: bring machinectl man page up-to-date |
079dac08c6a2725ce6e5ed2afa3f03d057c999c6 |
|
08-Jan-2015 |
Lennart Poettering <lennart@poettering.net> |
systemctl,loginctl: start polkit agent for all polkit enabled operations |
acf97e213e69a97e63ab8f7fad7ecd53608c757a |
|
08-Jan-2015 |
Lennart Poettering <lennart@poettering.net> |
machinectl: given that machinectl invokes a number of polkit enabled methods, start the polkit agent on terminals |
8b0cc9a36c8f92f010f2e8465942d2cd7c580d78 |
|
08-Jan-2015 |
Lennart Poettering <lennart@poettering.net> |
machinectl: show most recent log output in "machinectl status", too |
0b63e2789f984e84f40bf6e49f5da15c87298ced |
|
07-Jan-2015 |
Lennart Poettering <lennart@poettering.net> |
machinectl: prettify "machinectl list" output |
da054c3782f25b3b18243f6c76dcfcf90ba70274 |
|
07-Jan-2015 |
Lennart Poettering <lennart@poettering.net> |
ptyfwd: simplify how we handle vhangups a bit |
0ec5543c4c0318552a4dcdd83210793347b93081 |
|
07-Jan-2015 |
Lennart Poettering <lennart@poettering.net> |
machinectl: make sure that "machinectl login" exits immediately when the machine it is connected to dies |
8246dff1f81e40b469e40581597b89d19b4682bd |
|
05-Jan-2015 |
Lennart Poettering <lennart@poettering.net> |
machinectl: remove spurious newline |
9a14fb6285bdb089d4fc195410de3362cb4f586f |
|
02-Jan-2015 |
Thomas Hindoe Paaboel Andersen <phomes@gmail.com> |
machinectl: Check type instead of path before printing the type
Looks like a typo when introduced in fefdc04b38725457a91651218feb7000f6ccc1f4 |
06a079055a68dd73150ed002fad7059ad3b41235 |
|
31-Dec-2014 |
David Herrmann <dh.herrmann@gmail.com> |
machinectl: remove dead code
'r' is not touched after the previous error-checking 100 lines above. Drop
that code. |
d8f52ed25a9edce75fda5251c977b7898e33887e |
|
29-Dec-2014 |
Lennart Poettering <lennart@poettering.net> |
machinectl: add "enable" and "disable" verbs for enabling/disabling systemd-nspawn for containers
This is basically just a shortcut for "systemctl enable
systemd-nspawn@<foobar>.service", but does escaping. |
ebd011d95b61a86258dece9864f65b7c4af721c0 |
|
29-Dec-2014 |
Lennart Poettering <lennart@poettering.net> |
machinectl: add new "start" verb to start a container as a service in nspawn |
b6b1849830f5e4a6065c3b0c993668e500c954d3 |
|
28-Dec-2014 |
Lennart Poettering <lennart@poettering.net> |
machined: add support for reporting image size via btrfs quota |
ebd93cb684806ac0f352139e69ac8f53eb49f5e4 |
|
28-Dec-2014 |
Lennart Poettering <lennart@poettering.net> |
machinectl/machined: implement "rename", "clone", "read-only" verbs for machine images |
086821244b5113f00a0ef993b78dc56aae2a8f6c |
|
28-Dec-2014 |
Lennart Poettering <lennart@poettering.net> |
machined: add "machinectl remove" for removing images |
fefdc04b38725457a91651218feb7000f6ccc1f4 |
|
26-Dec-2014 |
Lennart Poettering <lennart@poettering.net> |
machinectl: add status commands |
8937e7b68940d0fa0d0aab90eb7425fa7dccebc9 |
|
26-Dec-2014 |
Lennart Poettering <lennart@poettering.net> |
machinectl: mark read-only images when listing in red |
6389e747d5b09b18e00d85b9b13c1be2ff884015 |
|
26-Dec-2014 |
Lennart Poettering <lennart@poettering.net> |
machinectl: left-align times |
10f9c75519671e7c7ab8993b54fe22da7c2d0c38 |
|
25-Dec-2014 |
Lennart Poettering <lennart@poettering.net> |
machined: beef up machined image listing with creation/modification times of subvolumes
We make use of the btrfs subvol crtime for this, and for gpt images of a
manually managed xattr, if we can. |
de33fc625725d199629ed074d6278504deb23deb |
|
24-Dec-2014 |
Lennart Poettering <lennart@poettering.net> |
sd-bus: rename sd_bus_open_system_container() to sd_bus_open_system_machine()
Pretty much everywhere else we use the generic term "machine" when
referring to containers in API, so let's do though in sd-bus too. In
particular, since the concept of a "container" exists in sd-bus too, but
as part of the marshalling system. |
d04c1fb8e215600b4950c6778c6c16ddafc14024 |
|
23-Dec-2014 |
Lennart Poettering <lennart@poettering.net> |
machined: introduce polkit for OpenLogin() call
This way "machinectl login" can be opened up to run without privileges. |
bf441e3d9371a7e5aa1def66cfc40f0118884644 |
|
23-Dec-2014 |
Lennart Poettering <lennart@poettering.net> |
machinectl: rework 'machinectl login' to use OpenMachineLogin() |
ee451d766a64117a41ec36dd71e61683c9d9b83c |
|
23-Dec-2014 |
Lennart Poettering <lennart@poettering.net> |
systemd-run: support -t mode when combined with -M
For that, ask machined for a container PTY and use that. |
40205d706e1210763ff4c98a317556375bd04bcd |
|
23-Dec-2014 |
Lennart Poettering <lennart@poettering.net> |
machined: add OpenMachinePTY() bus call for allocating a PTY device within a container
Then, port "machinectl" over to make use of it. |
c7b7d4493aa03e9ef5fb1e670b8969a48aa494dd |
|
23-Dec-2014 |
Lennart Poettering <lennart@poettering.net> |
machinectl,nspawn: don't print extra final newline if pty terminal output was newline-terinated anyway |
9b15b7846d4de01bb5d9700a24077787e984e8ab |
|
23-Dec-2014 |
Lennart Poettering <lennart@poettering.net> |
run: add a new "-t" mode for invoking a binary on an allocated TTY |
56159e0d918e9a9be07988133bb2847779325de0 |
|
19-Dec-2014 |
Lennart Poettering <lennart@poettering.net> |
machinectl: port machinectl to new verbs logic |
cd61c3bfd718fb398cc53ced906266a9297782c9 |
|
19-Dec-2014 |
Lennart Poettering <lennart@poettering.net> |
machined/machinectl: add logic to show list of available images
This adds a new bus call to machined that enumerates /var/lib/container
and returns all trees stored in it, distuingishing three types:
- GPT disk images, which are files suffixed with ".gpt"
- directory trees
- btrfs subvolumes |
f2cbe59e113f08549949a76ac5b9b3972df4cc30 |
|
18-Dec-2014 |
Lennart Poettering <lennart@poettering.net> |
machinectl: add new commands for copying files from/to containers |
785890acf6d629ff881a1f065f431df1b7fc8c7a |
|
18-Dec-2014 |
Lennart Poettering <lennart@poettering.net> |
machinectl: implement "bind" command to create additional bind mounts from host to container during runtime |
4a62c710b62a5a3c7a8a278b810b9d5b5a0c8f4f |
|
28-Nov-2014 |
Michal Schmidt <mschmidt@redhat.com> |
treewide: another round of simplifications
Using the same scripts as in f647962d64e "treewide: yet more log_*_errno
+ return simplifications". |
56f64d95763a799ba4475daf44d8e9f72a1bd474 |
|
28-Nov-2014 |
Michal Schmidt <mschmidt@redhat.com> |
treewide: use log_*_errno whenever %m is in the format string
If the format string contains %m, clearly errno must have a meaningful
value, so we might as well use log_*_errno to have ERRNO= logged.
Using:
find . -name '*.[ch]' | xargs sed -r -i -e \
's/log_(debug|info|notice|warning|error|emergency)\((".*%m.*")/log_\1_errno(errno, \2/'
Plus some whitespace, linewrap, and indent adjustments. |
f647962d64e844689f3e2acfce6102fc47e76df2 |
|
28-Nov-2014 |
Michal Schmidt <mschmidt@redhat.com> |
treewide: yet more log_*_errno + return simplifications
Using:
find . -name '*.[ch]' | while read f; do perl -i.mmm -e \
'local $/;
local $_=<>;
s/(if\s*\([^\n]+\))\s*{\n(\s*)(log_[a-z_]*_errno\(\s*([->a-zA-Z_]+)\s*,[^;]+);\s*return\s+\g4;\s+}/\1\n\2return \3;/msg;
print;'
$f
done
And a couple of manual whitespace fixups. |
da927ba997d68401563b927f92e6e40e021a8e5c |
|
28-Nov-2014 |
Michal Schmidt <mschmidt@redhat.com> |
treewide: no need to negate errno for log_*_errno()
It corrrectly handles both positive and negative errno values. |
0a1beeb64207eaa88ab9236787b1cbc2f704ae14 |
|
28-Nov-2014 |
Michal Schmidt <mschmidt@redhat.com> |
treewide: auto-convert the simple cases to log_*_errno()
As a followup to 086891e5c1 "log: add an "error" parameter to all
low-level logging calls and intrdouce log_error_errno() as log calls
that take error numbers", use sed to convert the simple cases to use
the new macros:
find . -name '*.[ch]' | xargs sed -r -i -e \
's/log_(debug|info|notice|warning|error|emergency)\("(.*)%s"(.*), strerror\(-([a-zA-Z_]+)\)\);/log_\1_errno(-\4, "\2%m"\3);/'
Multi-line log_*() invocations are not covered.
And we also should add log_unit_*_errno(). |
023fb90b83871a15ef7f57e8cd126e3426f99b9e |
|
31-Oct-2014 |
Lennart Poettering <lennart@poettering.net> |
ptyforward: rework PTY forwarder logic used by nspawn to utilize the normal event loop
We really should not run manual event loops anymore, but standardize on
sd_event, so that we can run sd_bus connections from it eventually. |
249968612f16a71df909d6e73785c18a9ff36a65 |
|
04-Aug-2014 |
Lennart Poettering <lennart@poettering.net> |
bus: always explicitly close bus from main programs
Since b5eca3a2059f9399d1dc52cbcf9698674c4b1cf0 we don't attempt to GC
busses anymore when unsent messages remain that keep their reference,
when they otherwise are not referenced anymore. This means that if we
explicitly want connections to go away, we need to close them.
With this change we will no do so explicitly wherver we connect to the
bus from a main program (and thus know when the bus connection should go
away), or when we create a private bus connection, that really should go
away after our use.
This fixes connection leaks in the NSS and PAM modules. |
601185b43da638b1c74153deae01dbd518680889 |
|
04-Aug-2014 |
Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> |
Unify parse_argv style
getopt is usually good at printing out a nice error message when
commandline options are invalid. It distinguishes between an unknown
option and a known option with a missing arg. It is better to let it
do its job and not use opterr=0 unless we actually want to suppress
messages. So remove opterr=0 in the few places where it wasn't really
useful.
When an error in options is encountered, we should not print a lengthy
help() and overwhelm the user, when we know precisely what is wrong
with the commandline. In addition, since help() prints to stdout, it
should not be used except when requested with -h or --help.
Also, simplify things here and there. |
e7e9b6bb0b0bc5b1eb256a44f8afec6b634f26ef |
|
19-Jul-2014 |
Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> |
machinectl: make sure we are not reading an unitialized variable |
0dd25fb9f005d8ab7ac4bc10a609d00569f8c56a |
|
18-Jul-2014 |
Lennart Poettering <lennart@poettering.net> |
change type for address family to "int"
Let's settle on a single type for all address family values, even if
UNIX is very inconsitent on the precise type otherwise. Given that
socket() is the primary entrypoint for the sockets API, and that uses
"int", and "int" is relatively simple and generic, we settle on "int"
for this. |
f48e75cb9a8112d35855c44a156934f2ee0edb2e |
|
10-Jul-2014 |
Lennart Poettering <lennart@poettering.net> |
machinectl: show network interface name for containers
Also, append the if indexes as scope field to the addresses we show.
That way they may be used for connecting to the containers directly. |
717603e391b52983ca1fd218e7333a1b9dfc5c05 |
|
03-Jul-2014 |
Lennart Poettering <lennart@poettering.net> |
machinectl: show /etc/os-release information of container in status output |
878cd7e95ca303f9851d227a22d2022bd49944b0 |
|
18-May-2014 |
Lennart Poettering <lennart@poettering.net> |
machined: add logic to query IP addresses of containers |
3d94f76c99da13e5603831d0b278f8c8c21bcb02 |
|
24-Mar-2014 |
Lennart Poettering <lennart@poettering.net> |
util: replace close_pipe() with new safe_close_pair()
safe_close_pair() is more like safe_close(), except that it handles
pairs of fds, and doesn't make and misleading allusion, as it works
similarly well for socketpairs() as for pipe()s... |
03e334a1c7dc8c20c38902aa039440763acc9b17 |
|
18-Mar-2014 |
Lennart Poettering <lennart@poettering.net> |
util: replace close_nointr_nofail() by a more useful safe_close()
safe_close() automatically becomes a NOP when a negative fd is passed,
and returns -1 unconditionally. This makes it easy to write lines like
this:
fd = safe_close(fd);
Which will close an fd if it is open, and reset the fd variable
correctly.
By making use of this new scheme we can drop a > 200 lines of code that
was required to test for non-negative fds or to reset the closed fd
variable afterwards. |
1dba654b27918c22e413ac5b3c19301f1ff86ad2 |
|
18-Mar-2014 |
Lennart Poettering <lennart@poettering.net> |
machinectl: reimplement machinectl's "reboot" verb on top of "kill", and add new verb "poweroff"
There's really no point to send the reboot SIGINT from machinectl
directly, if machined can do that anyway. This saves code, and
makes machinectl network transparent for these verbs. And while we are
at it we can easily add a "poweroff" verb in addition to "reboot". Yay! |
3db729cb8e6822114e9323f4041dcdc080f2fb3c |
|
20-Feb-2014 |
Jason A. Donenfeld <Jason@zx2c4.com> |
sd-bus: the bus returned should be the first arg
This matches the API of previous headers, such as sd-journal.h. |
6bebb0add4d7c32c503e688105c1607e5e20f979 |
|
18-Feb-2014 |
Thomas Hindoe Paaboel Andersen <phomes@gmail.com> |
machinectl: remove unused --no-ask-password |
e56056e93d33619a3acf13e483900b4f8938228f |
|
18-Feb-2014 |
Thomas Hindoe Paaboel Andersen <phomes@gmail.com> |
machinectl: add bash completion |
923d8fd381bced1c2d90ca53d18629d61a0f454a |
|
12-Feb-2014 |
Lennart Poettering <lennart@poettering.net> |
machinectl: add new "machinectl reboot" call |
89f7c8465cd1ab37347dd0c15920bce31e8225df |
|
11-Feb-2014 |
Lennart Poettering <lennart@poettering.net> |
machined: optionally, allow registration of pre-existing units (scopes
or services) as machine with machined |
6261f11fc3d0a8b63c5afa5313d96607a008b54e |
|
23-Dec-2013 |
Lennart Poettering <lennart@poettering.net> |
machinectl: fix success check when getting pty from within container |
fbadf04511389c4a0687ba5e9baf0ecebdbb07f1 |
|
23-Dec-2013 |
Lennart Poettering <lennart@poettering.net> |
bus: when getting a kdbus connection into a container wait first for child, then read message
There's no EOF generated for AF_UNIX/SOCK_DGRAM sockets, hence let's
wait for the child first to see if it succeeded, only then read the socket. |
8c841f21f5042b11acc91cc1b039cb162cbbe8f4 |
|
19-Dec-2013 |
Djalal Harouni <tixxdz@opendz.org> |
machinectl: show_properties() already logs the error |
a4475f577bd0daf762d6c3b4e58bc484e0cb74af |
|
17-Dec-2013 |
Lennart Poettering <lennart@poettering.net> |
bus: when entering an existing namespace to connect to a container's system bus also switch over PID namespace
This is necessary to ensure that kdbus can collect creds of the
destination namespace when connecting. |
bc9fd78c7bfc39881e19457e476393635f8b0442 |
|
14-Dec-2013 |
Lennart Poettering <lennart@poettering.net> |
bus: when connecting to a container's kdbus instance, enter namespace first
Previously we'd open the connection in the originating namespace, which
meant most peers of the bus would not be able to make sense of the
PID/UID/... identity of us since we didn't exist in the namespace they
run in. However they require this identity for privilege decisions,
hence disallowing access to anything from the host.
Instead, when connecting to a container, create a temporary subprocess,
make it join the container's namespace and then connect from there to
the kdbus instance. This is similar to how we do it for socket
conections already.
THis also unifies the namespacing code used by machinectl and the bus
APIs. |
4f8f66cb4236783cd3cbee97fefc9aaa8469ac08 |
|
09-Dec-2013 |
Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> |
Help output spring cleaning
Use [brackets] only for optional elements.
Use <optional> in XML sources. |
613b411c947635136637f8cdd66b94512f761eab |
|
27-Nov-2013 |
Lennart Poettering <lennart@poettering.net> |
service: add the ability for units to join other unit's PrivateNetwork= and PrivateTmp= namespaces |
a6c616024db23fef34152c1432892824a07799cc |
|
08-Nov-2013 |
Lennart Poettering <lennart@poettering.net> |
machinectl: close bus to container early |
74c7b1ed052fc42d9841a5d83d310fa96124c47c |
|
07-Nov-2013 |
Lennart Poettering <lennart@poettering.net> |
machinectl: show list headers even if we pipe, since that appears to be the usual way |
5b30bef856e89a571df57b7b953e9a1409d9aced |
|
07-Nov-2013 |
Lennart Poettering <lennart@poettering.net> |
bus: log message parsing errors everywhere with a generalized bus_log_parse_error() |
46e65dcc3a522b5e992e165b5e61d14254026859 |
|
07-Nov-2013 |
Lennart Poettering <lennart@poettering.net> |
polkit: don't spawn local client if we access a remote system |
27e72d6b22890ba4a8cbc05c49667cd1cccf1461 |
|
07-Nov-2013 |
Simon Peeters <peeters.simon@gmail.com> |
bus: make bus_print_all_properties work for non machinectl cases
add a destination parameter and skip properties we can't read |
8bdbb8d9cbe1d35708385573d70984ab4533812d |
|
07-Nov-2013 |
Lennart Poettering <lennart@poettering.net> |
machinectl: we need glibc's socket.h, not our own |
34a6778fb9d1065f3fbb8e2243b9f0f25d1d18f1 |
|
06-Nov-2013 |
Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> |
machinectl: use initialization instead of zeroing |
eb9da376d76b48585b3b63b4f91903b54f7abd36 |
|
06-Nov-2013 |
Lennart Poettering <lennart@poettering.net> |
clients: unify how we invoke getopt_long()
Among other things this makes sure we always expose a --version command
and show it in the help texts. |
84f6181c2ac99a0514ca5e0c8fc8c8e284caf789 |
|
06-Nov-2013 |
Lennart Poettering <lennart@poettering.net> |
clients: various simplifications |
9f6eb1cd58f2ddf2eb6ba0e4de056e13d938af75 |
|
05-Nov-2013 |
Kay Sievers <kay@vrfy.org> |
bus: update bus_map_all_properties() |
f69157a66ffe413b4cf8bd79057487fc8921e78b |
|
01-Nov-2013 |
Thomas Hindoe Paaboel Andersen <phomes@gmail.com> |
machinectl: fix warning when compiling with -Og
src/machine/machinectl.c: In function ‘openpt_in_namespace’:
src/machine/machinectl.c:623:44: warning: ‘master’ may be used uninitialized in this function [-Wmaybe-uninitialized]
close_nointr_nofail(master);
^ |
04d39279245834494baccfdb9349db8bf80abd13 |
|
31-Oct-2013 |
Lennart Poettering <lennart@poettering.net> |
machinectl: add new command to spawn a getty inside a container |
d21ed1ead18d16d35c30299a69d3366847f8a039 |
|
30-Oct-2013 |
Lennart Poettering <lennart@poettering.net> |
run: add support for executing commands remotely via SSH or in a container
Also, unify the transport logic a bit, since we reuse the same scheme in
many of our client tools. |
53755121e1c8ebd3db0330bc82965ecf9a986449 |
|
30-Oct-2013 |
Lennart Poettering <lennart@poettering.net> |
machinectl: we don't really just show information, we execute operations |
a7893c6b28772edbc7e1fea3c209caa54d465648 |
|
30-Oct-2013 |
Lennart Poettering <lennart@poettering.net> |
bus: add API call to create bus connection to the system bus of local containers
Also, add support for this to machinectl, so that we can enumerate the
machines that run inside a container. We must go deeper! |
0f8bd8debb0ff7f5bff7738841931f6c41e40bc1 |
|
30-Oct-2013 |
Lennart Poettering <lennart@poettering.net> |
bus: move ssh support into public API of libsystem-bus |
415e7f65dbc66089f0d1b9de6785026596df88e7 |
|
30-Oct-2013 |
Marc-Antoine Perennou <Marc-Antoine@Perennou.com> |
machinectl: privileged option is gone |
a1da85830bfaa77b9eb9c54693e5573559c97e50 |
|
30-Oct-2013 |
Tom Gundersen <teg@jklm.no> |
machinectl: port to sd-bus |
9d12709626bccc0cae677a7035f62efe6aabb4ab |
|
11-Jul-2013 |
Lennart Poettering <lennart@poettering.net> |
loginctl: suppress cgroup tree output if cgroup is empty
same for machinectl |
aa1936ea1a89c2bb968ba33e3274898a4eeae771 |
|
11-Jul-2013 |
Lennart Poettering <lennart@poettering.net> |
loginctl: restore cgroup display for status output
Same for machinectl. |
19887cd06a3af2f045e763986eda19e208bd3f85 |
|
07-Jul-2013 |
Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> |
man: document machinectl and systemd-machined |
1ee306e1248866617c96ed9f4263f375588ad838 |
|
02-Jul-2013 |
Lennart Poettering <lennart@poettering.net> |
machined: split out machine registration stuff from logind
Embedded folks don't need the machine registration stuff, hence it's
nice to make this optional. Also, I'd expect that machinectl will grow
additional commands quickly, for example to join existing containers and
suchlike, hence it's better keeping that separate from loginctl. |