diff options
author | Matthias Clasen <mclasen@redhat.com> | 2010-01-12 14:44:53 -0500 |
---|---|---|
committer | Matthias Clasen <mclasen@redhat.com> | 2010-01-12 14:44:53 -0500 |
commit | c5339c5779a67330afbb9406135a7148922478ae (patch) | |
tree | d8d82e43901f52f7560e4c95221d69309682aad1 /data |
initial commit
Diffstat (limited to 'data')
-rw-r--r-- | data/Makefile.am | 27 | ||||
-rw-r--r-- | data/org.freedesktop.Accounts.User.xml | 95 | ||||
-rw-r--r-- | data/org.freedesktop.Accounts.conf | 24 | ||||
-rw-r--r-- | data/org.freedesktop.Accounts.service.in | 5 | ||||
-rw-r--r-- | data/org.freedesktop.Accounts.xml | 115 | ||||
-rw-r--r-- | data/org.freedesktop.accounts.policy.in | 70 |
6 files changed, 336 insertions, 0 deletions
diff --git a/data/Makefile.am b/data/Makefile.am new file mode 100644 index 0000000..c520642 --- /dev/null +++ b/data/Makefile.am @@ -0,0 +1,27 @@ + +dbusifdir = $(dateadir)/dbus-1/interfaces +dbusif_DATA = \ + org.freedesktop.Accounts.xml \ + org.freedesktop.Accounts.User.xml + +dbusconfdir = $(sysconfdir)/dbus-1/system.d +dbusconf_DATA = org.freedesktop.Accounts.conf + +servicedir = $(datadir)/dbus-1/system-services +service_in_files = org.freedesktop.Accounts.service.in +service_DATA = $(service_in_files:.service.in=.service) + +$(service_DATA): $(service_in_files) Makefile + @sed -e "s|\@libexecdir\@|$(libexecdir)|" $< >$@ + +policydir = $(datadir)/polkit-1/actions +policy_in_files = org.freedesktop.accounts.policy.in +policy_DATA = $(policy_in_files:.policy.in=.policy) + +@INTLTOOL_POLICY_RULE@ + +EXTRA_DIST = \ + $(dbusif_DATA) \ + $(dbusconf_DATA) \ + $(service_in_files) \ + $(policy_in_files) diff --git a/data/org.freedesktop.Accounts.User.xml b/data/org.freedesktop.Accounts.User.xml new file mode 100644 index 0000000..e12422a --- /dev/null +++ b/data/org.freedesktop.Accounts.User.xml @@ -0,0 +1,95 @@ +<!DOCTYPE node PUBLIC +"-//freedesktop//DTD D-BUS Object Introspection 1.0//EN" +"http://www.freedesktop.org/standards/dbus/1.0/introspect.dtd" > +<node name="/" xmlns:doc="http://www.freedesktop.org/dbus/1.0/doc.dtd"> + <interface name="org.freedesktop.Accounts.User"> + + <method name="SetUserName"> + <annotation name="org.freedesktop.DBus.GLib.Async" value=""/> + <arg name="name" direction="in" type="s"/> + </method> + + <method name="SetRealName"> + <annotation name="org.freedesktop.DBus.GLib.Async" value=""/> + <arg name="name" direction="in" type="s"/> + </method> + + <method name="SetEmail"> + <annotation name="org.freedesktop.DBus.GLib.Async" value=""/> + <arg name="email" direction="in" type="s"/> + </method> + + <method name="SetLanguage"> + <annotation name="org.freedesktop.DBus.GLib.Async" value=""/> + <arg name="language" direction="in" type="s"/> + </method> + + <method name="SetLocation"> + <annotation name="org.freedesktop.DBus.GLib.Async" value=""/> + <arg name="location" direction="in" type="s"/> + </method> + + <method name="SetHomeDirectory"> + <annotation name="org.freedesktop.DBus.GLib.Async" value=""/> + <arg name="homedir" direction="in" type="s"/> + </method> + + <method name="SetShell"> + <annotation name="org.freedesktop.DBus.GLib.Async" value=""/> + <arg name="shell" direction="in" type="s"/> + </method> + + <method name="SetIconFile"> + <annotation name="org.freedesktop.DBus.GLib.Async" value=""/> + <arg name="filename" direction="in" type="s"/> + </method> + + <method name="SetIconData"> + <annotation name="org.freedesktop.DBus.GLib.Async" value=""/> + <arg name="width" direction="in" type="i"/> + <arg name="height" direction="in" type="i"/> + <arg name="channels" direction="in" type="i"/> + <arg name="rowstride" direction="in" type="i"/> + <arg name="data" direction="in" type="ay"/> + </method> + + <method name="SetLocked"> + <annotation name="org.freedesktop.DBus.GLib.Async" value=""/> + <arg name="locked" direction="in" type="b"/> + </method> + + <method name="SetAccountType"> + <annotation name="org.freedesktop.DBus.GLib.Async" value=""/> + <arg name="accountType" direction="in" type="i"/> + </method> + + <method name="SetPasswordMode"> + <annotation name="org.freedesktop.DBus.GLib.Async" value=""/> + <arg name="mode" direction="in" type="i"/> + </method> + + <method name="SetPassword"> + <annotation name="org.freedesktop.DBus.GLib.Async" value=""/> + <arg name="password" direction="in" type="s"/> + <arg name="hint" direction="in" type="s"/> + </method> + + <property name="Uid" type="t" access="read"/> + <property name="UserName" type="s" access="read"/> + <property name="RealName" type="s" access="read"/> + <property name="AccountType" type="i" access="read"/> + <property name="HomeDirectory" type="s" access="read"/> + <property name="Shell" type="s" access="read"/> + <property name="Email" type="s" access="read"/> + <property name="Language" type="s" access="read"/> + <property name="Location" type="s" access="read"/> + <property name="LoginFrequency" type="t" access="read"/> + <property name="IconFile" type="s" access="read"/> + <property name="Locked" type="b" access="read"/> + <property name="PasswordMode" type="i" access="read"/> + <property name="PasswordHint" type="s" access="read"/> + + <signal name="Changed"/> + + </interface> +</node> diff --git a/data/org.freedesktop.Accounts.conf b/data/org.freedesktop.Accounts.conf new file mode 100644 index 0000000..95fc616 --- /dev/null +++ b/data/org.freedesktop.Accounts.conf @@ -0,0 +1,24 @@ +<?xml version="1.0" encoding="UTF-8"?> + +<!DOCTYPE busconfig PUBLIC + "-//freedesktop//DTD D-BUS Bus Configuration 1.0//EN" + "http://www.freedesktop.org/standards/dbus/1.0/busconfig.dtd"> +<busconfig> + <!-- Only root can own the service --> + <policy user="root"> + <allow own="org.freedesktop.Accounts"/> + </policy> + + <policy context="default"> + <allow send_destination="org.freedesktop.Accounts"/> + <allow send_destination="org.freedesktop.Accounts" + send_interface="org.freedesktop.DBus.Properties"/> + <allow send_destination="org.freedesktop.Accounts" + send_interface="org.freedesktop.DBus.Introspectable"/> + <allow send_destination="org.freedesktop.Accounts.User" + send_interface="org.freedesktop.DBus.Properties"/> + <allow send_destination="org.freedesktop.Accounts.User" + send_interface="org.freedesktop.DBus.Introspectable"/> + </policy> + +</busconfig> diff --git a/data/org.freedesktop.Accounts.service.in b/data/org.freedesktop.Accounts.service.in new file mode 100644 index 0000000..af2a380 --- /dev/null +++ b/data/org.freedesktop.Accounts.service.in @@ -0,0 +1,5 @@ +[D-BUS Service] +Name=org.freedesktop.Accounts +Exec=@libexecdir@/accounts-daemon +User=root + diff --git a/data/org.freedesktop.Accounts.xml b/data/org.freedesktop.Accounts.xml new file mode 100644 index 0000000..e7d6378 --- /dev/null +++ b/data/org.freedesktop.Accounts.xml @@ -0,0 +1,115 @@ +<!DOCTYPE node PUBLIC +"-//freedesktop//DTD D-BUS Object Introspection 1.0//EN" +"http://www.freedesktop.org/standards/dbus/1.0/introspect.dtd" > +<node name="/" xmlns:doc="http://www.freedesktop.org/dbus/1.0/doc.dtd"> + <interface name="org.freedesktop.Accounts"> + + <!-- ************************************************************ --> + + <method name="ListCachedUsers"> + <annotation name="org.freedesktop.DBus.GLib.Async" value=""/> + <arg name="users" direction="out" type="ao"> + <doc:doc><doc:summary>Object paths of cached users</doc:summary></doc:doc> + </arg> + + <doc:doc> + <doc:description> + <doc:para> + List users which have logged into the system locally before. + </doc:para> + </doc:description> + </doc:doc> + </method> + + <method name="FindUserById"> + <annotation name="org.freedesktop.DBus.GLib.Async" value=""/> + <arg name="id" direction="in" type="x"> + <doc:doc><doc:summary>The uid to look up</doc:summary></doc:doc> + </arg> + <arg name="user" direction="out" type="o"> + <doc:doc><doc:summary>Object path of user</doc:summary></doc:doc> + </arg> + + <doc:doc> + <doc:description> + <doc:para> + Find a user by uid. + </doc:para> + </doc:description> + </doc:doc> + </method> + + <method name="FindUserByName"> + <annotation name="org.freedesktop.DBus.GLib.Async" value=""/> + <arg name="name" direction="in" type="s"> + <doc:doc><doc:summary>The username to look up</doc:summary></doc:doc> + </arg> + <arg name="user" direction="out" type="o"> + <doc:doc><doc:summary>Object path of user</doc:summary></doc:doc> + </arg> + + <doc:doc> + <doc:description> + <doc:para> + Find a user by its username. + </doc:para> + </doc:description> + </doc:doc> + </method> + + <method name="CreateUser"> + <annotation name="org.freedesktop.DBus.GLib.Async" value=""/> + <arg name="name" direction="in" type="s"> + <doc:doc><doc:summary>The username to use</doc:summary></doc:doc> + </arg> + <annotation name="org.freedesktop.DBus.GLib.Async" value=""/> + <arg name="fullname" direction="in" type="s"> + <doc:doc><doc:summary>The real name to use</doc:summary></doc:doc> + </arg> + <arg name="user" direction="out" type="o"> + <doc:doc><doc:summary>Object path of the new user</doc:summary></doc:doc> + </arg> + + <doc:doc> + <doc:description> + <doc:para> + Create a new user account. + </doc:para> + </doc:description> + </doc:doc> + </method> + + <method name="DeleteUser"> + <annotation name="org.freedesktop.DBus.GLib.Async" value=""/> + <arg name="id" direction="in" type="x"> + <doc:doc><doc:summary>The uid to delete</doc:summary></doc:doc> + </arg> + <arg name="removeFiles" direction="in" type="b"> + <doc:doc><doc:summary>Whether to remove the users files</doc:summary></doc:doc> + </arg> + + <doc:doc> + <doc:description> + <doc:para> + Delete a user account. + </doc:para> + </doc:description> + </doc:doc> + </method> + + <signal name="UserAdded"> + <arg name="user" type="o"/> + </signal> + + <signal name="UserDeleted"> + <arg name="user" type="o"/> + </signal> + + <signal name="UserChanged"> + <arg name="user" type="o"/> + </signal> + + <property name="DaemonVersion" type="s" access="read"/> + + </interface> +</node> diff --git a/data/org.freedesktop.accounts.policy.in b/data/org.freedesktop.accounts.policy.in new file mode 100644 index 0000000..0cb6060 --- /dev/null +++ b/data/org.freedesktop.accounts.policy.in @@ -0,0 +1,70 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE policyconfig PUBLIC + "-//freedesktop//DTD PolicyKit Policy Configuration 1.0//EN" + "http://www.freedesktop.org/standards/PolicyKit/1.0/policyconfig.dtd"> +<policyconfig> + <vendor/> + <vendor_url/> + <icon_name>stock_person</icon_name> + + <action id="org.freedesktop.accounts.change-own-user-data"> + <_description>Change your own user data</_description> + <_message>Authentication is required to change user data</_message> + <defaults> + <allow_any>no</allow_any> + <allow_inactive>no</allow_inactive> + <allow_active>yes</allow_active> + </defaults> + </action> + + <action id="org.freedesktop.accounts.change-user-data"> + <_description>Change user data</_description> + <_message>Authentication is required to change user data</_message> + <defaults> + <allow_any>no</allow_any> + <allow_inactive>no</allow_inactive> + <allow_active>auth_admin_keep</allow_active> + </defaults> + </action> + + <action id="org.freedesktop.accounts.create-user"> + <_description>Create a user account</_description> + <_message>Authentication is required to create a user account</_message> + <defaults> + <allow_any>no</allow_any> + <allow_inactive>no</allow_inactive> + <allow_active>auth_admin_keep</allow_active> + </defaults> + </action> + + <action id="org.freedesktop.accounts.delete-user"> + <_description>Delete a user account</_description> + <_message>Authentication is required to delete a user account</_message> + <defaults> + <allow_any>no</allow_any> + <allow_inactive>no</allow_inactive> + <allow_active>auth_admin_keep</allow_active> + </defaults> + </action> + + <action id="org.freedesktop.accounts.lock-user"> + <_description>Lock a user account</_description> + <_message>Authentication is required to lock a user account</_message> + <defaults> + <allow_any>no</allow_any> + <allow_inactive>no</allow_inactive> + <allow_active>auth_admin_keep</allow_active> + </defaults> + </action> + + <action id="org.freedesktop.accounts.change-account-type"> + <_description>Change a users account type</_description> + <_message>Authentication is required to change an account type</_message> + <defaults> + <allow_any>no</allow_any> + <allow_inactive>no</allow_inactive> + <allow_active>auth_admin_keep</allow_active> + </defaults> + </action> + +</policyconfig> |