X-Git-Url: http://git.annexia.org/?p=libguestfs.git;a=blobdiff_plain;f=daemon%2Fglob.c;h=e94e4aa764015628a9c0cc9e607d70414ba9c406;hp=f15d5e506c45d59ca5fce7b32917a3984eb00bfc;hb=428a45c3e15f03e9861e1b551e1ae8da821dba5f;hpb=a7b73d4a1e09f12b2002083618056f0c823c1dcf diff --git a/daemon/glob.c b/daemon/glob.c index f15d5e5..e94e4aa 100644 --- a/daemon/glob.c +++ b/daemon/glob.c @@ -26,14 +26,11 @@ #include "actions.h" char ** -do_glob_expand (char *pattern) +do_glob_expand (const char *pattern) { int r; glob_t buf; - NEED_ROOT (NULL); - ABS_PATH (pattern, 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;