diff options
author | Mark H Weaver <mhw@netris.org> | 2016-01-23 18:40:33 -0500 |
---|---|---|
committer | Mark H Weaver <mhw@netris.org> | 2016-01-23 18:44:03 -0500 |
commit | c5184468f5ee9d41ac5a49126d9017b635c80288 (patch) | |
tree | f01bf706c99a6d6f47c0d9d70d7318c86c46db3d /gnu/build | |
parent | fe17fb4a2c897fd9186f91887f5af63dd00d227a (diff) | |
download | guix-c5184468f5ee9d41ac5a49126d9017b635c80288.tar guix-c5184468f5ee9d41ac5a49126d9017b635c80288.tar.gz |
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.
Diffstat (limited to 'gnu/build')
-rw-r--r-- | gnu/build/linux-container.scm | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/gnu/build/linux-container.scm b/gnu/build/linux-container.scm index eb5dbf94a3..ec68679f0b 100644 --- a/gnu/build/linux-container.scm +++ b/gnu/build/linux-container.scm @@ -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?) |