mirror of
				https://github.com/Kicksecure/security-misc.git
				synced 2025-10-30 23:08:52 -04:00 
			
		
		
		
	remount /lib with nosuid,nodev
https://forums.whonix.org/t/re-mount-home-and-other-with-noexec-and-nosuid-among-other-useful-mount-options-for-better-security/7707/22
This commit is contained in:
		
							parent
							
								
									7f20160477
								
							
						
					
					
						commit
						af0f074987
					
				
					 1 changed files with 10 additions and 0 deletions
				
			
		|  | @ -76,6 +76,15 @@ securityfs() { | |||
|    touch "/var/run/remount-secure/${FUNCNAME}" | ||||
| } | ||||
| 
 | ||||
| lib() { | ||||
|    if [ -e "/var/run/remount-secure/${FUNCNAME}" ]; then | ||||
|       return 0 | ||||
|    fi | ||||
|    ## Not using noexec on /lib. | ||||
|    mount -o nosuid,nodev --bind /lib /lib || exit_code=7 | ||||
|    touch "/var/run/remount-secure/${FUNCNAME}" | ||||
| } | ||||
| 
 | ||||
| end() { | ||||
|    exit $exit_code | ||||
| } | ||||
|  | @ -86,6 +95,7 @@ main() { | |||
|    shm "$@" | ||||
|    tmp "$@" | ||||
|    securityfs "$@" | ||||
|    lib "$@" | ||||
|    end "$@" | ||||
| } | ||||
| 
 | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Patrick Schleizer
						Patrick Schleizer