chiark / gitweb /
9 years agoMake `tripe' be the default key type.
Mark Wooding [Mon, 19 Apr 2010 21:00:59 +0000 (22:00 +0100)]
Make `tripe' be the default key type.

Rather than using the key type to tell us which key-exchange group type
to use, read it out of an attribute on the key.  This makes the whole
finding keys thing much simpler to explain (although the code becomes
slightly more complicated).  Fall back to the old behaviour of parsing
the group type out of the key type if there's no attribute.

Reorganize the tripe(8) manual page somewhat.  Remove the tutorial-ish
part, which is now out of place and not very useful; there's a proper
Texinfo manual coming soon.

9 years agoBuild: Kill $(mkdir_p); use $(MKDIR_P).
Mark Wooding [Mon, 19 Apr 2010 21:00:59 +0000 (22:00 +0100)]
Build: Kill $(mkdir_p); use $(MKDIR_P).

Remove definition from; use MKDIR_P in Makefiles.

9 years agoserver/tun-slip.c: Pass correct stdout to child process.
Mark Wooding [Mon, 19 Apr 2010 21:41:50 +0000 (22:41 +0100)]
server/tun-slip.c: Pass correct stdout to child process.

Botched when introducing mdup in b9537f3be...

9 years agotripemon: Major reworking to use new module and coroutines.
Mark Wooding [Fri, 5 Jun 2009 15:13:16 +0000 (16:13 +0100)]
tripemon: Major reworking to use new module and coroutines.

The old version was a bit of a crock, really.  This one's slightly
shorter, as well as probably being easier to maintain (which is
surprising, given the brain-wrenching nature of the flow control).

9 years agosvc: Peer management services.
Mark Wooding [Mon, 19 Apr 2010 20:11:05 +0000 (21:11 +0100)]
svc: Peer management services.

  * connect arranges to connect to named peers, and respond to incoming

  * watch detects newly added peers, and configures interfaces and makes
    outgoing connections accordingly.

Also update the init script so as to start services found in

9 years agoinit: Introduce the peer database.
Mark Wooding [Mon, 19 Apr 2010 20:11:04 +0000 (21:11 +0100)]
init: Introduce the peer database.

Our services will require information about the various possible peers.
This is held in a CDB file with an open-ended format, and constructed
from a text database by a Python utility tripe-newpeers.

This stuff doesn't yet have a Debian package to live in.  That will
appear in a few patches' time.

9 years agopy: New Python module for writing services and suchlike
Mark Wooding [Mon, 19 Apr 2010 20:11:04 +0000 (21:11 +0100)]
py: New Python module for writing services and suchlike

Also rmcr: coroutines in terms of threads.

Other changes:

  * The new module uses Python 2.4 features, so make sure we have that

9 years agodoc/tripe-service.5: New manpage describing service providers.
Mark Wooding [Mon, 19 Apr 2010 20:11:04 +0000 (21:11 +0100)]
doc/tripe-service.5: New manpage describing service providers.

General command-line and documentation conventions, that sort of thing.

9 years agoserver/ Change `recognise' to `recognize' etc.
Mark Wooding [Sun, 20 Dec 2009 23:15:13 +0000 (23:15 +0000)]
server/ Change `recognise' to `recognize' etc.

Oxford spellings, you know.

9 years agoserver/ Document `unknown-jobid' error code.
Mark Wooding [Sun, 20 Dec 2009 23:13:44 +0000 (23:13 +0000)]
server/ Document `unknown-jobid' error code.

Not quite sure how come this was omitted in the first place.

9 years agoserver/ Some typo fixes.
Mark Wooding [Sun, 20 Dec 2009 23:11:35 +0000 (23:11 +0000)]
server/ Some typo fixes.

10 years agoUse new mdup(3mLib) function.
Mark Wooding [Sun, 4 Jan 2009 17:48:43 +0000 (17:48 +0000)]
Use new mdup(3mLib) function.

It makes descriptor juggling much more reliable.  Increase version
requirement on mLib to 2.1.0.

10 years agopathmtu: Reset the timeout on each packet.
Mark Wooding [Sat, 3 Jan 2009 20:35:29 +0000 (20:35 +0000)]
pathmtu: Reset the timeout on each packet.

Linux actually has the correct behaviour and updates the timeout
argument to reflect the time remaining.  Unfortunately we don't actually
want to do that.  So reset it each time.

10 years agoBuild: Fix construction of manual pages.
Mark Wooding [Tue, 30 Dec 2008 15:01:50 +0000 (15:01 +0000)]
Build: Fix construction of manual pages.

