casacfgpam was corrected to install casa in the right place after common-auth, common-session, pam_unix2.so or the end of the section.
This commit is contained in:
		
							
								
								
									
										11
									
								
								CASA.changes
									
									
									
									
									
								
							
							
						
						
									
										11
									
								
								CASA.changes
									
									
									
									
									
								
							| @@ -1,3 +1,14 @@ | |||||||
|  | ------------------------------------------------------------------- | ||||||
|  | Wed Feb 8 17:45:50 MST 2006 - cmashayekhi@novell.com | ||||||
|  |  | ||||||
|  | - startup and shutdown script was modified to not | ||||||
|  | 	edit pam files. | ||||||
|  | - script to modify pam files for install, upgradeand  | ||||||
|  | 	remove were created and spec file was modified to  | ||||||
|  | 	call them. | ||||||
|  | - startup and shut down of the service during install | ||||||
|  |   and upgrade was fixed. | ||||||
|  |    | ||||||
| ------------------------------------------------------------------- | ------------------------------------------------------------------- | ||||||
| Tue Feb 7 14:00:59 MST 2006 - cmashayekhi@novell.com | Tue Feb 7 14:00:59 MST 2006 - cmashayekhi@novell.com | ||||||
|  |  | ||||||
|   | |||||||
| @@ -1,10 +1,30 @@ | |||||||
| # Adding CASA pam entries to pam files. | # Adding CASA pam entries to pam files. | ||||||
| for pam_file in "/etc/pam.d/login" "/etc/pam.d/sshd" "/etc/pam.d/xdm" "/etc/pam.d/gdm" "/etc/pam.d/kdm" | for file in "/etc/pam.d/login" "/etc/pam.d/sshd" "/etc/pam.d/xdm" "/etc/pam.d/gdm" "/etc/pam.d/kdm" | ||||||
| do | do | ||||||
| 	if [ -f $pam_file ] | 	if [ -f $file ] | ||||||
| 	then | 	then | ||||||
| 		MICASA_D=`grep -i pam_micasa $pam_file` | 		sed -i '/pam_micasa/d' $file | ||||||
| 		if [ -z "$MICASA_D" ] | 		var=`grep pam_unix2.so $file` | ||||||
|  | 		entry=`echo -e "auth\t required\tpam_micasa.so"` | ||||||
|  | 		entry2=`echo -e "session\t required\tpam_micasa.so"` | ||||||
|  | 		cnt=0 | ||||||
|  | 		if [ "$var" != "" ] | ||||||
|  | 		then | ||||||
|  | 		  sed -i "/^auth.*required.*pam_unix2.so/a$entry" $file | ||||||
|  | 		  sed -i "/^session.*required.*pam_unix2.so/a$entry2" $file | ||||||
|  |  | ||||||
|  | 		else | ||||||
|  | 		  let ' cnt = cnt + 1' | ||||||
|  | 		fi | ||||||
|  | 		var2=`grep common-auth $file` | ||||||
|  | 		if [ "$var2" != "" ] | ||||||
|  | 		then | ||||||
|  | 		  sed -i "/^auth.*include.*common-auth/a$entry" $file | ||||||
|  | 		  sed -i "/^session.*include.*common-session/a$entry2" $file      | ||||||
|  | 		else | ||||||
|  | 		  let ' cnt = cnt + 1' | ||||||
|  | 		fi  | ||||||
|  | 		if [ $cnt -eq 2 ] | ||||||
| 		then | 		then | ||||||
| 		   awk ' | 		   awk ' | ||||||
| 				/auth/ { authSeen++; } | 				/auth/ { authSeen++; } | ||||||
| @@ -18,8 +38,8 @@ do | |||||||
| 				// {print $0; } | 				// {print $0; } | ||||||
| 				END { if (sesSeen) | 				END { if (sesSeen) | ||||||
| 				print "session\trequired\tpam_micasa.so\n"; } | 				print "session\trequired\tpam_micasa.so\n"; } | ||||||
| 		' $pam_file > $pam_file.sav | 				' $file > $file.sav | ||||||
| 		mv $pam_file.sav $pam_file | 				mv $file.sav $file | ||||||
| 		fi | 		fi | ||||||
| 	fi | 	fi | ||||||
| done | done | ||||||
		Reference in New Issue
	
	Block a user