summaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
authorThorsten Kukuk <kukuk@thkukuk.de>2010-10-20 11:58:17 +0000
committerThorsten Kukuk <kukuk@thkukuk.de>2010-10-20 11:58:17 +0000
commit387a75f6fe16bd8067dc55aa65fb1ab911b78bd3 (patch)
tree8c1a56eede50df812071b88c6320c473c8aa31c1 /modules
parentfb1f2d3b6a1594180190413e15b589b117acb5a1 (diff)
Relevant BUGIDs:
Purpose of commit: bugfix Commit summary: --------------- 2010-10-20 Thorsten Kukuk <kukuk@thkukuk.de> * modules/pam_mkhomedir/mkhomedir_helper.c (rec_mkdir): Create parent directories always with mode 0755. (create_homedir): Create main directory with mode 0700 at first.
Diffstat (limited to 'modules')
-rw-r--r--modules/pam_mkhomedir/mkhomedir_helper.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/modules/pam_mkhomedir/mkhomedir_helper.c b/modules/pam_mkhomedir/mkhomedir_helper.c
index 550a1354..0ed41d66 100644
--- a/modules/pam_mkhomedir/mkhomedir_helper.c
+++ b/modules/pam_mkhomedir/mkhomedir_helper.c
@@ -46,7 +46,7 @@ rec_mkdir(const char *dir, mode_t mode)
*cp++ = '\0';
if (stat(parent, &st) == -1 && errno == ENOENT)
- if (rec_mkdir(parent, mode) != 0)
+ if (rec_mkdir(parent, 0755) != 0)
{
free(parent);
return 1;
@@ -72,7 +72,7 @@ create_homedir(const struct passwd *pwd,
int retval = PAM_SESSION_ERR;
/* Create the new directory */
- if (rec_mkdir(dest, 0755) != 0)
+ if (rec_mkdir(dest, 0700) != 0)
{
pam_syslog(NULL, LOG_ERR, "unable to create directory %s: %m", dest);
return PAM_PERM_DENIED;
@@ -419,4 +419,3 @@ main(int argc, char *argv[])
return create_homedir(pwd, skeldir, pwd->pw_dir);
}
-