Blame SOURCES/openssh-7.8p1-UsePAM-warning.patch

3e8b5b
diff --git a/sshd.c b/sshd.c
3e8b5b
--- a/sshd.c
3e8b5b
+++ b/sshd.c
3e8b5b
@@ -1701,6 +1701,10 @@ main(int ac, char **av)
3e8b5b
 	parse_server_config(&options, rexeced_flag ? "rexec" : config_file_name,
3e8b5b
 	    cfg, NULL);
3e8b5b
 
58886c
+	/* 'UsePAM no' is not supported in RHEL */
3e8b5b
+	if (! options.use_pam)
58886c
+		logit("WARNING: 'UsePAM no' is not supported in RHEL and may cause several problems.");
3e8b5b
+
3e8b5b
 	/* Fill in default values for those options not explicitly set. */
3e8b5b
 	fill_default_server_options(&options);
3e8b5b
 
3e8b5b
diff --git a/sshd_config b/sshd_config
3e8b5b
--- a/sshd_config
3e8b5b
+++ b/sshd_config
3e8b5b
@@ -101,6 +101,8 @@ GSSAPICleanupCredentials no
3e8b5b
 # If you just want the PAM account and session checks to run without
3e8b5b
 # PAM authentication, then enable this but set PasswordAuthentication
3e8b5b
 # and ChallengeResponseAuthentication to 'no'.
58886c
+# WARNING: 'UsePAM no' is not supported in RHEL and may cause several
3e8b5b
+# problems.
3e8b5b
 UsePAM yes
3e8b5b
 
3e8b5b
 #AllowAgentForwarding yes