Skip to content

Commit

Permalink
Regen patches
Browse files Browse the repository at this point in the history
  • Loading branch information
cjeker committed Jun 24, 2024
1 parent a8aadf1 commit aa77918
Show file tree
Hide file tree
Showing 4 changed files with 40 additions and 27 deletions.
26 changes: 13 additions & 13 deletions patches/0001-Allow-overriding-default-user-and-file-locations.patch
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
From 201b9892b2a37ecf08518e2e60b6abcc9d6b8db4 Mon Sep 17 00:00:00 2001
From 7b01108679335ba29111a27e85375f0ca62c55ce Mon Sep 17 00:00:00 2001
From: Claudio Jeker <[email protected]>
Date: Tue, 14 Apr 2020 22:43:56 +0200
Subject: [PATCH 1/4] Allow overriding default user and file locations
Expand All @@ -10,10 +10,10 @@ Adjust version string for -portable
2 files changed, 26 insertions(+), 8 deletions(-)

diff --git src/usr.sbin/rpki-client/extern.h src/usr.sbin/rpki-client/extern.h
index 52df7f8e0..56ae748ea 100644
index b811b485e..f2518f180 100644
--- src/usr.sbin/rpki-client/extern.h
+++ src/usr.sbin/rpki-client/extern.h
@@ -910,10 +910,27 @@ time_t getmonotime(void);
@@ -979,10 +979,27 @@ time_t get_current_time(void);
int mkpath(const char *);
int mkpathat(int, const char *);

Expand Down Expand Up @@ -43,10 +43,10 @@ index 52df7f8e0..56ae748ea 100644
/* Maximum number of TAL files we'll load. */
#define TALSZ_MAX 8
diff --git src/usr.sbin/rpki-client/main.c src/usr.sbin/rpki-client/main.c
index f91a9d693..390928e9e 100644
index 342548ce3..6b3c9e4f3 100644
--- src/usr.sbin/rpki-client/main.c
+++ src/usr.sbin/rpki-client/main.c
@@ -765,7 +765,7 @@ sum_repostats(const struct repo *rp, const struct repostats *in, void *arg)
@@ -800,7 +800,7 @@ sum_repostats(const struct repo *rp, const struct repostats *in, void *arg)
}

/*
Expand All @@ -55,7 +55,7 @@ index f91a9d693..390928e9e 100644
* returning the number of files found and filled-in.
* This may be zero.
* Don't exceed "max" filenames.
@@ -773,7 +773,7 @@ sum_repostats(const struct repo *rp, const struct repostats *in, void *arg)
@@ -808,7 +808,7 @@ sum_repostats(const struct repo *rp, const struct repostats *in, void *arg)
static int
tal_load_default(void)
{
Expand All @@ -64,7 +64,7 @@ index f91a9d693..390928e9e 100644
int s = 0;
char *path;
DIR *dirp;
@@ -936,7 +936,7 @@ main(int argc, char *argv[])
@@ -971,7 +971,7 @@ main(int argc, char *argv[])
struct msgbuf *queues[NPFD];
struct ibuf *b, *httpbuf = NULL, *procbuf = NULL;
struct ibuf *rrdpbuf = NULL, *rsyncbuf = NULL;
Expand All @@ -73,7 +73,7 @@ index f91a9d693..390928e9e 100644
char *bind_addr = NULL;
const char *cachedir = NULL, *outputdir = NULL;
const char *errs, *name;
@@ -953,9 +953,9 @@ main(int argc, char *argv[])
@@ -989,9 +989,9 @@ main(int argc, char *argv[])
if (getuid() == 0) {
struct passwd *pw;

Expand All @@ -85,17 +85,17 @@ index f91a9d693..390928e9e 100644
if (setgroups(1, &pw->pw_gid) == -1 ||
setresgid(pw->pw_gid, pw->pw_gid, pw->pw_gid) == -1 ||
setresuid(pw->pw_uid, pw->pw_uid, pw->pw_uid) == -1)
@@ -1046,7 +1046,8 @@ main(int argc, char *argv[])
@@ -1082,7 +1082,8 @@ main(int argc, char *argv[])
verbose++;
break;
case 'V':
- fprintf(stderr, "rpki-client %s\n", RPKI_VERSION);
+ fprintf(stderr, "rpki-client-portable %s\n",
+ RPKI_VERSION);
return 0;
default:
goto usage;
@@ -1092,7 +1093,7 @@ main(int argc, char *argv[])
case 'x':
experimental = 1;
@@ -1131,7 +1132,7 @@ main(int argc, char *argv[])
if (talsz == 0)
talsz = tal_load_default();
if (talsz == 0)
Expand All @@ -105,5 +105,5 @@ index f91a9d693..390928e9e 100644
/* Load optional constraint files sitting next to the TALs. */
constraints_load();
--
2.42.0
2.45.2

