~ubuntu-branches/debian/jessie/systemd/jessie

« back to all changes in this revision

Viewing changes to src/dbus-automount.c

  • Committer: Package Import Robot
  • Author(s): Tollef Fog Heen, Tollef Fog Heen, Michael Biebl
  • Date: 2012-04-03 19:59:17 UTC
  • mfrom: (1.1.10) (6.1.3 experimental)
  • Revision ID: package-import@ubuntu.com-20120403195917-l532urrbg4pkreas
Tags: 44-1
[ Tollef Fog Heen ]
* New upstream version.
  - Backport 3492207: journal: PAGE_SIZE is not known on ppc and other
    archs
  - Backport 5a2a2a1: journal: react with immediate rotation to a couple
    of more errors
  - Backport 693ce21: util: never follow symlinks in rm_rf_children()
    Fixes CVE-2012-1174, closes: #664364
* Drop output message from init-functions hook, it's pointless.
* Only rmdir /lib/init/rw if it exists.
* Explicitly order debian-fixup before sysinit.target to prevent a
  possible race condition with the creation of sockets.  Thanks to
  Michael Biebl for debugging this.
* Always restart the initctl socket on upgrades, to mask sysvinit
  removing it.

[ Michael Biebl ]
* Remove workaround for non-interactive sessions from pam config again.
* Create compat /dev/initctl symlink in case we are upgrading from a system
  running a newer version of sysvinit (using /run/initctl) and sysvinit is
  replaced with systemd-sysv during the upgrade. Closes: #663219
* Install new man pages.
* Build-Depend on valac (>= 0.12) instead of valac-0.12. Closes: #663323

Show diffs side-by-side

added added

removed removed

Lines of Context:
19
19
  along with systemd; If not, see <http://www.gnu.org/licenses/>.
20
20
***/
21
21
 
 
22
#include <errno.h>
 
23
 
22
24
#include "dbus-unit.h"
23
25
#include "dbus-automount.h"
24
26
#include "dbus-common.h"
27
29
        " <interface name=\"org.freedesktop.systemd1.Automount\">\n" \
28
30
        "  <property name=\"Where\" type=\"s\" access=\"read\"/>\n"  \
29
31
        "  <property name=\"DirectoryMode\" type=\"u\" access=\"read\"/>\n" \
 
32
        "  <property name=\"Result\" type=\"s\" access=\"read\"/>\n"    \
30
33
        " </interface>\n"
31
34
 
32
35
#define INTROSPECTION                                                \
45
48
 
46
49
const char bus_automount_interface[] _introspect_("Automount") = BUS_AUTOMOUNT_INTERFACE;
47
50
 
 
51
const char bus_automount_invalidating_properties[] =
 
52
        "Result\0";
 
53
 
 
54
static DEFINE_BUS_PROPERTY_APPEND_ENUM(bus_automount_append_automount_result, automount_result, AutomountResult);
 
55
 
 
56
static const BusProperty bus_automount_properties[] = {
 
57
        { "Where",         bus_property_append_string, "s", offsetof(Automount, where),    true },
 
58
        { "DirectoryMode", bus_property_append_mode,   "u", offsetof(Automount, directory_mode) },
 
59
        { "Result",        bus_automount_append_automount_result, "s", offsetof(Automount, result) },
 
60
        { NULL, }
 
61
};
 
62
 
48
63
DBusHandlerResult bus_automount_message_handler(Unit *u, DBusConnection *c, DBusMessage *message) {
49
 
        const BusProperty properties[] = {
50
 
                BUS_UNIT_PROPERTIES,
51
 
                { "org.freedesktop.systemd1.Automount", "Where", bus_property_append_string,       "s", u->automount.where           },
52
 
                { "org.freedesktop.systemd1.Automount", "DirectoryMode", bus_property_append_mode, "u", &u->automount.directory_mode },
53
 
                { NULL, NULL, NULL, NULL, NULL }
 
64
        Automount *am = AUTOMOUNT(u);
 
65
        const BusBoundProperties bps[] = {
 
66
                { "org.freedesktop.systemd1.Unit",      bus_unit_properties,      u  },
 
67
                { "org.freedesktop.systemd1.Automount", bus_automount_properties, am },
 
68
                { NULL, }
54
69
        };
55
70
 
56
 
        return bus_default_message_handler(c, message, INTROSPECTION, INTERFACES_LIST, properties);
 
71
        return bus_default_message_handler(c, message, INTROSPECTION, INTERFACES_LIST, bps);
57
72
}