Properly set umask on login

pull/4/head
Timothy Pearson 6 years ago
parent 81b65a2d55
commit 10472c4c2b

@ -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;

Loading…
Cancel
Save