Firstly, there was a bug in the suffix rule used to construct
manpages was broken because suffix rules aren't allowed to have
dependencies of their own.  So purge (we now just have and confsubst the entire manpage each time.

Secondly, in preparation for new manpages for services, consolidate the
summary-building machinery into  The server makefile no longer
needs a special case for tripe-admin.8.

To keep things tidy, and make-summary have been stashed in
common.  This seems as good a place as any.

10 years agokeys: Fix defaults and documentation.
Mark Wooding [Thu, 1 Jan 2009 23:49:29 +0000 (23:49 +0000)]
keys: Fix defaults and documentation.

A small number of related changes.

  * Make the default encryption algorithm be Rijndael (AES) rather than
    Blowfish.  I think this is now the right recommendation to make,
    even if it's not my personal taste.  (I'm actually using Twofish
    nowadays anyway.)

  * Make the default field size for Schnorr groups be 3072 bits rather
    than 2048, which reflects the advice given by NIST and IEEE 1363.

  * Reformat the tripe-keys.master file in line with current thinking.

  * Fix a minor typo in

10 years agomaint-utils/keysubst: A monstrously unpleasant sed hack.
Mark Wooding [Thu, 1 Jan 2009 17:21:59 +0000 (17:21 +0000)]
maint-utils/keysubst: A monstrously unpleasant sed hack.

This parses tripe-admin(5)-format key/value pairs and converts them into
sh(1)-style variable assignments, which can be interpreted using the
eval builtin.

10 years agoserver/tripe-admin.5: Describe the quoting convention.
Mark Wooding [Wed, 31 Dec 2008 13:19:09 +0000 (13:19 +0000)]
server/tripe-admin.5: Describe the quoting convention.

Even though the admin interface has handled quoted arguments on input,
and became careful about quoting results in f43df81, the convention
has never been documented.  Fix this appalling lapse!

10 years agoManpages: Fix substitutions.
Mark Wooding [Tue, 30 Dec 2008 01:19:07 +0000 (01:19 +0000)]
Manpages: Fix substitutions.

