1
0
mirror of https://blitiri.com.ar/repos/chasquid synced 2025-12-17 14:37:02 +00:00
Commit Graph

12 Commits

Author SHA1 Message Date
Alberto Bertogli
15b79d9de9 chasquid-util: Check that we can create the database directory
When creating a database directory, we were missing the check to see if
it had succeeded, which would make issues more difficult to troubleshoot.

This patch adds the missing check.
2020-04-14 12:01:01 +01:00
Alberto Bertogli
929a9947bf chasquid-util: Use docopt.ParseDoc
docopt.Parse is deprecated. This patch updates the code to the newer
variant, ParseDoc, since the default options are what we want.

There are no functional changes.
2020-04-14 12:01:01 +01:00
Thor77
8d910fc84d Add aliases-add subcommand to chasquid-util 2019-10-19 13:06:30 +01:00
Alberto Bertogli
4373f56a82 chasquid-util: Add domaininfo-remove
This patch adds a chasquid-util subcommand to remove a domain
information entry.

The main use case is to manually allow a security level downgrade, after
performing manual verification.
2018-05-24 23:02:57 +01:00
Alberto Bertogli
f3b01cb493 docs: Add missing docstrings, adjust wording to match standard style
This patch adds a missing docstrings for exported identifiers, and
adjust some of the existing ones to match the standard style.

In some cases, the identifiers were un-exported after noticing they had
no external users.

Besides improving documentation, it also reduces the linter noise
significantly.
2018-03-04 16:00:06 +00:00
Alberto Bertogli
bb90274edd test: Add tools to generate test coverage information
This patch adds some tooling and scripts to generate test coverage
information.

Unfortunately, this involves some hacks as Go does not have support for
generating coverage-enabled binaries, or merging coverage reports; but
overall it's not very intrusive.
2018-03-02 19:37:37 +00:00
Alberto Bertogli
c4255933bd chasquid-util: Handle usernames without domain
Usernames must be of the form user@domain. When the domain is missing,
this patch makes chasquid-util emit a friendly error (instead of
crashing).
2017-04-10 19:48:35 +01:00
Alberto Bertogli
170aaaf490 chasquid-util: Create the domain directory when adding a user
When adding a user, chasquid-util should create the domain directory if
it doesn't exist, but currently doesn't do that.

This patch fixes this by adding the missing os.MkdirAll call.

Thanks to Martin Ferrari for the bug report!
2016-11-22 20:25:30 +00:00
Alberto Bertogli
f38ae47164 chasquid-util: Make the commands more user-friendly
This patch changes chasquid-util's subcommands and parameters to
(hopefully) make them more user friendly and intuitive by default.

The changes include defaulting the configuration to /etc/chasquid, and
using full addresses as usernames.

It also adds some shell tests to cover most of the functionality.
2016-10-21 22:20:49 +01:00
Alberto Bertogli
ad25706d72 Normalize local usernames using PRECIS
This patch implements local username normalization using PRECIS
(https://tools.ietf.org/html/rfc7564,
https://tools.ietf.org/html/rfc7613)

It makes chasquid accept local email and authentication regardless of
the case. It covers both userdb and aliases.

Note that non-local usernames remain untouched.
2016-10-10 00:51:05 +01:00
Alberto Bertogli
ce379dea3e chasquid-util: Add a print-config option
This patch adds a print-config option that will parse a config and print it
(in text protobuf format).

It can be used to validate configurations, and see what the effective
configuration is (that is, including the defaults).
2016-10-10 00:51:04 +01:00
Alberto Bertogli
3d06fb3a78 Turn chasquid-userdb into chasquid-util
This patch removes chasquid-userdb and adds a more generic and extensive
chasquid-util, that supports various operations on user databases as well as
aliases lookups.

The code is not very pretty but for now I took a more practical approach, the
tool is ancillary and can be tidied up later.
2016-10-10 00:51:04 +01:00