Fix a file-globbing bug in the daemon when chroot is on.
authorWayne Davison <wayned@samba.org>
Sat, 12 Apr 2008 05:32:38 +0000 (22:32 -0700)
committerWayne Davison <wayned@samba.org>
Sat, 12 Apr 2008 05:32:38 +0000 (22:32 -0700)
util.c

diff --git a/util.c b/util.c
index a53af8d..2afb63e 100644 (file)
--- a/util.c
+++ b/util.c
@@ -582,7 +582,7 @@ static inline void call_glob_match(const char *name, int len, int from_glob,
        } else
                use_buf = glob.arg_buf;
 
-       if (from_glob || arg) {
+       if (from_glob || (arg && len)) {
                STRUCT_STAT st;
                int is_dir;