21 changes: 17 additions & 4 deletions patches/0002-Apply-placeholders-for-portability-shim.patch
Original file line number Diff line number Diff line change
@@ -1,7 +1,17 @@
diff --git a/usr.sbin/rpki-client/rpki-client.8 b/usr.sbin/rpki-client/rpki-client.8
index f74d9dceb72..67237c57151 100644
--- a/usr.sbin/rpki-client/rpki-client.8
+++ b/usr.sbin/rpki-client/rpki-client.8
From d697673c11aac273f13b60334a98c8efaf9ab5d0 Mon Sep 17 00:00:00 2001
From: Claudio Jeker <[email protected]>
Date: Mon, 20 Apr 2020 12:16:46 +0200
Subject: [PATCH 2/4] Apply placeholders for portability shim

From Robert Scheck
---
src/usr.sbin/rpki-client/rpki-client.8 | 26 +++++++++++++-------------
1 file changed, 13 insertions(+), 13 deletions(-)

diff --git src/usr.sbin/rpki-client/rpki-client.8 src/usr.sbin/rpki-client/rpki-client.8
index f74d9dceb..67237c571 100644
--- src/usr.sbin/rpki-client/rpki-client.8
+++ src/usr.sbin/rpki-client/rpki-client.8
@@ -45,7 +45,7 @@ The
utility queries the
.Em Resource Public Key Infrastructure Pq RPKI
Expand Down Expand Up @@ -91,3 +101,6 @@ index f74d9dceb72..67237c57151 100644
.Xr bgpd.conf 5
.Sh STANDARDS
.Rs
--
2.45.2

Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
From 60c58baca92fed8a10ca22c6f3a2b8a2f35ae9d3 Mon Sep 17 00:00:00 2001
From f2687537fce37c1fda73eebf926cfd327dbcc7ec Mon Sep 17 00:00:00 2001
From: Claudio Jeker <[email protected]>
Date: Fri, 6 Nov 2020 13:19:45 +0100
Subject: [PATCH 3/4] Emit all output formats on non-OpenBSD systems
Expand All @@ -9,10 +9,10 @@ Subject: [PATCH 3/4] Emit all output formats on non-OpenBSD systems
2 files changed, 4 insertions(+), 3 deletions(-)

diff --git src/usr.sbin/rpki-client/main.c src/usr.sbin/rpki-client/main.c
index 390928e9e..fca51766b 100644
index 6b3c9e4f3..322150a12 100644
--- src/usr.sbin/rpki-client/main.c
+++ src/usr.sbin/rpki-client/main.c
@@ -1085,7 +1085,8 @@ main(int argc, char *argv[])
@@ -1124,7 +1124,8 @@ main(int argc, char *argv[])
if ((outdirfd = open(outputdir, O_RDONLY | O_DIRECTORY)) == -1)
err(1, "output directory %s", outputdir);
if (outformats == 0)
Expand All @@ -23,10 +23,10 @@ index 390928e9e..fca51766b 100644

check_fs_size(cachefd, cachedir);
diff --git src/usr.sbin/rpki-client/rpki-client.8 src/usr.sbin/rpki-client/rpki-client.8
index 014825693..119bc83e2 100644
index 67237c571..13eaea94f 100644
--- src/usr.sbin/rpki-client/rpki-client.8
+++ src/usr.sbin/rpki-client/rpki-client.8
@@ -242,8 +242,8 @@ Defaults to
@@ -247,8 +247,8 @@ Defaults to
By default
.Nm
outputs validated payloads in
Expand All @@ -38,5 +38,5 @@ index 014825693..119bc83e2 100644
.Nm
should be run hourly by
--
2.42.0
2.45.2

Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
From b39b577caf4be22d23d225a4bafdc0b6045fa39b Mon Sep 17 00:00:00 2001
From 95ac765c21c3d792fc45c1c3054480bdbed11bbe Mon Sep 17 00:00:00 2001
From: Claudio Jeker <[email protected]>
Date: Wed, 1 Sep 2021 16:23:36 +0200
Subject: [PATCH 4/4] Only call tls_config_set_ca_mem() when pledge() is used.
Expand All @@ -11,7 +11,7 @@ This is one giant hole but landlock is not capable to do proper protection.
1 file changed, 16 insertions(+)

diff --git src/usr.sbin/rpki-client/http.c src/usr.sbin/rpki-client/http.c
index c460c2056..43dfbed35 100644
index 78ee91e57..02ebf8184 100644
--- src/usr.sbin/rpki-client/http.c
+++ src/usr.sbin/rpki-client/http.c
@@ -64,6 +64,9 @@
Expand All @@ -35,7 +35,7 @@ index c460c2056..43dfbed35 100644

/* HTTP request API */
static void http_req_new(unsigned int, char *, char *, int, int);
@@ -2014,12 +2019,23 @@ http_setup(void)
@@ -2025,12 +2030,23 @@ http_setup(void)
tls_config_error(tls_config));
#endif

Expand All @@ -60,5 +60,5 @@ index c460c2056..43dfbed35 100644
if ((httpproxy = getenv("http_proxy")) != NULL && *httpproxy == '\0')
httpproxy = NULL;
--
2.42.0
2.45.2

0 comments on commit aa77918

Please sign in to comment.