diff options
author | Steve Langasek <steve.langasek@ubuntu.com> | 2019-01-03 21:23:37 -0800 |
---|---|---|
committer | Steve Langasek <vorlon@debian.org> | 2019-01-08 22:11:51 -0800 |
commit | 7e6c4749370338c9af7e1b959f8ab96d089786d6 (patch) | |
tree | 2da5e702d7da7b222237ea5ac71e208dd70791a6 /modules/pam_mkhomedir/mkhomedir_helper.c | |
parent | fa4960114fc50965a9696f2db7406a9d792e3ff8 (diff) | |
parent | 795badba7f95e737f979917859cd32c9bd47bcad (diff) |
Merge upstream version 1.1.8
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 2a47de3a..f426d721 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 |