From 525b2c481fb50853a131455531bb1cdcd80daa17 Mon Sep 17 00:00:00 2001 From: Alberto Leiva Popper Date: Thu, 13 Jun 2019 12:42:22 -0500 Subject: [PATCH] Patch lintian warnings, tweak documentation --- .gitignore | 2 ++ configure.ac | 3 +++ docs/_layouts/default.html | 6 ------ docs/_layouts/home.html | 6 ------ docs/doc/incidence.md | 2 +- docs/doc/installation.md | 2 +- docs/doc/intro-fort.md | 6 ++++-- docs/doc/usage.md | 14 ++++++++------ docs/index.md | 2 +- src/config.c | 7 +++---- src/slurm/slurm_loader.c | 2 +- 11 files changed, 24 insertions(+), 28 deletions(-) diff --git a/.gitignore b/.gitignore index de57b6e0..5ab788a6 100644 --- a/.gitignore +++ b/.gitignore @@ -74,6 +74,8 @@ configure depcomp install-sh missing +src/configure_ac.h +src/stamp-h1 # Packaging *.7z diff --git a/configure.ac b/configure.ac index 68d13f0f..5e370355 100644 --- a/configure.ac +++ b/configure.ac @@ -10,6 +10,9 @@ AM_INIT_AUTOMAKE([subdir-objects]) # Checks for programs. AC_PROG_CC +# Create src/configure_ac.h, put some useful macros there. +AC_CONFIG_HEADERS([src/configure_ac.h]) + # Checks for header files. AC_CHECK_HEADERS([netinet/in.h stdlib.h string.h unistd.h]) diff --git a/docs/_layouts/default.html b/docs/_layouts/default.html index a24d7e45..8260e472 100644 --- a/docs/_layouts/default.html +++ b/docs/_layouts/default.html @@ -57,12 +57,6 @@
-
-
- WARNING Warning: This documentation is still under construction. It's too - succint for comfort still. -
-
{{ content }} diff --git a/docs/_layouts/home.html b/docs/_layouts/home.html index d315e6e6..a94d9fe8 100644 --- a/docs/_layouts/home.html +++ b/docs/_layouts/home.html @@ -57,12 +57,6 @@
-
-
- WARNING Warning: This documentation is still under construction. It's too - succint for comfort still. -
-
{{ content }} diff --git a/docs/doc/incidence.md b/docs/doc/incidence.md index 0c3b3866..91fa9c98 100644 --- a/docs/doc/incidence.md +++ b/docs/doc/incidence.md @@ -15,7 +15,7 @@ title: Incidence ## Introduction -The RPKI RFCs define fairly strict profiles for RPKI objects, and are unequivocal in stating that incorrectly-formed objects are supposed to be rejected by Relying Party validation. In practice, however, this does not stop a significant amount of Certificate Authorities from issuing incorrect objects. +The RPKI RFCs define fairly strict profiles for RPKI objects, and are unequivocal in stating that incorrectly-formed objects are supposed to be rejected by Relying Party validation. In practice, however, this does not prevent a significant amount of Certificate Authorities from issuing incorrect objects. By default, Fort is as pedantic as it can possibly be. The `incidence` section of its configuration file is a means to modify its behavior upon encountering profile violations that, from experience, are often overlooked. diff --git a/docs/doc/installation.md b/docs/doc/installation.md index a5e261a4..5cdbcbb6 100644 --- a/docs/doc/installation.md +++ b/docs/doc/installation.md @@ -46,7 +46,7 @@ wget https://www.dropbox.com/s/7c0rs49ewcu6m93/fort_0.0.1-1_amd64.deb sudo apt install ./libcmscodec1_0.0.1-1_amd64.deb ./fort_0.0.1-1_amd64.deb {% endhighlight %} -Aside from the `fort` binary documented elsewhere in this documentation, the Debian package also ships with a systemd service, which you can [configure](usage.html#--configuration-file) at `/etc/fort/config.json`. +Aside from the `fort` binary documented elsewhere in this documentation, the Debian package also ships with a systemd service, which is just the binary ran as a daemon. You can [configure](usage.html#--configuration-file) it at `/etc/fort/config.json`. {% highlight bash %} sudo service fort start diff --git a/docs/doc/intro-fort.md b/docs/doc/intro-fort.md index 2a1df0de..b32bdbc3 100644 --- a/docs/doc/intro-fort.md +++ b/docs/doc/intro-fort.md @@ -62,5 +62,7 @@ RRDP is a protocol intended to replace RSYNC in the RPKI. Fort only implements R ## TO-DO -- Reach full 100% RFC compliance. -- Maybe a few optimizations, marked as `TODO` in the code. +- Reach 100% RFC compliance +- Multithreading +- Daemon quirks (stuff like "send self to background automatically"), maybe +- More languages? diff --git a/docs/doc/usage.md b/docs/doc/usage.md index ee92acf7..98ac0cf1 100644 --- a/docs/doc/usage.md +++ b/docs/doc/usage.md @@ -127,7 +127,7 @@ Prints program version. {% highlight bash %} $ {{ page.command }} --version -0.0.1-beta +fort 0.0.1 {% endhighlight %} ### `--tal` @@ -141,7 +141,9 @@ A TAL is a file that points to a _Trust Anchor_ (TA). A TA is a self-signed cert The reason why you provide locators instead of anchors is to allow the latter to be officially updated without the need to awkwardly redistribute them. -Whichever registry serves as root of the tree you want to validate is responsible for providing you with its TAL. For convenience, Fort currently ships with the TALs of four of the five RIRs. (The exception is ARIN's, since you need to read and accept an [agreement](https://www.arin.net/resources/manage/rpki/tal/) before you can use it.) If you are paranoid, however, you'd be advised to get your own. +Whichever registry serves as root of the tree you want to validate is responsible for providing you with its TAL. For convenience, Fort currently ships with the TALs of four of the five RIRs. (The exception is ARIN's, since you need to read and accept an [agreement](https://www.arin.net/resources/manage/rpki/tal/) before you can use it.) If you installed the Debian package, they can be found at `/etc/fort/tal/`, otherwise it the `tal/` directory of whatever release tarball you downloaded. + +If you are paranoid, however, you'd be advised to get your own TALs. The TAL file format has been standardized in [RFC 7730](https://tools.ietf.org/html/rfc7730). It is a text file that contains a list of URLs (which serve as alternate access methods for the TA), followed by a blank line, followed by the Base64-encoded public key of the TA. @@ -167,7 +169,7 @@ LQIDAQAB Path to the directory where Fort will store a local cache of the repository. -Right now, Fort accesses RPKI repositories by way of [rsync](https://en.wikipedia.org/wiki/Rsync). (The alternate protocol [RRDP](https://tools.ietf.org/html/rfc8182) is in the road map.) During each validation cycle, Fort will literally invoke an `rsync` command (see [`rsync.program`](#rsyncprogram) and [`rsync.arguments-recursive`](#rsyncarguments-recursive)), which will download the files into `--local-repository`. Fort's validation operates on the resulting copy. +Right now, Fort accesses RPKI repositories by way of [rsync](https://en.wikipedia.org/wiki/Rsync). (The alternate protocol [RRDP](https://tools.ietf.org/html/rfc8182) is in the road map.) During each validation cycle, Fort will literally invoke an `rsync` command (see [`rsync.program`](#rsyncprogram) and [`rsync.arguments-recursive`](#rsyncarguments-recursive)), which will download the files into `--local-repository`. Fort's entire validation process operates on the resulting copy. Because rsync uses delta encoding, you're advised to keep this cache around. It significantly speeds up subsequent validation cycles. @@ -249,7 +251,7 @@ Fort's tree traversal is actually iterative (not recursive), so there should be Disable the RTR server. -If the flag is set, the server is disabled, the rest of the `server.*` arguments are discarded, and Fort performs an in-place standalone RPKI validation. +If the flag is set, the server is disabled, the rest of the `server.*` arguments are ignored, and Fort performs an in-place standalone RPKI validation. ### `--server.address` @@ -269,7 +271,7 @@ If this field is omitted, Fort will attempt to bind the server using the IP addr TCP port or service the server will be bound to. -This is a string because a service alias can be used as a valid value. The alias are commonly located at `/etc/services`. (See '`$ man services`'.) +This is a string because a service alias can be used as a valid value. The available aliases are commonly located at `/etc/services`. (See '`$ man services`'.) > ![../img/warn.svg](../img/warn.svg) The default port is privileged. To improve security, either change or jail it. @@ -280,7 +282,7 @@ This is a string because a service alias can be used as a valid value. The alias - **Default:** [`SOMAXCONN`](http://pubs.opengroup.org/onlinepubs/9699919799.2008edition/basedefs/sys_socket.h.html) - **Range:** 1--`SOMAXCONN` -RTR server's listen queue length. It's the second argument of [`listen()`](http://pubs.opengroup.org/onlinepubs/9699919799.2008edition/functions/listen.html): +RTR server's listen queue length. It is the second argument of [`listen()`](http://pubs.opengroup.org/onlinepubs/9699919799.2008edition/functions/listen.html): > The backlog argument provides a hint to the implementation which the implementation shall use to limit the number of outstanding connections in the socket's listen queue. Implementations may impose a limit on backlog and silently reduce the specified value. Normally, a larger backlog argument value shall result in a larger or equal length of the listen queue. Implementations shall support values of backlog up to SOMAXCONN, defined in . diff --git a/docs/index.md b/docs/index.md index 0037a55e..a3d70661 100644 --- a/docs/index.md +++ b/docs/index.md @@ -11,4 +11,4 @@ The documentation can be found [here](doc/index.html). ## Status -The first release of Fort is planned to be released later this month. +Fort is currently in beta. Testing is underway. diff --git a/src/config.c b/src/config.c index fe253e11..3198944f 100644 --- a/src/config.c +++ b/src/config.c @@ -8,6 +8,7 @@ #include #include "common.h" +#include "configure_ac.h" #include "json_handler.h" #include "log.h" #include "config/boolean.h" @@ -342,7 +343,7 @@ handle_usage(struct option_field const *field, char *arg) static int handle_version(struct option_field const *field, char *arg) { - printf("0.0.1-beta\n"); + printf(PACKAGE_STRING "\n"); exit(0); } @@ -657,9 +658,7 @@ config_get_server_port(void) int config_get_server_queue(void) { - /* - * The range of this is 1-, so adding signedness is safe. - */ + /* The range of this is 1-, so adding sign is safe. */ return rpki_config.server.backlog; } diff --git a/src/slurm/slurm_loader.c b/src/slurm/slurm_loader.c index 9b504d6f..8b089b4e 100644 --- a/src/slurm/slurm_loader.c +++ b/src/slurm/slurm_loader.c @@ -72,7 +72,7 @@ slurm_pfx_assertions_add(struct slurm_prefix *prefix, void *arg) vrp.max_prefix_length); } - pr_crit("Unkown addr family type: %u", vrp.addr_fam); + pr_crit("Unknown addr family type: %u", vrp.addr_fam); } static int -- 2.47.3