Last commit was done from a non-clean tree. Revert one line that broke
authorclaudio <claudio@openbsd.org>
Thu, 4 Mar 2021 15:35:39 +0000 (15:35 +0000)
committerclaudio <claudio@openbsd.org>
Thu, 4 Mar 2021 15:35:39 +0000 (15:35 +0000)
everything. Oups.

usr.sbin/rpki-client/main.c

index 3187627..d99676f 100644 (file)
@@ -1,4 +1,4 @@
-/*     $OpenBSD: main.c,v 1.112 2021/03/04 14:24:17 claudio Exp $ */
+/*     $OpenBSD: main.c,v 1.113 2021/03/04 15:35:39 claudio Exp $ */
 /*
  * Copyright (c) 2019 Kristaps Dzonsons <kristaps@bsd.lv>
  *
@@ -446,7 +446,7 @@ repo_lookup(const char *uri)
        rp = repo_alloc();
        rp->repouri = repo;
        local = strchr(repo, ':') + strlen("://");
-       if ((rp->local = strdup(repo)) == NULL)
+       if (asprintf(&rp->local, "rsync/%s", local) == -1)
                err(1, NULL);
        if ((rp->uris[0] = strdup(repo)) == NULL)
                err(1, NULL);