unshare: Fix error message when setting proc mount propagation

The mount() command associated with this error message is not about
unmounting the proc fs, but rather about changing the propagation
of mount events for the proc fs. Rewrite the error message to
reflect this.
This commit is contained in:
Johan Herland 2021-05-07 00:53:29 +02:00 committed by GitHub
parent 185bc3a832
commit 9b657529cc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -651,7 +651,7 @@ int main(int argc, char *argv[])
if (procmnt) {
if (!newroot && mount("none", procmnt, NULL, MS_PRIVATE|MS_REC, NULL) != 0)
err(EXIT_FAILURE, _("umount %s failed"), procmnt);
err(EXIT_FAILURE, _("cannot change %s filesystem propagation"), procmnt);
if (mount("proc", procmnt, "proc", MS_NOSUID|MS_NOEXEC|MS_NODEV, NULL) != 0)
err(EXIT_FAILURE, _("mount %s failed"), procmnt);
}