build: Add ./configure --disable-fuse option.
[libguestfs.git] / daemon / glob.c
index 40b7c50..e94e4aa 100644 (file)
 #include "actions.h"
 
 char **
-do_glob_expand (char *pattern)
+do_glob_expand (const char *pattern)
 {
   int r;
   glob_t buf;
 
-  NEED_ROOT (return NULL);
-  ABS_PATH (pattern, return NULL);     /* Required so chroot can be used. */
-
   /* glob(3) in glibc never calls chdir, so this seems to be safe: */
   CHROOT_IN;
   r = glob (pattern, GLOB_MARK|GLOB_BRACE, NULL, &buf);
@@ -49,7 +46,7 @@ do_glob_expand (char *pattern)
 
   if (r != 0) {
     if (errno != 0)
-      reply_with_perror ("glob: %s", pattern);
+      reply_with_perror ("%s", pattern);
     else
       reply_with_error ("glob failed: %s", pattern);
     return NULL;