diff options
author | Job Snijders <job@cvs.openbsd.org> | 2021-10-28 13:50:30 +0000 |
---|---|---|
committer | Job Snijders <job@cvs.openbsd.org> | 2021-10-28 13:50:30 +0000 |
commit | 9bb57323f66943217557950ba36eb175e407ca85 (patch) | |
tree | ac9aba3757e26054b108b8fe25642abf953bb44f /usr.sbin | |
parent | 283520f51a296c25b3bcf54a96e96aaf6c7e2637 (diff) |
Don't fetch files larger than 2MB
OK claudio@
Diffstat (limited to 'usr.sbin')
-rw-r--r-- | usr.sbin/rpki-client/rsync.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/usr.sbin/rpki-client/rsync.c b/usr.sbin/rpki-client/rsync.c index a1bdd7f3a66..bc711f143ef 100644 --- a/usr.sbin/rpki-client/rsync.c +++ b/usr.sbin/rpki-client/rsync.c @@ -1,4 +1,4 @@ -/* $OpenBSD: rsync.c,v 1.28 2021/10/23 20:01:16 claudio Exp $ */ +/* $OpenBSD: rsync.c,v 1.29 2021/10/28 13:50:29 job Exp $ */ /* * Copyright (c) 2019 Kristaps Dzonsons <kristaps@bsd.lv> * @@ -33,6 +33,9 @@ #include "extern.h" +#define __STRINGIFY(x) #x +#define STRINGIFY(x) __STRINGIFY(x) + /* * A running rsync process. * We can have multiple of these simultaneously and need to keep track @@ -275,6 +278,7 @@ proc_rsync(char *prog, char *bind_addr, int fd) args[i++] = (char *)prog; args[i++] = "-rt"; args[i++] = "--no-motd"; + args[i++] = "--max-size=" STRINGIFY(MAX_FILE_SIZE); args[i++] = "--timeout=180"; args[i++] = "--include=*/"; args[i++] = "--include=*.cer"; |