summaryrefslogtreecommitdiff
path: root/src/machine/machine.h
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2015-08-24 21:05:09 +0200
committerLennart Poettering <lennart@poettering.net>2015-08-24 22:46:45 +0200
commitfbe550738d03b178bb004a1390e74115e904118a (patch)
treea4a281a5c7d7fb95ad409ba424eb2a430f1cc664 /src/machine/machine.h
parentb9a8d250810d4803bc9bf6b36932b528cb991d1e (diff)
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.)
Diffstat (limited to 'src/machine/machine.h')
-rw-r--r--src/machine/machine.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/machine/machine.h b/src/machine/machine.h
index 0132b65a97..5f978289f2 100644
--- a/src/machine/machine.h
+++ b/src/machine/machine.h
@@ -39,6 +39,7 @@ typedef enum MachineState {
typedef enum MachineClass {
MACHINE_CONTAINER,
MACHINE_VM,
+ MACHINE_HOST,
_MACHINE_CLASS_MAX,
_MACHINE_CLASS_INVALID = -1
} MachineClass;
@@ -95,7 +96,7 @@ struct Machine {
unsigned n_operations;
};
-Machine* machine_new(Manager *manager, const char *name);
+Machine* machine_new(Manager *manager, MachineClass class, const char *name);
void machine_free(Machine *m);
bool machine_check_gc(Machine *m, bool drop_not_started);
void machine_add_to_gc_queue(Machine *m);
@@ -120,3 +121,5 @@ MachineState machine_state_from_string(const char *s) _pure_;
const char *kill_who_to_string(KillWho k) _const_;
KillWho kill_who_from_string(const char *s) _pure_;
+
+int machine_openpt(Machine *m, int flags);