+/**
+ * Frees the members of info
+ * (but not info itself)
+ * @param info the user info struct
+ */
+void
+_dbus_user_info_free (DBusUserInfo *info)
+{
+ dbus_free (info->group_ids);
+ dbus_free (info->username);
+ dbus_free (info->homedir);
+}
+
+/**
+ * Frees the members of info (but not info itself).
+ *
+ * @param info the group info
+ */
+void
+_dbus_group_info_free (DBusGroupInfo *info)
+{
+ dbus_free (info->groupname);
+}
+
+/**
+ * Checks if a given string is actually a number
+ * and converts it if it is
+ *
+ * @param str the string to check
+ * @param num the memory location of the unsigned long to fill in
+ * @returns TRUE if str is a number and num is filled in
+ */
+dbus_bool_t
+_dbus_is_a_number (const DBusString *str,
+ unsigned long *num)
+{
+ int end;
+
+ if (_dbus_string_parse_uint (str, 0, num, &end) &&
+ end == _dbus_string_get_length (str))
+ return TRUE;
+ else
+ return FALSE;
+}
+
+/**
+ * Looks up a uid or username in the user database. Only one of name
+ * or UID can be provided. There are wrapper functions for this that
+ * are better to use, this one does no locking or anything on the
+ * database and otherwise sort of sucks.
+ *
+ * @param db the database
+ * @param uid the user ID or #DBUS_UID_UNSET
+ * @param username username or #NULL
+ * @param error error to fill in
+ * @returns the entry in the database
+ */
+DBusUserInfo*