diff options
author | Lorry Tar Creator <lorry-tar-importer@baserock.org> | 2013-09-19 09:33:00 +0000 |
---|---|---|
committer | <> | 2014-11-13 09:36:22 +0000 |
commit | b1521c97e73b10469f7b34c0571d51c647eca83c (patch) | |
tree | 212a6a00baa11e9d0ca7bc27b12420d1dce6f07c /modules/pam_mkhomedir/mkhomedir_helper.c | |
parent | 6e36ca00ed774a7c5b2f2322c96b023999b733a4 (diff) | |
download | linux-pam-b1521c97e73b10469f7b34c0571d51c647eca83c.tar.gz |
Imported from /home/lorry/working-area/delta_linux-pam/Linux-PAM-1.1.8.tar.bz2.HEADLinux-PAM-1.1.8master
Diffstat (limited to 'modules/pam_mkhomedir/mkhomedir_helper.c')
-rw-r--r-- | modules/pam_mkhomedir/mkhomedir_helper.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/modules/pam_mkhomedir/mkhomedir_helper.c b/modules/pam_mkhomedir/mkhomedir_helper.c index 2a47de3..f426d72 100644 --- a/modules/pam_mkhomedir/mkhomedir_helper.c +++ b/modules/pam_mkhomedir/mkhomedir_helper.c @@ -272,8 +272,8 @@ create_homedir(const struct passwd *pwd, } /* Set the proper ownership and permissions for the module. We make - the file a+w and then mask it with the set mask. This preseves - execute bits */ + the file a+w and then mask it with the set mask. This preseves + execute bits */ if (fchmod(destfd, (st.st_mode | 0222) & (~u_mask)) != 0 || fchown(destfd, pwd->pw_uid, pwd->pw_gid) != 0) { @@ -384,8 +384,8 @@ main(int argc, char *argv[]) pwd = getpwnam(argv[1]); if (pwd == NULL) { - pam_syslog(NULL, LOG_ERR, "User unknown."); - return PAM_CRED_INSUFFICIENT; + pam_syslog(NULL, LOG_ERR, "User unknown."); + return PAM_CRED_INSUFFICIENT; } if (argc >= 3) { @@ -399,11 +399,11 @@ main(int argc, char *argv[]) } if (argc >= 4) { - if (strlen(argv[3]) >= sizeof(skeldir)) { + if (strlen(argv[3]) >= sizeof(skeldir)) { pam_syslog(NULL, LOG_ERR, "Too long skeldir path."); return PAM_SESSION_ERR; - } - strcpy(skeldir, argv[3]); + } + strcpy(skeldir, argv[3]); } /* Stat the home directory, if something exists then we assume it is |