summaryrefslogtreecommitdiff
path: root/src/user.c
diff options
context:
space:
mode:
authorMatthias Clasen <mclasen@redhat.com>2010-03-25 15:10:55 -0400
committerMatthias Clasen <mclasen@redhat.com>2010-03-25 15:10:55 -0400
commit291bd7e78c6cd504ac36d2f9d29695cbda44a85a (patch)
treea2b1867bd306d4c2bed43dc1b9e3583beeeb0a9d /src/user.c
parent4b6d3cceb2119b5800fef0ab76b0cfdb50156151 (diff)
Always require admin privs for changing usernames
Even when changing your own username.
Diffstat (limited to 'src/user.c')
-rw-r--r--src/user.c8
1 files changed, 1 insertions, 7 deletions
diff --git a/src/user.c b/src/user.c
index a1dff91..1a30fcb 100644
--- a/src/user.c
+++ b/src/user.c
@@ -893,7 +893,6 @@ user_set_user_name (User *user,
DBusConnection *connection;
DBusError dbus_error;
uid_t uid;
- const gchar *action_id;
connection = dbus_g_connection_get_connection (user->system_bus_connection);
sender = dbus_g_method_get_sender (context);
@@ -906,14 +905,9 @@ user_set_user_name (User *user,
return TRUE;
}
- if (user->uid == uid)
- action_id = "org.freedesktop.accounts.change-own-user-data";
- else
- action_id = "org.freedesktop.accounts.user-administration";
-
daemon_local_check_auth (user->daemon,
user,
- action_id,
+ "org.freedesktop.accounts.user-administration",
TRUE,
user_change_user_name_authorized_cb,
context,