summaryrefslogtreecommitdiff
path: root/src/core/dbus-manager.c
AgeCommit message (Collapse)Author
2013-06-20logind: add infrastructure to keep track of machines, and move to slicesLennart Poettering
- This changes all logind cgroup objects to use slice objects rather than fixed croup locations. - logind can now collect minimal information about running VMs/containers. As fixed cgroup locations can no longer be used we need an entity that keeps track of machine cgroups in whatever slice they might be located. Since logind already keeps track of users, sessions and seats this is a trivial addition. - nspawn will now register with logind and pass various bits of metadata along. A new option "--slice=" has been added to place the container in a specific slice. - loginctl gained commands to list, introspect and terminate machines. - user.slice and machine.slice will now be pulled in by logind.service, since only logind.service requires this slice.
2013-06-02analyze: show unit file loading on plotThomas Hindoe Paaboel Andersen
This will add another color to the legend called "Loading unit files" Like the generators it will mark a part of the systemd bar indicating the time spent while loading unit files.
2013-06-02analyze: show generators on plotUmut Tezduyar
2013-05-30systemctl: add commands set-default and get-defaultVáclav Pavlín
systemctl set-default NAME links the default.target to the given unit, get-default prints out the path to the currently set default target.
2013-04-26dbus-manager.c: log error, why switch-root is refusedHarald Hoyer
2013-04-24Add set_consume which always takes ownershipZbigniew Jędrzejewski-Szmek
Freeing in error path is the common pattern with set_put().
2013-04-16path-util: unify code for detecting OS treesLennart Poettering
This also makes sure we always detect an OS tree the same way, by checking for /etc/os-release.
2013-04-08dbus-manager: fix variable type introspectionRonny Chevalier
2013-03-18Use bus_maybe_send_reply() where applicableColin Walters
This is a followup to: commit 1a37b9b9043ef83e9900e460a9a1fccced3acf89 It will fix denial messages from dbus-daemon between gdm and systemd-logind on logging into GNOME due to this. See the previous commit for more details.
2013-02-27unit: rework resource management APILennart Poettering
This introduces a new static list of known attributes and their special semantics. This means that cgroup attribute values can now be automatically translated from user to kernel notation for command line set settings, too. This also adds proper support for multi-line attributes.
2013-02-11manager: validate environment parameters for SetEnvironment(), ↵Lennart Poettering
UnsetEnvironment() bus calls
2013-02-11env: considerably beef up environment cleaning logicLennart Poettering
Now, actually check if the environment variable names and values used are valid, before accepting them. With this in place are at some places more rigid than POSIX, and less rigid at others. For example, this code allows lower-case environment variables (which POSIX suggests not to use), but it will not allow non-UTF8 variable values. All in all this should be a good middle ground of what to allow and what not to allow as environment variables. (This also splits out all environment related calls into env-util.[ch])
2013-01-18systemctl: add new "get-cgroup-attr" to query current cgroup attribute valueLennart Poettering
Also adds a pair of bus calls for this to the daemon.
2013-01-14core: add bus API and systemctl commands for altering cgroup parameters ↵Lennart Poettering
during runtime
2013-01-10dbus: duplicate Job.Cancel() as CancelJob() and Snapshot.Remove() as ↵Lennart Poettering
RemoveSnapshot() on the Manager interface For all other object mehtods there are already counterparts on the manager object, as they help us reduce round-trips. So let's complete this, and reduce complexity on the client side a bit. As a side effect this also makes "systemctl snapshot" without arguments work again.
2013-01-04build-sys: drop all distribution specfic checksLennart Poettering
Yay, we now have a completely generic systemd. No distribution specific checks anymore!
2012-11-15dbus-manager: modernize styleZbigniew Jędrzejewski-Szmek
2012-11-15dbus-manager: fix a fatal dbus abort in bus_manager_message_handler()Eelco Dolstra
If ListUnitFiles fails, or an OOM occurs, then dbus_message_unref() will be called twice on "reply", causing systemd to crash. So remove the call to dbus_message_unref(); it is unnecessary because of the cleanup attribute on "reply". [zj: modified to leave one dbus_message_unref() alone, per Colin Walters' comment.]
2012-10-30shared, core: do not always accept numbers in string lookupsMichal Schmidt
The behaviour of the common name##_from_string conversion is surprising. It accepts not only the strings from name##_table but also any number that falls within the range of the table. The order of items in most of our tables is an internal affair. It should not be visible to the user. I know of a case where the surprising numeric conversion leads to a crash. We will allow the direct numeric conversion only for the tables where the mapping of strings to numeric values has an external meaning. This holds for the following lookup tables: - netlink_family, ioprio_class, ip_tos, sched_policy - their numeric values are stable as they are defined by the Linux kernel interface. - log_level, log_facility_unshifted - the well-known syslog interface. We allow the user to use numeric values whose string names systemd does not know. For instance, the user may want to test a new kernel featuring a scheduling policy that did not exist when his systemd version was released. A slightly unpleasant effect of this is that the name##_to_string conversion cannot return pointers to constant strings anymore. The strings have to be allocated on demand and freed by the caller.
2012-10-08dbus-manager: check return of unit_dbus_pathLukas Nykryn
Reply of dbus_message_new_method_return was check twice and path from unit_dbus_path was not.
2012-10-04dbus: expose Virtualization ID on PID1's bus interfaceLennart Poettering
This allows unprivileged clients to check for the used virtualization even when lacking the privileges that some of the virtualization tests require. https://bugzilla.gnome.org/show_bug.cgi?id=684801
2012-10-02selinux: remove anything PID1-specific from selinux-access.[ch] so that we ↵Lennart Poettering
can reuse it in logind
2012-10-02selinux: rework selinux access check logicLennart Poettering
a) Instead of parsing the bus messages inside of selinux-access.c simply pass everything pre-parsed in the functions b) implement the access checking with a macro that resolves to nothing on non-selinux builds c) split out the selinux checks into their own sources selinux-util.[ch] d) this unifies the job creation code behind the D-Bus calls Manager.StartUnit() and Unit.Start().
2012-09-18core: move ManagerRunningAs to sharedZbigniew Jędrzejewski-Szmek
Note: I did s/MANAGER/SYSTEMD/ everywhere, even though it makes the patch quite verbose. Nevertheless, keeping MANAGER prefix in some places, and SYSTEMD prefix in others would just lead to confusion down the road. Better to rip off the band-aid now.
2012-09-18selinux: use existing library calls for audit dataLennart Poettering
2012-09-18selinux: add bus service access controlDaniel J Walsh
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 This patch adds the ability to look at the calling process that is trying to do dbus calls into systemd, then it checks with the SELinux policy to see if the calling process is allowed to do the activity. The basic idea is we want to allow NetworkManager_t to be able to start and stop ntpd.service, but not necessarly mysqld.service. Similarly we want to allow a root admin webadm_t that can only manage the apache environment. systemctl enable httpd.service, systemctl disable iptables.service bad. To make this code cleaner, we really need to refactor the dbus-manager.c code. This has just become a huge if-then-else blob, which makes doing the correct check difficult. -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.12 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://www.enigmail.net/ iEYEARECAAYFAlBJBi8ACgkQrlYvE4MpobOzTwCdEUikbvRWUCwOb83KlVF0Nuy5 lRAAnjZZNuc19Z+aNxm3k3nwD4p/JYco =yops -----END PGP SIGNATURE-----
2012-09-13manager: extend performance measurement interface to include firmware/loader ↵Lennart Poettering
times This only adds the fields to the D-Bus interfaces but doesn't fill them in with anything useful yet. Gummiboot exposes the necessary bits of information to use however and as soon as I get my fingers on a proper UEFI laptop I'll hook up the remaining bits. Since we want to stabilize the D-Bus interface soon and include it in the stability promise we should get the last fixes in, hence this change now.
2012-07-20core: drop KillMode parameter from KillUnit() bus callLennart Poettering
It made no sense, and since we are documenting the bus calls now and want to include them in our stability promise we really should get it cleaned up sooner, not later.
2012-07-16core: fix name of dbus call parameterLennart Poettering
2012-07-13util: rename join() to strjoin()Lennart Poettering
This is to match strappend() and the other string related functions.
2012-06-29remount-fs: also remount /usr according to fstabLennart Poettering
2012-06-26bus: drop HaveWatchdog optionLennart Poettering
Clients should always watch /dev/watchdog directly, instead of going indirect. Let's keep our stacks small.
2012-06-22dbus: don't expose SysVInitPath and SysVRcndPath on the busLennart Poettering
People should use systemd.pc if anything at all to determine these directories, and people should not assume that the bus fields are part of the supported API, so let's just drop this.
2012-06-22core: remove sysv_console optionLennart Poettering
This option never made much sense. It was originally intended to make sure that the usual startup output of sysv scripts goes to the terminal. However, since SysV scripts started from a terminal would not output to that terminal, but rather /dev/console this effect was more often than not actually taking place. Nowadays systemd has much nicer boot time status output than SysV which makes the sysv output redundant. Finally, all output of services goes to the journal anyway, and is not lost. Hence, let's drop this option, and simplify things a bit.
2012-06-19systemd: return error when asked to stop unknown unitMichal Sekletar
Command systemctl stop foo.service, will print error message, when foo.service is unknown to systemd, i.e. there is no unit file loaded for this service. https://bugzilla.redhat.com/show_bug.cgi?id=732874
2012-05-30dbus: better don't expose options we better shouldn't exposedLennart Poettering
NotifySocket= is hardly useful, people should use $NOTIFY_SOCKET if anything. RunningAs= suggests people had a choice of running user mode as PID 1 or vice versa, so remove this too.
2012-05-16switch-root: check for absolute pathsLennart Poettering
2012-05-14core: add extra safety check before switching rootLennart Poettering
2012-05-09dbus-manager: fix tainted stringMichal Schmidt
The pointer to the end of the string was not advanced after adding the "cgroups-missing" taint. If "local-hwclock" was detected too, it would overwrite the previous string. With 'e' always pointing to the end of the string, removing the last delimiter is easier.
2012-05-09manager: introduce SwitchRoot bus call for initrd/main transitionLennart Poettering
2012-05-08util: split-out hwclock.[ch]Kay Sievers
2012-05-03dbus: include unit name in JobNew/JobRemoved signalsLennart Poettering
This breaks D-Bus interface slightly, but since the D-Bus API isn't covered by the interface stability promise this should be OK.
2012-05-03hwclock: add taint flag for non-local hwclockLennart Poettering
2012-04-24manager: drop MountAuto= and SwapAuto= optionsLennart Poettering
The ability to set MountAuto=no and SwapAuto=no was useful during the adoption phase of systemd, so that distributions could stick to their classic mount scripts a bit longer. It is about time to get rid of it now.
2012-04-20dbus-job: allow multiple bus clientsMichal Schmidt
Merging of jobs can result in more than one client being interested in a job.
2012-04-13watchdog: make watchdog dbus properties writableLennart Poettering
2012-04-13dbus: expose whether we have a hardware watchdog on the busLennart Poettering
2012-04-12relicense to LGPLv2.1 (with exceptions)Lennart Poettering
We finally got the OK from all contributors with non-trivial commits to relicense systemd from GPL2+ to LGPL2.1+. Some udev bits continue to be GPL2+ for now, but we are looking into relicensing them too, to allow free copy/paste of all code within systemd. The bits that used to be MIT continue to be MIT. The big benefit of the relicensing is that closed source code may now link against libsystemd-login.so and friends.
2012-04-11move libsystemd_core.la sources into core/Kay Sievers