]> thyrsus.com Git - rcs-fast-import.git/commitdiff
Sanity-check modes more carefully.
authorEric S. Raymond <esr@thyrsus.com>
Sat, 13 Nov 2010 21:34:25 +0000 (16:34 -0500)
committerEric S. Raymond <esr@thyrsus.com>
Sat, 13 Nov 2010 21:34:25 +0000 (16:34 -0500)
rcs-fast-import

index bab2206b9cf4c474717ab5218ec9eef8577b4184..c8d6b77521ab57ccef03556576570ff372a1142c 100755 (executable)
@@ -670,6 +670,10 @@ class RCS(Generic):
     def sanecheck(self, event, path, mode, copyfile):
         if mode == "160000":
             raise FatalException("ignoring a submodule link %s", path)
+        elif mode == "120000":
+            raise FatalException("ignoring a symlink %s", path)
+        if not mode[-3:] in ('644', '755'):
+            raise FatalException("unknown mode %s on %s", (mode, path))
     def checkin(self, commit, comment, op, path):
         "Check in a new revision - also used to create new masters."
         command = "ci -l"