summaryrefslogtreecommitdiff
path: root/usr.sbin/rpki-client/rsync.c
diff options
context:
space:
mode:
authorClaudio Jeker <claudio@cvs.openbsd.org>2021-09-01 12:26:27 +0000
committerClaudio Jeker <claudio@cvs.openbsd.org>2021-09-01 12:26:27 +0000
commit41d5fc13e0702a59c6a5c6d3ad952a43aa13fcd7 (patch)
treec98c4ce19036a8af53dc3d12d81e0c27111ce03b /usr.sbin/rpki-client/rsync.c
parent5ff90a63c2b8f4be7f92fc313a4072273b865a90 (diff)
RPKI only cares about *.{cer,crl,gbr,mft,roa} files. Use rsync --include
and --exclude to only fetch those files from the CA repositories. OK job@
Diffstat (limited to 'usr.sbin/rpki-client/rsync.c')
-rw-r--r--usr.sbin/rpki-client/rsync.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/usr.sbin/rpki-client/rsync.c b/usr.sbin/rpki-client/rsync.c
index d2eb4c26c7a..740d0ada53b 100644
--- a/usr.sbin/rpki-client/rsync.c
+++ b/usr.sbin/rpki-client/rsync.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: rsync.c,v 1.24 2021/04/19 17:04:35 deraadt Exp $ */
+/* $OpenBSD: rsync.c,v 1.25 2021/09/01 12:26:26 claudio Exp $ */
/*
* Copyright (c) 2019 Kristaps Dzonsons <kristaps@bsd.lv>
*
@@ -277,8 +277,14 @@ proc_rsync(char *prog, char *bind_addr, int fd)
args[i++] = (char *)prog;
args[i++] = "-rt";
args[i++] = "--no-motd";
- args[i++] = "--timeout";
- args[i++] = "180";
+ args[i++] = "--timeout=180";
+ args[i++] = "--include=*/";
+ args[i++] = "--include=*.cer";
+ args[i++] = "--include=*.crl";
+ args[i++] = "--include=*.gbr";
+ args[i++] = "--include=*.mft";
+ args[i++] = "--include=*.roa";
+ args[i++] = "--exclude=*";
if (bind_addr != NULL) {
args[i++] = "--address";
args[i++] = (char *)bind_addr;