The "ignore nonreadable" daemon parameter no longer affects
authorWayne Davison <wayned@samba.org>
Thu, 16 Dec 2004 22:47:36 +0000 (22:47 +0000)
committerWayne Davison <wayned@samba.org>
Thu, 16 Dec 2004 22:47:36 +0000 (22:47 +0000)
symlinks that are being copied, even if they point nowhere.

flist.c

diff --git a/flist.c b/flist.c
index 0bd653ffdb695969fc91c804a8906b2739a58989..1b021ef63c10e12f0eefce787d75e8b85c1a9024 100644 (file)
--- a/flist.c
+++ b/flist.c
@@ -819,8 +819,13 @@ struct file_struct *make_file(char *fname, struct file_list *flist,
        if (check_exclude_file(thisname, S_ISDIR(st.st_mode) != 0, exclude_level))
                return NULL;
 
-       if (lp_ignore_nonreadable(module_id) && access(thisname, R_OK) != 0)
-               return NULL;
+       if (lp_ignore_nonreadable(module_id)) {
+#if SUPPORT_LINKS
+               if (!S_ISLNK(st.st_mode))
+#endif
+                       if (access(thisname, R_OK) != 0)
+                               return NULL;
+       }
 
 skip_excludes: