summaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
Diffstat (limited to 'modules')
-rw-r--r--modules/pam_mkhomedir/mkhomedir_helper.c16
1 files changed, 1 insertions, 15 deletions
diff --git a/modules/pam_mkhomedir/mkhomedir_helper.c b/modules/pam_mkhomedir/mkhomedir_helper.c
index f426d721..9fafe6ab 100644
--- a/modules/pam_mkhomedir/mkhomedir_helper.c
+++ b/modules/pam_mkhomedir/mkhomedir_helper.c
@@ -231,7 +231,7 @@ create_homedir(const struct passwd *pwd,
if ((srcfd = open(newsource, O_RDONLY)) < 0 || fstat(srcfd, &st) != 0)
{
pam_syslog(NULL, LOG_DEBUG,
- "unable to open src file %s: %m", newsource);
+ "unable to open or stat src file %s: %m", newsource);
closedir(d);
#ifndef PATH_MAX
@@ -241,20 +241,6 @@ create_homedir(const struct passwd *pwd,
return PAM_PERM_DENIED;
}
- if (stat(newsource, &st) != 0)
- {
- pam_syslog(NULL, LOG_DEBUG, "unable to stat src file %s: %m",
- newsource);
- close(srcfd);
- closedir(d);
-
-#ifndef PATH_MAX
- free(newsource); newsource = NULL;
- free(newdest); newdest = NULL;
-#endif
-
- return PAM_PERM_DENIED;
- }
/* Open the dest file */
if ((destfd = open(newdest, O_WRONLY | O_TRUNC | O_CREAT, 0600)) < 0)