Fix nis.sh SELinux issue
This commit is contained in:
		
							parent
							
								
									5bbe06bbb0
								
							
						
					
					
						commit
						491710623e
					
				
							
								
								
									
										9
									
								
								nis.sh
									
									
									
									
									
								
							
							
						
						
									
										9
									
								
								nis.sh
									
									
									
									
									
								
							| @ -23,6 +23,12 @@ | ||||
| 
 | ||||
| CONF=/etc/yp.conf | ||||
| 
 | ||||
| fixContext() { | ||||
|     if [ -x /sbin/restorecon ]; then | ||||
|         /sbin/restorecon ${1} >/dev/null 2>&1 | ||||
|     fi | ||||
| } | ||||
| 
 | ||||
| save_config_file() { | ||||
|     origfile="${1}" | ||||
|     savefile="${SAVEDIR}/${origfile##*/}.predhclient.${interface}" | ||||
| @ -37,7 +43,7 @@ save_config_file() { | ||||
|         echo > ${savefile} | ||||
|     fi | ||||
| 
 | ||||
|     restorecon ${savefile} >/dev/null 2>&1 | ||||
|     fixContext ${savefile} | ||||
| } | ||||
| 
 | ||||
| nis_config() { | ||||
| @ -89,6 +95,7 @@ nis_restore() { | ||||
|         if [ -f ${SAVEDIR}/${CONF}.predhclient.${interface} ]; then | ||||
|             rm -f ${CONF} | ||||
|             mv -f ${SAVEDIR}/${CONF}.predhclient.${interface} ${CONF} | ||||
|             fixContext /etc/yp.conf | ||||
|             if [ -x /etc/rc.d/init.d/ypbind ] && [ -r /var/run/ypbind.pid ]; then | ||||
|                 service ypbind restart >/dev/null 2>&1 | ||||
|             fi | ||||
|  | ||||
| @ -1,7 +1,7 @@ | ||||
| Summary: The NIS daemon which binds NIS clients to an NIS domain | ||||
| Name: ypbind | ||||
| Version: 1.20.4 | ||||
| Release: 16%{?dist} | ||||
| Release: 17%{?dist} | ||||
| License: GPLv2 | ||||
| Group: System Environment/Daemons | ||||
| Source0: ftp://ftp.us.kernel.org/pub/linux/utils/net/NIS/ypbind-mt-%{version}.tar.bz2 | ||||
| @ -97,6 +97,10 @@ fi | ||||
| %doc README NEWS | ||||
| 
 | ||||
| %changelog | ||||
| * Wed Mar 18 2009 Vitezslav Crhonek <vcrhonek@redhat.com> - 3:1.20.4-17 | ||||
| - Fix nis.sh SELinux issue | ||||
|   Resolves: #488865 | ||||
| 
 | ||||
| * Thu Feb 26 2009 Vitezslav Crhonek <vcrhonek@redhat.com> - 3:1.20.4-16 | ||||
| - Fix ypbind script in dos format - bash syntax errors | ||||
|   Resolves: #486722 | ||||
|  | ||||
		Loading…
	
		Reference in New Issue
	
	Block a user