Signed-off-by: Karel Zak <kzak@redhat.com>
If the \fBHUSHLOGIN_FILE\fR item is empty then all checks are disabled.
.RE
+.PP
+\fBDEFAULT_HOME\fR (boolean)
+.RS 4
+Indicate if login is allowed if we can\'t cd to the home directory. If set to
+\fIyes\fR, the user will login in the root (/) directory if it is not possible
+to cd to her home directory. The default value is 'yes'.
+.RE
+
.SH FILES
.nf
.I /var/run/utmp
/* wait until here to change directory! */
if (chdir(pwd->pw_dir) < 0) {
warn(_("%s: change directory failed"), pwd->pw_dir);
+
+ if (!getlogindefs_bool("DEFAULT_HOME", 1))
+ exit(0);
if (chdir("/"))
exit(EXIT_FAILURE);
pwd->pw_dir = "/";