diff options
author | Rob Austein <sra@hactrn.net> | 2010-01-13 10:41:57 +0000 |
---|---|---|
committer | Rob Austein <sra@hactrn.net> | 2010-01-13 10:41:57 +0000 |
commit | 4b93bad1fa145f1ef383d72d780e3b12c732d911 (patch) | |
tree | 1f563d62f6e94e9753aa8c91742ff6015880a602 | |
parent | 040ac9838127572603f3daa7b7949e54ba786d66 (diff) |
multimodule hack for pubd
svn path=/rpkid/pubd.py; revision=2949
-rw-r--r-- | rpkid/pubd.py | 1 | ||||
-rw-r--r-- | rpkid/rpki/publication.py | 3 |
2 files changed, 3 insertions, 1 deletions
diff --git a/rpkid/pubd.py b/rpkid/pubd.py index db98faeb..386d2f06 100644 --- a/rpkid/pubd.py +++ b/rpkid/pubd.py @@ -61,6 +61,7 @@ class pubd_context(object): self.https_server_port = int(cfg.get("server-port", "4434")) self.publication_base = cfg.get("publication-base", "publication/") + self.publication_multimodule = cfg.getboolean("publication-multimodule", False) def handler_common(self, query, client, cb, certs, crl = None): """ diff --git a/rpkid/rpki/publication.py b/rpkid/rpki/publication.py index 38294d59..04095c26 100644 --- a/rpkid/rpki/publication.py +++ b/rpkid/rpki/publication.py @@ -254,7 +254,8 @@ class publication_object_elt(rpki.xml_utils.base_elt, publication_namespace): if not self.uri.startswith("rsync://"): raise rpki.exceptions.BadURISyntax, self.uri u = 0 - for i in xrange(4): + n = 3 if self.gctx.publication_multimodule else 4 + for i in xrange(n): u = self.uri.index("/", u + 1) filename = self.gctx.publication_base.rstrip("/") + self.uri[u:] if "//" in filename or "/../" in filename or filename.endswith("/.."): |