diff options
author | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2019-03-07 16:41:51 -0600 |
---|---|---|
committer | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2019-03-07 16:41:51 -0600 |
commit | 10472c4c2b98b22c0d8309e3f21ae2df32a6538a (patch) | |
tree | d9c218645c60807d28f606d1a8062c0c1314acad /src | |
parent | 81b65a2d55757651f28fe31e7d41e3bb11f3ad76 (diff) | |
download | libtdeldap-10472c4c2b98b22c0d8309e3f21ae2df32a6538a.tar.gz libtdeldap-10472c4c2b98b22c0d8309e3f21ae2df32a6538a.zip |
Properly set umask on login
Diffstat (limited to 'src')
-rw-r--r-- | src/libtdeldap.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/libtdeldap.cpp b/src/libtdeldap.cpp index 0f293e9..bf744dc 100644 --- a/src/libtdeldap.cpp +++ b/src/libtdeldap.cpp @@ -5114,6 +5114,9 @@ int LDAPManager::writePAMFiles(LDAPPamConfig pamConfig, TQString *errstr) { if (file3.open(IO_WriteOnly)) { TQTextStream stream( &file3 ); + char modestring[8]; + sprintf(modestring, "%04o", pamConfig.autocreate_user_directories_umask); + stream << "# This file was automatically generated by TDE\n"; stream << "# All changes will be lost!\n"; stream << "\n"; @@ -5122,9 +5125,8 @@ int LDAPManager::writePAMFiles(LDAPPamConfig pamConfig, TQString *errstr) { stream << "session required pam_permit.so" << "\n"; stream << "session required pam_unix.so" << "\n"; stream << "session optional pam_ck_connector.so nox11" << "\n"; + stream << "session optional pam_umask.so usergroups umask=" << modestring << "\n"; if (pamConfig.autocreate_user_directories_enable) { - char modestring[8]; - sprintf(modestring, "%04o", pamConfig.autocreate_user_directories_umask); TQString skelstring; if (pamConfig.autocreate_user_directories_skel != "") { skelstring = " skel=" + pamConfig.autocreate_user_directories_skel; |