diff options
author | Eelco Dolstra <edolstra@gmail.com> | 2021-11-08 22:00:45 +0100 |
---|---|---|
committer | Eelco Dolstra <edolstra@gmail.com> | 2021-11-08 22:00:45 +0100 |
commit | ff2af4d64ee9789c3c50f7e49897e8fa9fda6e16 (patch) | |
tree | aab58f6e2f78f4afe78cb52e602bf8c0eeec9e7d /src/libstore/local-store.cc | |
parent | 7a71621b7c43d7d2f264cc495fb7ceb66455fd3c (diff) |
Unshare mount namespace in main()
Doing it as a side-effect of calling LocalStore::makeStoreWritable()
is very ugly.
Also, make sure that stopping the progress bar joins the update
thread, otherwise that thread should be unshared as well.
Diffstat (limited to 'src/libstore/local-store.cc')
-rw-r--r-- | src/libstore/local-store.cc | 4 |
1 files changed, 0 insertions, 4 deletions
diff --git a/src/libstore/local-store.cc b/src/libstore/local-store.cc index 1cef50a40..eb3457339 100644 --- a/src/libstore/local-store.cc +++ b/src/libstore/local-store.cc @@ -504,10 +504,6 @@ void LocalStore::makeStoreWritable() throw SysError("getting info about the Nix store mount point"); if (stat.f_flag & ST_RDONLY) { - saveMountNamespace(); - if (unshare(CLONE_NEWNS) == -1) - throw SysError("setting up a private mount namespace"); - if (mount(0, realStoreDir.get().c_str(), "none", MS_REMOUNT | MS_BIND, 0) == -1) throw SysError("remounting %1% writable", realStoreDir); } |