aboutsummaryrefslogtreecommitdiffstats
path: root/USER
diff options
context:
space:
mode:
authorFrédéric Buclin <LpSolit@netscape.net>2017-03-11 17:16:08 +0100
committerFrédéric Buclin <LpSolit@gmail.com>2017-03-13 16:51:07 +0100
commit53b16d4a8286033edd1a9532a88a5bb2ef35b8ae (patch)
tree9d695732411ad1b209da9a418643bb4c1b8e6e4f /USER
parent31585b2a413e0d4e385bcc1209609f708377ad06 (diff)
downloaduserdrake-53b16d4a8286033edd1a9532a88a5bb2ef35b8ae.tar
userdrake-53b16d4a8286033edd1a9532a88a5bb2ef35b8ae.tar.gz
userdrake-53b16d4a8286033edd1a9532a88a5bb2ef35b8ae.tar.bz2
userdrake-53b16d4a8286033edd1a9532a88a5bb2ef35b8ae.tar.xz
userdrake-53b16d4a8286033edd1a9532a88a5bb2ef35b8ae.zip
Correctly set permissions on the home directory when creating a new user (mga#618)
Diffstat (limited to 'USER')
-rw-r--r--USER/USER.xs5
1 files changed, 3 insertions, 2 deletions
diff --git a/USER/USER.xs b/USER/USER.xs
index 086580b..ff9fc41 100644
--- a/USER/USER.xs
+++ b/USER/USER.xs
@@ -67,11 +67,12 @@ Admin_DESTROY(self)
if (self) lu_end(self);
int
-Admin_UserAdd(self, ent, is_system, dont_create_home)
+Admin_UserAdd(self, ent, is_system, dont_create_home, homePermissions)
USER::ADMIN *self
USER::ENT *ent
int is_system
int dont_create_home
+ short homePermissions
CODE:
USER__ERR *error = NULL;
long uidNumber, gidNumber;
@@ -114,7 +115,7 @@ Admin_UserAdd(self, ent, is_system, dont_create_home)
homeDirectory = g_value_get_string(value);
if (lu_homedir_populate(self, skeleton, homeDirectory,
- uidNumber, gidNumber, 0700,
+ uidNumber, gidNumber, homePermissions,
&error) == 0) {
warn(_("Error creating `%s': %s"), homeDirectory, error ? error->string : "unknown error");
RETVAL = 2;