X-Git-Url: http://git.annexia.org/?a=blobdiff_plain;f=daemon%2Ffile.c;h=2ba2aab79b0aba97e2f56e31b22c6f763cda57f0;hb=8601bbda56cdb2b8491b6e2054596ec9599c38f1;hp=e18513299507629b334f04b9b47d48bcc3c7b7ee;hpb=0dd6c8c8442d4ff588f6dac2efab24d3409b0dec;p=libguestfs.git diff --git a/daemon/file.c b/daemon/file.c index e185132..2ba2aab 100644 --- a/daemon/file.c +++ b/daemon/file.c @@ -74,7 +74,7 @@ do_cat (char *path) char *buf, *buf2; NEED_ROOT (NULL); - ABS_PATH (path,NULL); + ABS_PATH (path, return NULL); CHROOT_IN; fd = open (path, O_RDONLY); @@ -391,7 +391,7 @@ do_file (char *path) char *buf; int len; - NEED_ROOT_OR_IS_DEVICE (path, return NULL); + REQUIRE_ROOT_OR_RESOLVE_DEVICE (path, return NULL); if (strncmp (path, "/dev/", 5) == 0) buf = (char *) path;