[liboobs] Actually commit minimum and maximum UIDs/GIDs in UsersConfig and GroupsConfig
- From: Milan Bouchet-Valat <milanbv src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [liboobs] Actually commit minimum and maximum UIDs/GIDs in UsersConfig and GroupsConfig
- Date: Mon, 15 Mar 2010 16:03:50 +0000 (UTC)
commit 94bbceb339763d06fd5a61a0d609c97cab7c6b80
Author: Milan Bouchet-Valat <nalimilan club fr>
Date: Mon Mar 15 17:01:49 2010 +0100
Actually commit minimum and maximum UIDs/GIDs in UsersConfig and GroupsConfig
When committing GroupsConfig, minimum and maximum GIDs were not added to the DBusMessage. Also ensure we convert the values to a guint32 before passing the reference to dbus_message_append_args() - see previous commit.
oobs/oobs-groupsconfig.c | 6 ++++++
oobs/oobs-usersconfig.c | 10 +++++++---
2 files changed, 13 insertions(+), 3 deletions(-)
---
diff --git a/oobs/oobs-groupsconfig.c b/oobs/oobs-groupsconfig.c
index 48c0dc2..79702d2 100644
--- a/oobs/oobs-groupsconfig.c
+++ b/oobs/oobs-groupsconfig.c
@@ -231,6 +231,7 @@ oobs_groups_config_commit (OobsObject *object)
OobsListIter list_iter;
GObject *group;
gboolean valid;
+ guint32 minimum_gid, maximum_gid;
priv = OOBS_GROUPS_CONFIG (object)->_priv;
message = _oobs_object_get_dbus_message (object);
@@ -259,6 +260,11 @@ oobs_groups_config_commit (OobsObject *object)
}
dbus_message_iter_close_container (&iter, &array_iter);
+
+ minimum_gid = priv->minimum_gid;
+ maximum_gid = priv->maximum_gid;
+ utils_append_uint (&iter, minimum_gid);
+ utils_append_uint (&iter, maximum_gid);
}
/**
diff --git a/oobs/oobs-usersconfig.c b/oobs/oobs-usersconfig.c
index 03dbbf4..939945a 100644
--- a/oobs/oobs-usersconfig.c
+++ b/oobs/oobs-usersconfig.c
@@ -390,7 +390,7 @@ oobs_users_config_commit (OobsObject *object)
OobsUsersConfigPrivate *priv;
DBusMessage *message;
DBusMessageIter iter;
- guint32 default_gid;
+ guint32 default_gid, minimum_uid, maximum_uid;
priv = OOBS_USERS_CONFIG (object)->_priv;
message = _oobs_object_get_dbus_message (object);
@@ -398,8 +398,12 @@ oobs_users_config_commit (OobsObject *object)
dbus_message_iter_init_append (message, &iter);
utils_create_dbus_array_from_string_list (priv->shells, message, &iter);
- utils_append_uint (&iter, priv->minimum_uid);
- utils_append_uint (&iter, priv->maximum_uid);
+
+ minimum_uid = priv->minimum_uid;
+ maximum_uid = priv->maximum_uid;
+ utils_append_uint (&iter, minimum_uid);
+ utils_append_uint (&iter, maximum_uid);
+
utils_append_string (&iter, priv->default_home);
utils_append_string (&iter, priv->default_shell);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]