The manfix utility in fc916a0942e6ef8f63aefb96119d0e4fd7c7efbb botched
all the \*(/x splats, with the result that they were left them in the
final output.

10 years agopriv: Fix build.
Mark Wooding [Mon, 29 Dec 2008 21:54:42 +0000 (21:54 +0000)]
priv: Fix build.

This fixes a logical conflict between the privilege separation branch
and commit 7bd7331ea55fc27573035d343fe949cc15fa9047.

10 years agoMerge branch 'privsep'
Mark Wooding [Tue, 30 Dec 2008 14:51:07 +0000 (14:51 +0000)]
Merge branch 'privsep'

* privsep:
  server: Introduce privilege separation.
  server: Zap spurious space output by a_vformat.
  server: Make a_vformat public.
  server: Set admin socket permissions to match user.
  client: Capture server stderr and send it to the logfile.
  client: Better logging infrastructure.
  client: Clean up variable declarations.
  client: New options for setting user and group identities.
  client: Function for inserting arguments.
  peer, tunnels: New file-descriptor opening interface.



10 years agoMerge branch 'public'
Mark Wooding [Tue, 30 Dec 2008 14:50:50 +0000 (14:50 +0000)]
Merge branch 'public'

* public:
  pathmtu: New program for determining the MTU to a host.
  server/admin: New ALGS command.
  Build: Explicitly link against mLib or catacomb.
  tripe-keys: Add a subcommand to print the correct tunnel MTU.
  client/tripectl.c: Fix format string bug in tripectl.
  init/ Switch install-hook to install-data-hook. Use AM_PATH_GLIB_2_0.

10 years agopathmtu: New program for determining the MTU to a host.
Mark Wooding [Mon, 29 Dec 2008 19:37:17 +0000 (19:37 +0000)]
pathmtu: New program for determining the MTU to a host.

Eventually, this will be used automatically when configuring network

10 years agoserver: Introduce privilege separation.
Mark Wooding [Mon, 29 Dec 2008 20:07:04 +0000 (20:07 +0000)]
server: Introduce privilege separation.

During initialization, we fork off a child which retains its root
privileges, and maintain communication with it via a Unix-domain socket
pair.  To open a new tunnel, we send it a request and it responds by
passing back the appropriate file descriptor.

The helper process running as root is implemented in a separate program,
tripe-privhelper.  This is done (a) to reduce memory use, (b) to trigger
close-on-exec behaviour and (c) to provide a clear boundary in the
source code for the parts which still run with superuser privileges.

This entails moving our tunnel-open functions into a separate program,
and doing the necessary build-system hacking.  The changes to existing
code aren't as invasive as they at first appear.

10 years agoserver: Zap spurious space output by a_vformat.
Mark Wooding [Sat, 20 Dec 2008 17:06:11 +0000 (17:06 +0000)]
server: Zap spurious space output by a_vformat.

10 years agoserver: Make a_vformat public.
Mark Wooding [Sat, 20 Dec 2008 17:06:11 +0000 (17:06 +0000)]
server: Make a_vformat public.

We'll need it soon enough.

10 years agoserver: Set admin socket permissions to match user.
Mark Wooding [Sat, 20 Dec 2008 17:06:11 +0000 (17:06 +0000)]
server: Set admin socket permissions to match user.

We create the socket before dropping privileges so that we can create it
somewhere we might not be able to write to later.  This change will make
it possible for other processes running with reduced privilege to
connect and issue administration requests.

10 years agoclient: Capture server stderr and send it to the logfile.
Mark Wooding [Sat, 20 Dec 2008 17:06:11 +0000 (17:06 +0000)]
client: Capture server stderr and send it to the logfile.

10 years agoserver/admin: New ALGS command.
Mark Wooding [Mon, 29 Dec 2008 17:52:32 +0000 (17:52 +0000)]
server/admin: New ALGS command.

Returns information about crypto algorithms in use.  Can be used to
compute MTUs, for example.

10 years agoBuild: Explicitly link against mLib or catacomb.
Mark Wooding [Mon, 29 Dec 2008 10:21:35 +0000 (10:21 +0000)]
Build: Explicitly link against mLib or catacomb.

This avoids an ugly double-link in the server.  Doesn't make anything
actually work better, though.

10 years agotripe-keys: Add a subcommand to print the correct tunnel MTU.
Mark Wooding [Wed, 24 Dec 2008 23:29:15 +0000 (23:29 +0000)]
tripe-keys: Add a subcommand to print the correct tunnel MTU.

This probably isn't the right place for it, but it was easy.  The right
thing to do is to add path-MTU discovery to the server, but that will
get really messy.

10 years agopkstream/pkstream.1: Rename `fw' to `fwd'.
Mark Wooding [Tue, 23 Dec 2008 01:19:08 +0000 (01:19 +0000)]
pkstream/pkstream.1: Rename `fw' to `fwd'.

This happened a while ago, but I was too stupid to notice.

10 years agoclient/tripectl.c: Fix format string bug in tripectl.
Mark Wooding [Tue, 23 Dec 2008 00:55:29 +0000 (00:55 +0000)]
client/tripectl.c: Fix format string bug in tripectl.

OK, I'm seriously embarrassed about this one.

10 years agoinit/ Switch install-hook to install-data-hook.
Mark Wooding [Tue, 23 Dec 2008 00:54:45 +0000 (00:54 +0000)]
init/ Switch install-hook to install-data-hook.

Automake 10 is even pettier!

10 years Use AM_PATH_GLIB_2_0.
Mark Wooding [Tue, 23 Dec 2008 00:54:12 +0000 (00:54 +0000)] Use AM_PATH_GLIB_2_0.

Duh.  I'm impressed it worked, really.

10 years agobuild: Use new separate auto-version tool.
Mark Wooding [Sun, 21 Dec 2008 20:23:55 +0000 (20:23 +0000)]
build: Use new separate auto-version tool.

10 years agoclient: Better logging infrastructure.
Mark Wooding [Sat, 20 Dec 2008 17:06:11 +0000 (17:06 +0000)]
client: Better logging infrastructure.

Logging is currently done in a rather ad-hoc fashion.  This wants
tidying up.

10 years agoclient: Clean up variable declarations.
Mark Wooding [Sat, 20 Dec 2008 17:06:11 +0000 (17:06 +0000)]
client: Clean up variable declarations.

The current code for main is somewhat messy, with inner blocks for
declaring variables in.  We actually need some of these variables to
have wider scopes now, so it makes sense to just lift them out to

In particular, we promote the main sel_state to a static, and the
sel_files to top-level in main.

10 years agoclient: New options for setting user and group identities.
Mark Wooding [Sat, 20 Dec 2008 17:06:10 +0000 (17:06 +0000)]
client: New options for setting user and group identities.

10 years agoclient: Function for inserting arguments.
Mark Wooding [Sat, 20 Dec 2008 17:06:10 +0000 (17:06 +0000)]
client: Function for inserting arguments.

We will shortly need fancier formatting than previously.

10 years agopeer, tunnels: New file-descriptor opening interface.
Mark Wooding [Sat, 20 Dec 2008 17:06:10 +0000 (17:06 +0000)]
peer, tunnels: New file-descriptor opening interface.

Separate initializing tunnel devices into distinct stages of obtaining
an appropriate file descriptor, and configuring it and plumbing it into
the select loop.  Alas, this reduces the quality of error reporting when
tunnel acquisition fails.

This is a preliminary stage to implementing privilege separation in the
TrIPE server.

10 years agoserver/keyset.c, server/keymgmt.c: Variable data limits.
Mark Wooding [Sat, 20 Dec 2008 11:39:33 +0000 (11:39 +0000)]
server/keyset.c, server/keymgmt.c: Variable data limits.

The old static data volume limit isn't acceptable when trying to keep up
with LANs (e.g., wireless LANs) or other fast networks.  This change
configures a variable volume limit based on the width of the underlying
block cipher.  (That means it doesn't do anything sensible with stream
ciphers, but as currently implemented in Catacomb they're a bad idea

10 years agoserver/peer.c, server/keyset.c: Fix key renegotiation behaviour.
Mark Wooding [Sat, 20 Dec 2008 11:39:33 +0000 (11:39 +0000)]
server/peer.c, server/keyset.c: Fix key renegotiation behaviour.

The existing behaviour is just wrong.  Whenever an encryption fails, the
key exchange gets kicked politely.  If the challenge is still valid,
this does nothing very useful, so fix it so that it forces a new
challenge.  If there are no keys left at all, this results in a
pointless flood of key-exchange packets.

This change introduces error codes for the ks_* and ksl_* functions, so
that callers can work out what's wrong.  (This isn't strictly necessary:
there was enough information before, but it wasn't a good idea.)  I took
the opportunity to improve the header comments on the ks_* and ksl_*

It also changes peer.c to distinguish between the various cases.  This
change provides new peer-level convenience functions for doing the
symmetric crypto, which reduces the amount of duplicated code lying

10 years agoserver/keyexch.c: Lower the validity time for a challenge.
Mark Wooding [Sat, 20 Dec 2008 11:39:33 +0000 (11:39 +0000)]
server/keyexch.c: Lower the validity time for a challenge.

If the server is busy dealing with LAN-speed traffic, it can easily
exhaust the 32 MB data limit within the 2 minutes allowed.  The result
of this is that another switch or switch-ok gets sent and ignored, and
no new keys are negotiated.  The only thing to do is lower the validity
time.  One key-exchange every 20 seconds isn't going to break the bank.

10 years agouslip: New options for flooding tripe.
Mark Wooding [Sat, 20 Dec 2008 11:39:32 +0000 (11:39 +0000)]
uslip: New options for flooding tripe.

I have a bug to hunt which manifests under heavy load.

10 years agouslip: Associate a done-function with gobblers.
Mark Wooding [Sat, 20 Dec 2008 11:39:32 +0000 (11:39 +0000)]
uslip: Associate a done-function with gobblers.

These work just like the dribbler done-functions.  We're going to need
this soon.

10 years agouslip: Don't let gobblers leak file descriptors.
Mark Wooding [Sat, 20 Dec 2008 11:39:32 +0000 (11:39 +0000)]
uslip: Don't let gobblers leak file descriptors.

The otherwise aptly-named gobbler_close function neglected to actually
close its file descriptor.

10 years agouslip: Fix SLIP escape handling.
Mark Wooding [Sat, 20 Dec 2008 11:39:32 +0000 (11:39 +0000)]
uslip: Fix SLIP escape handling.

In particular, do_slip_in failed to leave ESC mode having handled the
escaped character.

10 years agoserver/admin: Fix client destruction some more.
Mark Wooding [Sun, 14 Dec 2008 22:03:21 +0000 (22:03 +0000)]
server/admin: Fix client destruction some more.

It's possible that finally destroying a client can kill others.  For
example, if the second client (a) has sent EOF, and (b) has a background
command outstanding with the first; then when the first sends EOF, the
second gets taken down too.

Unfortunately, what actually happens in this case is that the newly
defunct clients get put on the dead list -- and then ignored because the
dead list is silently killed at the end of a_destroypending.  Fix by
clearing the list at the top of a_destroypending, and doing the whole
job repeatedly until there are no more cascades.

The change is mostly indenting a loop: it looks less scary with -b.

10 years agoserver/keyexch: Store check-value key hash in the right place.
Mark Wooding [Sun, 14 Dec 2008 04:20:30 +0000 (04:20 +0000)]
server/keyexch: Store check-value key hash in the right place.

Another botch from de7bd20be1c41f8f70e98ab498ffb4a82800a9d8.  The
respond function stashes a hash of the peer's check value so we can
recognize it again without having to verify it fully.  Unfortunately, it
stashes it in the wrong slot, so (a) it gets overwritten immediately
afterwards, and (b) the code which actually tries to do the checking
finds some rubbish instead.

The most prominent symptom of this bug under normal circumstances is a
large number of bad-expected-reply-log warnings in the log file.  What
happens is that, after a successful key exchange, the two peers end up
quite precisely synchronized -- so much so, indeed, that they're very
likely to run the entire key exchange protocol truly simultaneously.  As
a result, we have to process both a full challenge and a reply, both of
which contain a check field.  The second time, this fails because of the
bug.  This continues until the two fall out of lock-step with each

10 years agoserver/keyexch: Fix message name table in trace output.
Mark Wooding [Sun, 14 Dec 2008 04:14:54 +0000 (04:14 +0000)]
server/keyexch: Fix message name table in trace output.

In de7bd20be1c41f8f70e98ab498ffb4a82800a9d8, I removed the pre-challenge
message in order to streamline the protocol.  Unfortunately, I forgot to
update the pkname table which maps message numbers to human-readable
name strings, which makes decoding trace messages rather difficult.

10 years agomaint-utils: Handy script to make the `bleeding' branch.
Mark Wooding [Sat, 13 Dec 2008 17:54:51 +0000 (17:54 +0000)]
maint-utils: Handy script to make the `bleeding' branch.

10 years agoserver/admin: Brown-paper-bag fix.
Mark Wooding [Mon, 8 Dec 2008 20:14:24 +0000 (20:14 +0000)]
server/admin: Brown-paper-bag fix.

Commit 165efde7 changed a_resolve to not require a port number.
Unfortunately, I botched it and wrote a test for av[i + 1] as
av[i + i].  Result with i = 0: very different.

While investigating this bug, I became nervous about the number of
is-av[i]-null tests going on when str_qsplit doesn't actually guarantee
to leave a null terminator behind if it uses all the array slots.  So
I've allocated an extra slot and zeroed it explicitly.

10 years agoinit/tripe-init: Pass correct options for setting the user and group.
Mark Wooding [Mon, 8 Dec 2008 13:56:19 +0000 (13:56 +0000)]
init/tripe-init: Pass correct options for setting the user and group.

They're capitals, -U and -G, not -u and -g.

10 years Actually apply PACKAGE and VERSION substitutions.
Mark Wooding [Mon, 8 Dec 2008 13:35:55 +0000 (13:35 +0000)] Actually apply PACKAGE and VERSION substitutions.

How embarrassing to have forgotten this!

10 years agoserver: Test script.
Mark Wooding [Mon, 8 Dec 2008 12:11:28 +0000 (12:11 +0000)]
server: Test script.

10 years agoserver: Option `-F' to run the server in the `foreground'.
Mark Wooding [Mon, 8 Dec 2008 12:11:28 +0000 (12:11 +0000)]
server: Option `-F' to run the server in the `foreground'.

This means that the server will quit when it sees EOF on standard
input.  Useful for testing, since it means that your processes aren't
going to continue running after you let them off the leash.

Also make tripectl pass `-F' to a tripe that it's starting up so that it
won't continue without (say) logging.

10 years agoserver: Actually recognize -n on the command line.
Mark Wooding [Mon, 8 Dec 2008 12:11:28 +0000 (12:11 +0000)]
server: Actually recognize -n on the command line.

For some reason this got missed out of the short-options list.  I've now
eyeballed the long- and short-options lists and checked that there
aren't any other missing entries.

10 years agoserver: Introduce another temporary buffer for debugging output.
Mark Wooding [Mon, 8 Dec 2008 12:11:28 +0000 (12:11 +0000)]
server: Introduce another temporary buffer for debugging output.

Debugging output trashed important things like hashes in buf_t.
Introduce a new buf_u and use that in functions like mpstr and gestr.

10 years agouslip: New program providing a fake SLIP interface.
Mark Wooding [Mon, 8 Dec 2008 12:11:20 +0000 (12:11 +0000)]
uslip: New program providing a fake SLIP interface.

This is useful for doing testing on a single machine.  We'll work out
how to test the system-specific tunnel drivers later, but that really
will need multiple machines.

10 years agoserver, common: New header slip.h contains definitions for SLIP.
Mark Wooding [Mon, 8 Dec 2008 12:10:40 +0000 (12:10 +0000)]
server, common: New header slip.h contains definitions for SLIP.

This will be needed by another program as well.

10 years agokeys: Add test script.
Mark Wooding [Mon, 8 Dec 2008 12:10:39 +0000 (12:10 +0000)]
keys: Add test script.

I've recently found a number of bugs in this area, so it's probably
worth writing a test script to make sure they stay dead.

This wouldn't be complete without some edits to the tripe-keys script,
so (a) make it executable in the build tree, and (b) flush output before
running subprocesses so that the output appears in the correct order
even when it's redirected to a file.

10 years agoAdd testing infrastructure.
Mark Wooding [Mon, 8 Dec 2008 12:10:39 +0000 (12:10 +0000)]
Add testing infrastructure.

10 years agoinfra: Ignore log files.
Mark Wooding [Mon, 8 Dec 2008 12:09:43 +0000 (12:09 +0000)]
infra: Ignore log files.

Debhelper seems to have started leaving these log files behind, which
may be useful but they certainly have no business upsetting Git.

10 years agoserver, common: Split more code into utilities.
Mark Wooding [Mon, 8 Dec 2008 12:00:14 +0000 (12:00 +0000)]
server, common: Split more code into utilities.

  * Move mystrieq to server/servutil.c where it belongs.

  * Move code to resolve user and group names, and to set user and
    group, into common/util.c where the client can get at it.  (This
    will eventually be useful for privilege separation.)

10 years agoVarious minor cleanups.
Mark Wooding [Mon, 8 Dec 2008 10:41:08 +0000 (10:41 +0000)]
Various minor cleanups.

  * Spacing fix in server/peer.c.

  * Minor reformatting in tunnel drivers and client.

  * Remove bogus declaration for long-dead u_daemon in common/util.h.

  * Reformatting of client/tripectl.c.

10 years agotripe.h: Make job index be unsigned int, not unsigned short.
Mark Wooding [Mon, 8 Dec 2008 10:41:08 +0000 (10:41 +0000)]
tripe.h: Make job index be unsigned int, not unsigned short.

This is mainly (a) because we don't actually save space by using a
short, and (b) because it shuts up a compiler warning.

The warning is annoying.  The compiler complains that it has proven that
an assertion is always true.  Of course, it's nice when it can prove my
assertions, but they're /meant/ to be provably true!

This particular instance is particularly annoying, since it's only
/trivially/ true in the sense the compiler is warning about as a result
of a coincidence of data-type ranges, which may not hold on other
architectures -- on which the assertion is nontrivial but still


10 years agoserver/peer: Use hash tables to find peer records.
Mark Wooding [Mon, 8 Dec 2008 10:11:57 +0000 (10:11 +0000)]
server/peer: Use hash tables to find peer records.

10 years Trivial whitespace fixes.
Mark Wooding [Mon, 8 Dec 2008 10:10:51 +0000 (10:10 +0000)] Trivial whitespace fixes.

Pesky spaces sneaking in before tabs.

10 years agopython: Replace sre by plain re.
Mark Wooding [Mon, 8 Dec 2008 02:22:23 +0000 (02:22 +0000)]
python: Replace sre by plain re.

Annoyingly, Python 2.4 documentation suggests that sre is the right
module to use.

10 years agodebian: Don't depend on sysvinit.
Mark Wooding [Mon, 8 Dec 2008 01:18:17 +0000 (01:18 +0000)]
debian: Don't depend on sysvinit.

It seems that this is bad form.  Nobody else does it, and it stops the
package working on Ubuntu.

11 years agokeys: Reformat in line with my newer commenting conventions.
Mark Wooding [Sat, 5 Apr 2008 12:27:13 +0000 (13:27 +0100)]
keys: Reformat in line with my newer commenting conventions.

11 years agoOverhaul manual pages.
Mark Wooding [Sat, 5 Apr 2008 12:26:24 +0000 (13:26 +0100)]
Overhaul manual pages.

Make the source code look prettier, and attach copyright notices to them

11 years agotripe-keys.conf.5: Description of sig-url shouldn't be circular!
Mark Wooding [Sat, 5 Apr 2008 12:25:14 +0000 (13:25 +0100)]
tripe-keys.conf.5: Description of sig-url shouldn't be circular!

Just a typo.

11 years agotripe-keys: Don't hard-code the `-l' flag when generating master keys.
Mark Wooding [Sat, 5 Apr 2008 12:24:40 +0000 (13:24 +0100)]
tripe-keys: Don't hard-code the `-l' flag when generating master keys.

It makes automated testing painful.  Instead, provide a configuration
parameter master-keygen-flags which defaults to -l but can be overridden
by people who know what they're doing.

11 years agotripe-keys: Provide upload-hook for more complicated publishing.
Mark Wooding [Sat, 5 Apr 2008 12:23:21 +0000 (13:23 +0100)]
tripe-keys: Provide upload-hook for more complicated publishing.

The existing arrangement of writing the updated files to a local directory
are satisfactory for simple situations, but it's not actually desirable
to handle sensitive cryptographic keys (e.g., the TrIPE master key!) on
the same machine as a public-facing web server.

The upload-hook can contain an arbitrary shell-command, though it'll
typically be an invocation of rsync or similar.

11 years agotripe-keys: Fix iteration over keyring.
Mark Wooding [Sat, 5 Apr 2008 12:19:35 +0000 (13:19 +0100)]
tripe-keys: Fix iteration over keyring.

In catacomb-python 426e898f..., KeyFile was changed to iterate over
key-ids rather than keys, for consistency with other mapping objects.
This means that we need to use itervalues explicitly now.

11 years agoBuild system overhaul to conform to new standards.
Mark Wooding [Wed, 19 Mar 2008 00:44:06 +0000 (00:44 +0000)]
Build system overhaul to conform to new standards.

  * Rename to, and rewrite using modern
    Autoconf macros.

  * Rewrite the Makefiles to be cleaner and more readable, using
    Automake conditionals and appending.

  * Move the manpages to live with their respective code components
    rather than languishing in their own subdirectory.

  * Switch the Debian build process over to using CDBS.

11 years agodoc/tripe.8: Fix layout of synopsis section.
Mark Wooding [Wed, 19 Mar 2008 12:56:40 +0000 (12:56 +0000)]
doc/tripe.8: Fix layout of synopsis section.

Something got upset by the whitespace stripping, I think.

11 years agoserver: Add a peer without sending key-exchange packets.
Mark Wooding [Tue, 18 Mar 2008 20:21:11 +0000 (20:21 +0000)]
server: Add a peer without sending key-exchange packets.

When contacting a passive peer, the initial pre-challenge will cause the
peer to complain about an unsolicited packet.  The -cork option to ADD
makes the new peer silent until contacted by the (presumably awoken)
passive peer.

11 years agoProvide a pkg-config file for use by separately compiled services.
Mark Wooding [Tue, 18 Mar 2008 20:21:02 +0000 (20:21 +0000)]
Provide a pkg-config file for use by separately compiled services.

11 years agodebian: Pre-emptive reorganization.
Mark Wooding [Tue, 18 Mar 2008 20:21:02 +0000 (20:21 +0000)]
debian: Pre-emptive reorganization.

Use dh_install to install things into the correct packages.  It's
getting too cumbersome to do all this by hand.

11 years agoRemove crufty old CVS $Id$ markers.
Mark Wooding [Tue, 18 Mar 2008 20:21:02 +0000 (20:21 +0000)]
Remove crufty old CVS $Id$ markers.

11 years agoInfrastructure: Get it building again, using pkg-config.
Mark Wooding [Tue, 18 Mar 2008 00:30:42 +0000 (00:30 +0000)]
Infrastructure: Get it building again, using pkg-config.

12 years agoUse the new official IANA-allocated port number 4070.
Mark Wooding [Wed, 11 Jul 2007 22:21:17 +0000 (23:21 +0100)]
Use the new official IANA-allocated port number 4070.

This is now the default port selected by the server (say -p0 for
explicit dynamic allocation).  Also let the ADDR command default to 4070
so that nobody needs to remember it.

12 years agoserver/tun-unet: Fix stupidity in t_create.
Mark Wooding [Thu, 5 Jul 2007 10:02:00 +0000 (11:02 +0100)]
server/tun-unet: Fix stupidity in t_create.

Obviously I never watched this build carefully enough.

12 years agocleanup: Whitespaces fixes, left right and centre.
Mark Wooding [Sun, 28 Jan 2007 23:10:31 +0000 (23:10 +0000)]
cleanup: Whitespaces fixes, left right and centre.

12 years agodoc: Fix distribution of generated manpages.
Mark Wooding [Thu, 11 Jan 2007 00:10:25 +0000 (00:10 +0000)]
doc: Fix distribution of generated manpages.

Oops, this is leftover from change 797cf76b...

Also fix the tripemon(8) manpage to use configured paths, and (cheekily)
fix tripemon itself to support TRIPESOCK.

12 years agoserver: Fix some bad warning messages.
Mark Wooding [Thu, 11 Jan 2007 00:06:46 +0000 (00:06 +0000)]
server: Fix some bad warning messages.

Oops, the arguments to some calls to a_warn are malformed and can cause
crashes.  Fix them.

12 years agoserver: Correct handling of interface names in tun interface.
Mark Wooding [Thu, 11 Jan 2007 00:04:39 +0000 (00:04 +0000)]
server: Correct handling of interface names in tun interface.

Now that interface names can be changed, we need to let the tunnel
driver know of changes so that it can produce the right messages when
things go weird.  It's better to let the peer edifice handle interface
names, so

  * let `create' return the interface name rather than have p_ifname ask
    the tunnel explicitly, and

  * replace the `ifname' query with an optional `setifname'
    notification, which is currently used only by the SLIP driver to
    maintain the correct name for its persistent interfaces.

12 years Reformat --with-logfile help text.
Mark Wooding [Sun, 7 Jan 2007 19:05:23 +0000 (19:05 +0000)] Reformat --with-logfile help text.

12 years agoUseful functions (u_daemon and versioncmp) moved to mLib.
Mark Wooding [Sun, 7 Jan 2007 19:02:15 +0000 (19:02 +0000)]
Useful functions (u_daemon and versioncmp) moved to mLib.

Remove the code here, and use the mLib versions.

12 years agodebian: Still making tripe-ethereal, so ignore directory
Mark Wooding [Sun, 7 Jan 2007 19:01:22 +0000 (19:01 +0000)]
debian: Still making tripe-ethereal, so ignore directory

12 years agoNew environment variable TRIPESOCK.
Mark Wooding [Thu, 4 Jan 2007 11:27:03 +0000 (11:27 +0000)]
New environment variable TRIPESOCK.

Provides a handy default for the `--admin-socket' option.  Added

Also fixed paths in documentation to reflect the configuration choices;
in particular, they were wrong in the Debian build.

12 years agoclient/tripectl: Flush output after each line.
Mark Wooding [Wed, 3 Jan 2007 18:44:09 +0000 (18:44 +0000)]
client/tripectl: Flush output after each line.

Otherwise script users can be left hanging for long periods of time.

12 years agoserver/admin: Fix core dump if ADD wasn't given enough arguments.
Mark Wooding [Wed, 3 Jan 2007 18:43:20 +0000 (18:43 +0000)]
server/admin: Fix core dump if ADD wasn't given enough arguments.

Just a stupid off-the-end-of-the-array error.

12 years agotripectl: Quotify the arguments rather than hoping for the best.
Mark Wooding [Mon, 1 Jan 2007 15:46:36 +0000 (15:46 +0000)]
tripectl: Quotify the arguments rather than hoping for the best.

To make this work, move quotify from admin to the shared utilities.

12 years agoMerge branches 'cleanup' and 'services'
Mark Wooding [Mon, 1 Jan 2007 15:30:39 +0000 (15:30 +0000)]
Merge branches 'cleanup' and 'services'

* cleanup:
  server/admin: Fix tokenization of statistics output.
  Fix typos in messages.
  doc: Various small cleanups to tripe-admin.5.
  cleanup: Various simple whitespace changes.
  cleanup: Rename a few badly-chosen variables.

* services:
  doc: Document the services messages.
  admin: Implement the main job commands.
  admin: Implement job table infrastructure.
  admin: Service ownership infrastructure and commands.
  servutil: Implement version number comparison.
  admin: New ?TOKENS formatting directive.
  admin: Rename the unknown-service error.
  admin: Improve handling of background jobs.
  admin: Option parser macros.
  admin: Put all command options at the start of the command-line.
  admin: Fix premature close in a_bgrelease.
  admin: Remove locking; new safe client destruction.



12 years agodoc: Document the services messages.
Mark Wooding [Mon, 1 Jan 2007 12:52:33 +0000 (12:52 +0000)]
doc: Document the services messages.

12 years agoadmin: Implement the main job commands.
Mark Wooding [Mon, 1 Jan 2007 12:52:33 +0000 (12:52 +0000)]
admin: Implement the main job commands.

That's SVCSUBMIT to submit new jobs, and SVCINFO, SVCOK and SVCFAIL for
responding to them.

12 years agoadmin: Implement job table infrastructure.
Mark Wooding [Mon, 1 Jan 2007 12:52:33 +0000 (12:52 +0000)]
admin: Implement job table infrastructure.

We'll want this to keep track of which jobs a service provider has