# Process this file with autoconf to produce a configure script.
AC_PREREQ([2.60])
-AC_INIT([gumd], [1.0.5],[],[],[https://github.com/01org/gumd])
+AC_INIT([gumd], [1.0.7],[],[],[https://github.com/01org/gumd])
AC_CONFIG_SRCDIR([src/daemon/main.c])
AC_CONFIG_HEADERS([config.h])
AC_CONFIG_AUX_DIR([build-aux])
# Comma separate listed of groups, which every user (other than system user)
# will be added to at the time of user account creation. Default value is:
# ''
-#DEFAULT_USR_GROUPS=
+DEFAULT_USR_GROUPS=audio,video,display
# Comma separate listed of groups, which admin user will be added to at the
# time of user account creation. Default value is: ''
SMACK64_NEW_FILES=_
# Value used to set the smack label for User files and folders.
-SMACK64_USER_FILES=User
+SMACK64_USER_FILES=User::Home
#
# D-Bus related settings.
SMACK64_NEW_FILES=_
# Value used to set the smack label for User files and folders.
-SMACK64_USER_FILES=User
+SMACK64_USER_FILES=User::Home
#
# D-Bus related settings.
+gumd (1.0.7-0) unstable; urgency=low
+
+ * Fixed copying of extended attributes from skel folder
+
+ -- Imran Zaman <imran.zaman@intel.com> Mon, 09 Feb 2015 18:00:00 +0300
+
+gumd (1.0.6-0) unstable; urgency=low
+
+ * Fixed gum-utils documentation
+
+ -- Imran Zaman <imran.zaman@intel.com> Thu, 05 Feb 2015 18:00:00 +0300
+
gumd (1.0.5-0) unstable; urgency=low
* Added APIs for fetching users based on the type
Name: gumd
Summary: User management daemon and client library
-Version: 1.0.5
+Version: 1.0.7
Release: 0
Group: System/Daemons
License: LGPL-2.1+
%changelog
+* Mon Feb 09 2015 Imran Zaman <imran.zaman@intel.com>
+- Fixed copying of extended attributes from skel folder
+
+* Thu Feb 05 2015 Imran Zaman <imran.zaman@intel.com>
+- Fixed gum-utils documentation
+
* Wed Jan 28 2015 Imran Zaman <imran.zaman@intel.com>
- Added APIs for fetching users based on the type
+* Mon Feb 09 2015 Imran Zaman <imran.zaman@intel.com>
+- Fixed copying of extended attributes from skel folder
+
+* Thu Feb 05 2015 Imran Zaman <imran.zaman@intel.com>
+- Fixed gum-utils documentation
+
* Wed Jan 28 2015 Imran Zaman <imran.zaman@intel.com>
- Added APIs for fetching users based on the type
Name: gumd
Summary: User management daemon and client library
-Version: 1.0.5
+Version: 1.0.7
Release: 0
Group: Security/Accounts
License: LGPL-2.1+
BuildRequires: pkgconfig(gio-2.0)
BuildRequires: pkgconfig(gio-unix-2.0)
BuildRequires: pkgconfig(gmodule-2.0)
-
+Requires: tizen-platform-config
%description
%{summary} files
mandatory-args are:
--username=<username> OR --nickname=<nickname>
--usertype=<usertype>
- possible usertypes are: system(1), admin(2), guest(3), normal(4).
+ possible usertype can be system or admin or guest or normal.
optional-args are:
--usecret=<secret>
--realname=<realname>
mandatory-args are:
--groupname=<groupname>
--grouptype=<grouptype>
- possible grouptypes are: system(1), user(2).
+ possible grouptypes are: system or user.
optional-args are:
--gsecret=<secret>
</computeroutput>
*/
if (smack_label &&
len > 0 &&
- setxattr (path, XATTR_NAME_SMACK, smack_label, len, 0) != 0) {
+ lsetxattr (path, XATTR_NAME_SMACK, smack_label, len, 0) != 0) {
g_object_unref (config);
return FALSE;
}
names[attrs_size] = '\0';
ssize_t size = 0;
- while (name != end_names) {
- if (name)
- name = strchr (name,'\0')+1;
- if (name && name[0] != '\0') {
+ while (name && name != end_names) {
+ if (name[0] != '\0') {
size = lgetxattr (from_path, name, NULL, 0);
if(size > 0 &&
(value = g_realloc (value, size)) &&
}
}
}
+ name = strchr (name,'\0') + 1;
}
g_free (value);
}
goto _fail;
}
- if (!_copy_file_attributes (source_file_path, dup_file_path)) {
+ if (!_set_smack64_attr (dup_file_path,
+ GUM_CONFIG_GENERAL_SMACK64_NEW_FILES)) {
GUM_SET_ERROR (GUM_ERROR_FILE_ATTRIBUTE,
- "Unable to get/set file attributes", error, retval, FALSE);
+ "Unable to set smack file attributes", error, retval, FALSE);
goto _fail;
}
- if (!_set_smack64_attr (dup_file_path,
- GUM_CONFIG_GENERAL_SMACK64_NEW_FILES)) {
+ if (!_copy_file_attributes (source_file_path, dup_file_path)) {
GUM_SET_ERROR (GUM_ERROR_FILE_ATTRIBUTE,
- "Unable to set smack file attributes", error, retval, FALSE);
+ "Unable to get/set file attributes", error, retval, FALSE);
goto _fail;
}
stop = !_set_smack64_attr (dest_filepath,
GUM_CONFIG_GENERAL_SMACK64_USER_FILES);
}
+ if (!stop) stop = !_copy_file_attributes (src_filepath, dest_filepath);
if (!stop) stop = (chown (dest_filepath, uid, gid) < 0);
_free_data:
}
if (g_access (home_dir, F_OK) != 0) {
- GumConfig *config = NULL;
+ GumConfig *config = gum_config_new (NULL);
+ const gchar *skel_dir = NULL;
+
+ skel_dir = gum_config_get_string (config, GUM_CONFIG_GENERAL_SKEL_DIR);
+ g_object_unref (config);
if (!g_file_test (home_dir, G_FILE_TEST_EXISTS)) {
g_mkdir_with_parents (home_dir, mode);
"Unable to set smack64 home dir attr", error, FALSE);
}
+ if (!_copy_file_attributes (skel_dir, home_dir)) {
+ GUM_RETURN_WITH_ERROR (GUM_ERROR_FILE_ATTRIBUTE,
+ "Unable to get/set dir attributes", error, FALSE);
+ }
+
/* when run in test mode, user may not exist */
#ifdef ENABLE_TESTS
uid = getuid ();
"Home directory chown failure", error, FALSE);
}
- config = gum_config_new (NULL);
- retval = _copy_dir_recursively (gum_config_get_string (config,
- GUM_CONFIG_GENERAL_SKEL_DIR), home_dir, uid, gid, umask, error);
- g_object_unref (config);
-
+ retval = _copy_dir_recursively (skel_dir, home_dir, uid, gid, umask,
+ error);
}
return retval;
{ "sysroot", 'q', 0, G_OPTION_ARG_STRING, &sysroot, "sysroot path "
"[Offline mode ONLY]", "sysroot"},
{ "user-list", 'r', 0, G_OPTION_ARG_NONE, &is_user_list_op,
- "if user_types argument is specified, then the calls will "
+ "if usertypes argument is specified, then the calls will "
"return the specified users only otherwise all the users will "
"be returned", NULL},
{ NULL }
GOptionEntry user_serv_entries[] =
{
- { "user_types", 0, 0, G_OPTION_ARG_STRING, &user_types,
- "valid user_type can be system or admin or guest or normal."
+ { "usertypes", 0, 0, G_OPTION_ARG_STRING, &user_types,
+ "valid usertypes can be system or admin or guest or normal."
"Multiple user types can be specified as comma separated "
"values e.g. normal,system",
"type"},
{
{ "username", 0, 0, G_OPTION_ARG_STRING, &user->user_name,
"user name", "name"},
- { "user_type", 0, 0, G_OPTION_ARG_STRING, &user->user_type,
+ { "usertype", 0, 0, G_OPTION_ARG_STRING, &user->user_type,
"valid user_type can be system or admin or guest or normal.",
"type"},
{ "uid", 0, 0, G_OPTION_ARG_INT, &user->uid, "user id", "uid"},
{
{ "groupname", 0, 0, G_OPTION_ARG_STRING, &group->group_name,
"group name", "name"},
- { "group_type", 0, 0, G_OPTION_ARG_STRING, &group->group_type,
+ { "grouptype", 0, 0, G_OPTION_ARG_STRING, &group->group_type,
"valid group type can be system or user", "type"},
{ "gid", 0, 0, G_OPTION_ARG_INT, &group->gid, "group id", "gid"},
{ "gsecret", 0, 0, G_OPTION_ARG_STRING, &group->group_secret,
context = g_option_context_new ("\n"
" To add user in non-offline mode, gum-utils -a --username=user1 "
- " --user_type=normal\n"
+ " --usertype=normal\n"
" To delete user in offline mode, gum-utils -o -d --uid=2001\n"
" NOTE: Only one command can be run at one time.");
g_option_context_add_main_entries (context, main_entries, NULL);