]> git.ipfire.org Git - thirdparty/systemd.git/commit
Fix error message when binding files (#7196)
authorZeal Jagannatha <zealjagannatha@gmail.com>
Tue, 14 Nov 2017 07:11:41 +0000 (23:11 -0800)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Tue, 14 Nov 2017 07:11:41 +0000 (08:11 +0100)
commitab0fc8711b5021c82a1c6c04d24a0805319afea4
tree1ce4eaec2f53cc418f1cce17eb8677bdfe527809
parent861f16d2679eeda79e8185057cef24653913e300
Fix error message when binding files (#7196)

If you use machinectl to bind a file into a container, it responds with a confusing error message about a temporary directory not being a directory.

I just swapped it to error with the source that was passed, rather than the tmpdir.

It would also be nice to be able to bind files, but that's a separate issue (#7195).

Before the change:

root@epona /var/lib/sandbox $ cat bar/foo
Hello world!
root@epona /var/lib/sandbox $ machinectl bind testing /var/lib/sandbox/bar/foo /foo
Failed to bind mount: Failed to overmount /tmp/propagate.W5TNsj/mount: Not a directory

After the change:

root@epona /var/lib/sandbox $ machinectl bind testing /var/lib/sandbox/bar/foo /foo
Failed to bind mount: Failed to overmount /var/lib/sandbox/bar/foo: Not a directory
src/machine/machine-dbus.c