summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard Jones <rjones@trick.home.annexia.org>2009-08-13 15:00:38 +0100
committerRichard Jones <rjones@trick.home.annexia.org>2009-08-13 16:19:25 +0100
commit40a0f2595515b5624ddd93cf26c4ed6383ac530e (patch)
tree862419fda0f97ed24b012a19bb5dec1c9a03075c
parent9f7bec212fc7d146b4fd4be6e8b3e98677dc0a0a (diff)
downloadlibguestfs-40a0f2595515b5624ddd93cf26c4ed6383ac530e.tar.gz
libguestfs-40a0f2595515b5624ddd93cf26c4ed6383ac530e.tar.xz
libguestfs-40a0f2595515b5624ddd93cf26c4ed6383ac530e.zip
mount: Check mountpoints are absolute paths.
-rw-r--r--daemon/mount.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/daemon/mount.c b/daemon/mount.c
index d1b26fa7..f5938121 100644
--- a/daemon/mount.c
+++ b/daemon/mount.c
@@ -48,6 +48,8 @@ do_mount_vfs (const char *options, const char *vfstype,
char *mp;
char *error;
+ ABS_PATH (mountpoint, return -1);
+
is_root = strcmp (mountpoint, "/") == 0;
if (!root_mounted && !is_root) {