mirror of
https://git.in.rschanz.org/ryan77627/guix.git
synced 2025-01-12 06:06:53 -05:00
file-systems: 'mount-file-system' preserves the right mount flags.
Fixes <https://bugs.gnu.org/47007>.
Reported by Jelle Licht <jlicht@fsfe.org>.
Since commit dcb640f02b
, we could end up
applying the wrong mount flags because the (find ...) expression could
pick the "wrong" mount point in the presence of bind mounts.
* gnu/build/file-systems.scm (mount-file-system): Use 'statfs' to
compute FLAGS whe FS is a bind mount.
This commit is contained in:
parent
9a6ea2f8dc
commit
b665dd4a99
1 changed files with 2 additions and 8 deletions
|
@ -920,14 +920,8 @@ (define (mount-nfs source mount-point type flags options)
|
||||||
;; MS_REMOUNT call below fails with EPERM.
|
;; MS_REMOUNT call below fails with EPERM.
|
||||||
;; See <https://bugs.gnu.org/46292>
|
;; See <https://bugs.gnu.org/46292>
|
||||||
(if (memq 'bind-mount (file-system-flags fs))
|
(if (memq 'bind-mount (file-system-flags fs))
|
||||||
(or (and=> (find (let ((devno (stat:dev
|
(statfs-flags->mount-flags
|
||||||
(lstat source))))
|
(file-system-mount-flags (statfs source)))
|
||||||
(lambda (mount)
|
|
||||||
(= (mount-device-number mount)
|
|
||||||
devno)))
|
|
||||||
(mounts))
|
|
||||||
mount-flags)
|
|
||||||
0)
|
|
||||||
0)))
|
0)))
|
||||||
(options (file-system-options fs)))
|
(options (file-system-options fs)))
|
||||||
(when (file-system-check? fs)
|
(when (file-system-check? fs)
|
||||||
|
|
Loading…
Reference in a new issue