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