From 0b9b897495b16fe4efeb8060a97c00bbbab28c0d Mon Sep 17 00:00:00 2001
From: oracle <solaris@oracle.com>
Date: Mon, 3 Aug 2015 14:34:19 -0700
Subject: [PATCH 02/34] PAM Support

#
# To comply to the Solaris PAM policy, the UsePAM option is changed to be
# always on and not configurable on Solaris.  This is for Solaris only, so we
# will not contribute the changes to the upstream community.
#

--- openssh-10.0p1/servconf.c.orig
+++ openssh-10.0p1/servconf.c
@@ -299,7 +299,12 @@
 
 	/* Portable-specific options */
 	if (options->use_pam == -1)
+#ifdef SET_USE_PAM
+		/* use_pam should be always set to 1 on Solaris */
+		options->use_pam = 1;
+#else
 		options->use_pam = 0;
+#endif
 	if (options->pam_service_name == NULL)
 		options->pam_service_name = xstrdup(SSHD_PAM_SERVICE);
 
@@ -1389,8 +1394,17 @@
 	switch (opcode) {
 	/* Portable-specific options */
 	case sUsePAM:
+#ifdef SET_USE_PAM
+		/* UsePAM is always on and not configurable on Solaris */
+		logit("%s line %d: ignoring UsePAM option value."
+		    " This option is always on.", filename, linenum);
+		while (arg)
+			arg = strdelim(&str);
+		break;
+#else
 		intptr = &options->use_pam;
 		goto parse_flag;
+#endif
 	case sPAMServiceName:
 		charptr = &options->pam_service_name;
 		arg = argv_next(&ac, &av);