summaryrefslogtreecommitdiff
path: root/src/machine/machined.h
Commit message (Collapse)AuthorAgeFilesLines
* machined: flush nscd caches whenever a machine comes/goesLennart Poettering2018-12-151-0/+4
| | | | This way, nss-mymachines should always serve authoritative data.
* machined: rework referencing of machine scopes from machined, tooLennart Poettering2018-11-091-0/+1
| | | | | | | | When a machine scope is registered by machined, let's add a reference to it, and change the GC mode so that the unit is cleaned up as soon as machined drops the reference, regardless of the fail state. Fixes: #2809
* tree-wide: remove Lennart's copyright linesLennart Poettering2018-06-141-4/+0
| | | | | | | | | | | These lines are generally out-of-date, incomplete and unnecessary. With SPDX and git repository much more accurate and fine grained information about licensing and authorship is available, hence let's drop the per-file copyright notice. Of course, removing copyright lines of others is problematic, hence this commit only removes my own lines and leaves all others untouched. It might be nicer if sooner or later those could go away too, making git the only and accurate source of authorship information.
* tree-wide: drop 'This file is part of systemd' blurbLennart Poettering2018-06-141-2/+0
| | | | | | | | | | | | | | | | This part of the copyright blurb stems from the GPL use recommendations: https://www.gnu.org/licenses/gpl-howto.en.html The concept appears to originate in times where version control was per file, instead of per tree, and was a way to glue the files together. Ultimately, we nowadays don't live in that world anymore, and this information is entirely useless anyway, as people are very welcome to copy these files into any projects they like, and they shouldn't have to change bits that are part of our copyright header for that. hence, let's just get rid of this old cruft, and shorten our codebase a bit.
* machined: some modernizationsLennart Poettering2018-04-171-10/+0
| | | | | | | | | | | | | | | | | A couple of minor modernizations: 1. Don't unnecessarily export functions we don't call outside of machined.c 2. Use cleanup logic for the manager object. 3. Propagate errors properly from manager_new(). So far if sd_event_new() returns EMFILE/ENFILE for some reason we would have logged that as log_oom(), which isn#t right, really. 4. Handle SIGTERM/SIGINT cleanly. It's easy, and prettier then letting the kernel just abort us. It also makes it possible to valgrind machined properly.
* tree-wide: drop license boilerplateZbigniew Jędrzejewski-Szmek2018-04-061-13/+0
| | | | | | | | | | Files which are installed as-is (any .service and other unit files, .conf files, .policy files, etc), are left as is. My assumption is that SPDX identifiers are not yet that well known, so it's better to retain the extended header to avoid any doubt. I also kept any copyright lines. We can probably remove them, but it'd nice to obtain explicit acks from all involved authors before doing that.
* Add SPDX license identifiers to source files under the LGPLZbigniew Jędrzejewski-Szmek2017-11-191-0/+1
| | | | | This follows what the kernel is doing, c.f. https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=5fd54ace4721fc5ce2bb5aef6318fcf17f421460.
* machined: run clone operation asynchronously in the backgroundLennart Poettering2016-05-021-0/+4
| | | | | | | | | | | | | Cloning an image can be slow, if the image is not on a btrfs subvolume, hence let's make sure we do this asynchronously in a child process, so that machined isn't blocked as long as we process the client request. This adds a new, generic "Operation" object to machined, that is used to track these kind of background processes. This is inspired by the MachineOperation object that already exists to make copy operations asynchronous. A later patch will rework the MachineOperation logic to use the generic Operation instead.
* tree-wide: remove Emacs lines from all filesDaniel Mack2016-02-101-2/+0
| | | | | This should be handled fine now by .dir-locals.el, so need to carry that stuff in every file.
* tree-wide: sort includes in *.hThomas Hindoe Paaboel Andersen2015-11-181-2/+2
| | | | | This is a continuation of the previous include sort patch, which only sorted for .c files.
* util-lib: split our string related calls from util.[ch] into its own file ↵Lennart Poettering2015-10-241-3/+4
| | | | | | | | | | | | | | 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.
* machined: introduce pseudo-machine ".host" refererring to the host systemLennart Poettering2015-08-241-0/+2
| | | | | | | | | | | | | | 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.)
* sd-bus: drop bus parameter from message callback prototypeLennart Poettering2015-04-291-4/+4
| | | | | | 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().
* remove unused includesThomas Hindoe Paaboel Andersen2015-02-231-2/+0
| | | | | | 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.
* machined: don't look for images on each property get, but cache the image ↵Lennart Poettering2014-12-281-0/+3
| | | | object inbetween
* machined: Move image discovery logic into src/shared, so that we can make ↵Lennart Poettering2014-12-281-1/+2
| | | | use of it from nspawn
* machined: introduce polkit for OpenLogin() callLennart Poettering2014-12-231-0/+2
| | | | This way "machinectl login" can be opened up to run without privileges.
* machined: add a full bus object for imagesLennart Poettering2014-12-191-0/+1
|
* machined: fix Kill() bus call on machine objects when "what" is specified as ↵Lennart Poettering2014-03-181-1/+1
| | | | "leader"
* bus: also add error parameter to object find and enumerator callbacksLennart Poettering2013-11-221-2/+0
| | | | | Just in order to bring things inline with the method and property callbacks.
* bus: rework message handlers to always take an error argumentLennart Poettering2013-11-211-4/+4
| | | | | | | | | | | | | | | | | | | | Message handler callbacks can be simplified drastically if the dispatcher automatically replies to method calls if errors are returned. Thus: add an sd_bus_error argument to all message handlers. When we dispatch a message handler and it returns negative or a set sd_bus_error we send this as message error back to the client. This means errors returned by handlers by default are given back to clients instead of rippling all the way up to the event loop, which is desirable to make things robust. As a side-effect we can now easily turn the SELinux checks into normal function calls, since the method call dispatcher will generate the right error replies automatically now. Also, make sure we always pass the error structure to all property and method handlers as last argument to follow the usual style of passing variables for return values as last argument.
* machined: keep track of the initial leader PID of a machineLennart Poettering2013-11-061-0/+1
| | | | | | | This way we can without races always determine the machine for a leader PID. This allows machine managers to query the machine for a forked off container/VM without a race where the child might already have died before we could read the cgroup information from /proc/$PID/cgroup.
* machined: simplificationsLennart Poettering2013-11-051-1/+0
|
* machined: port over to libsystemd-busLennart Poettering2013-10-301-14/+15
|
* machined: forward scope properties array from client to systemdLennart Poettering2013-07-111-1/+1
| | | | This makes nspawn's --scope= switch work again.
* machined: split out machine registration stuff from logindLennart Poettering2013-07-021-0/+73
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.