wafsamba: don't follow symlinks outside the build tree
authorAndrew Tridgell <tridge@samba.org>
Mon, 28 Feb 2011 07:53:36 +0000 (18:53 +1100)
committerAndrew Tridgell <tridge@samba.org>
Tue, 15 Mar 2011 01:22:18 +0000 (12:22 +1100)
when computing stale files, don't follow symlinks that are not within
the build tree

buildtools/wafsamba/stale_files.py

index dd4270dfde4023de4c13b873601693d936b896ab..2b94f0823e69ea487f23b453f71ba28dbda258cd 100644 (file)
@@ -73,7 +73,9 @@ def replace_refill_task_list(self):
         for f in files:
             p = root + '/' + f
             if os.path.islink(p):
-                p = os.readlink(p)
+                link = os.readlink(p)
+                if link[0:bin_base_len] == bin_base:
+                    p = link
             if f in ['config.h']:
                 continue
             if f[-2:] not in [ '.c', '.h' ]: