build: container: Make 'unprivileged-user-namespace-supported?' more robust.
* gnu/build/linux-container.scm (unprivileged-user-namespace-supported?): Only read and check the first character, to cope with a possible newline in the (pseudo-)file.
This commit is contained in:
		
							parent
							
								
									fe17fb4a2c
								
							
						
					
					
						commit
						c5184468f5
					
				
					 1 changed files with 1 additions and 1 deletions
				
			
		|  | @ -41,7 +41,7 @@ | |||
|   "Return #t if user namespaces can be created by unprivileged users." | ||||
|   (let ((userns-file "/proc/sys/kernel/unprivileged_userns_clone")) | ||||
|     (if (file-exists? userns-file) | ||||
|         (string=? "1" (call-with-input-file userns-file read-string)) | ||||
|         (eqv? #\1 (call-with-input-file userns-file read-char)) | ||||
|         #t))) | ||||
| 
 | ||||
| (define (setgroups-supported?) | ||||
|  |  | |||
		Reference in a new issue