r115 - trunk

Peter Palfrader cabot-devel@lists.noreply.org
Thu, 25 Mar 2004 00:24:59 -0700


Author: weasel
Date: 2004-03-25 00:24:53 -0700 (Thu, 25 Mar 2004)
New Revision: 115

Modified:
   trunk/Makefile.am
   trunk/README
   trunk/ca-config
   trunk/ca-createsendout
   trunk/ca-dosign
   trunk/ca-recv
   trunk/ca-sendout
Log:
Laurent:
- ca-dosign send signed key in attachment using OpenPGP MIME format.
- Cabot.pm is installed.
- Perl scripts import required symbols from Cabot.pm.
- Cleaned README file :
  * add pointer the webpage,
  * dropped redundant configuration instructions,
  * point to the two configuration howtos.
- Added pointer to the configuration howtos in cabot-config


Modified: trunk/Makefile.am
===================================================================
--- trunk/Makefile.am	2004-03-24 18:15:58 UTC (rev 114)
+++ trunk/Makefile.am	2004-03-25 07:24:53 UTC (rev 115)
@@ -21,6 +21,10 @@
 VERSION = @PACKAGE_VERSION@
 PACKAGE = @PACKAGE_TARNAME@
 
+# Perl module
+perlmoddir = $(datadir)/perl5
+perlmod_DATA = Cabot.pm
+
 SUBDIRS = doc
 
 bin_SCRIPTS = ca-createsendout ca-dosign ca-recv ca-sendout
@@ -40,7 +44,8 @@
 examplesdir = $(docdir)/examples
 examples_DATA = cabotrc
 
-EXTRA_DIST = bootstrap setversion VERSION.m4 $(bin_SCRIPTS) cabotrc ca-config
+EXTRA_DIST = bootstrap setversion VERSION.m4 $(bin_SCRIPTS) cabotrc ca-config\
+             $(perlmod_DATA)
 CLEANFILES = $(man_MANS) $(tmpfiles)
 DISTCLEANFILES = $(CLEANFILES) $(txts) $(htmls)
 

Modified: trunk/README
===================================================================
--- trunk/README	2004-03-24 18:15:58 UTC (rev 114)
+++ trunk/README	2004-03-25 07:24:53 UTC (rev 115)
@@ -3,40 +3,24 @@
 See INSTALL for generic installation instructions.
 
 
-CONFIGURING CABOT
+HOMEPAGE
 
-After having installed, set up cabot.  We'll show one way to do this (of
-course, there are more).
+The homepage for the project is located here :
 
-- Create a useraccount "cabot".  If you have the Debian adduser package
-  installed, you can do this by running
+ http://www.palfrader.org/cabot/
 
-     # adduser --system --home /usr/local/var/lib/cabot \
-          --shell /bin/false --group john --disabled-password \
-          --disabled-login --gecos "CA Bot" cabot
 
-  where 'john' is your primary group.
+CONFIGURING CABOT
 
-  (Use
+After having installed, set up cabot. There are currently two
+documented ways of doing this :
 
-    # su -s /bin/sh - cabot
+- in ca-bot-noroot.txt are instructions to set up cabot without root
+  access (probably the prefered way).
 
-  to run a shell as the cabot user.)
+- in cabot-micro-howto.txt are instructions to set up cabot with a
+  dedicated system account.
 
-- Now, as the cabot user, create a file ~/.cabotrc: copy
-  /usr/local/share/doc/cabot/examples/cabotrc and adjust it to your needs.  See
-  ca-config(5) for details about the file.  You might want to use "cat" for the
-  sendmail pipe, when testing your setup.  Furthermore, under your own
-  useraccount, having access to your private key, do
-
-    you@yourhost ~$ ln -s ~cabot/.cabotrc
-
-  so that, when running ca-dosign(1) under your own userid, you have a sane
-  ~/.cabotrc.
-
-- Read cabot-micro-howto.txt, for hints on how to configure your mail setup
-  to deal with cabot stuff.
-
 See the ca-bot pot file for usage info and more.  Run
 
   ./configure && make ca-bot.txt
@@ -49,10 +33,11 @@
 Those who'd like to change the cabot internals, or want to build cabot from a
 fresh CVS tree, should refer to the file ./bootstrap .
 
-Public CVS read access is available from subversions.gnu.org:/cvsroot/cabot ,
-see https://savannah.nongnu.org/cvs/?group=cabot .
+The latest development version can be fetched with subversion :
 
+ svn co svn://svn.debian.org/cabot/trunk/ cabot
 
+
 SIMILAR PROJECTS
 
 Other software automating keysigning tasks:

Modified: trunk/ca-config
===================================================================
--- trunk/ca-config	2004-03-24 18:15:58 UTC (rev 114)
+++ trunk/ca-config	2004-03-25 07:24:53 UTC (rev 115)
@@ -114,6 +114,12 @@
 
 ca-bot(7)
 
+Ideas how to setup ca-bot can be found in
+/usr/[local/]share/doc/cabot/ca-bot-noroot.txt (setup with procmail)
+and /usr/[local/]share/doc/cabot/cabot-micro-howto.txt.gz (setup with
+special user cabot). The first method is recommended, as it doesn't
+require root access.
+
 =head1 VERSION
 
 This manpage: $Id$

Modified: trunk/ca-createsendout
===================================================================
--- trunk/ca-createsendout	2004-03-24 18:15:58 UTC (rev 114)
+++ trunk/ca-createsendout	2004-03-25 07:24:53 UTC (rev 115)
@@ -26,7 +26,7 @@
 use IO::Handle;
 use English;
 use File::Path;
-use Cabot;
+use Cabot qw(%CONFIG makekeydir mkfds ask readwritegpg);
 
 my $config = $ENV{'HOME'} . '/.cabotrc';
 -f $config or die "No file $config present.  See ca-config(5).\n";

Modified: trunk/ca-dosign
===================================================================
--- trunk/ca-dosign	2004-03-24 18:15:58 UTC (rev 114)
+++ trunk/ca-dosign	2004-03-25 07:24:53 UTC (rev 115)
@@ -26,7 +26,7 @@
 use IO::Handle;
 use English;
 use File::Path;
-use Cabot;
+use Cabot qw(%CONFIG getkeydir makekeydir mkfds ask genrandstring readwritegpg);
 
 $OUTPUT_AUTOFLUSH = 1; 
 
@@ -38,8 +38,12 @@
 
 my $revision = '$Revision: 1.17 $'; # FIXME
 
-sub send_mail($$$;$) {
-	my ($to, $subject, $body, $not_really) = @_;
+sub send_mail($$$$;$) {
+	my ($to, $subject, $body, $key, $not_really) = @_;
+
+        my $boundary = "foo";
+        $boundary = genrandstring(8)
+         while (grep /$boundary/, $body.$key);
 	
 	my $msg = << "EOF";
 Subject: $subject
@@ -48,9 +52,19 @@
 From: $CONFIG{'bot'}
 User-Agent: cabot $revision, (c) 1998 Ian Jackson, (c) 2001, 2003 Peter Palfrader
 X-URL: http://www.palfrader.org/cabot/
-Content-Type: text/plain
+Content-Type: multipart/mixed; boundary="$boundary"
 
+--$boundary
+Content-type: text/plain
+
 $body
+
+--$boundary
+Content-type: application/pgp-keys
+
+$key
+
+--$boundary--
 EOF
 	unless (defined $not_really && $not_really) {
 		open(MAIL, $CONFIG{'sendmail'}) || die ("Cannot execute sendmail: $!\n");
@@ -216,7 +230,7 @@
 Thanks
 $CONFIG{'name'}
 
-Key follows:
+Key included as attachment.
 
 EOF
 	my $key;
@@ -234,7 +248,7 @@
 
 	my $to = join ', ', @uids;
 	print "Sending mail..\n";
-	my $mail = send_mail($to, "PGP/GPG key exchange", $text.$key, !$send_mail);
+	my $mail = send_mail($to, "PGP/GPG key exchange", $text, $key, !$send_mail);
 	print $send_mail ? "done.\n" : "not really.\n";
 
 	unless ( -d $CONFIG{'done'} ) {

Modified: trunk/ca-recv
===================================================================
--- trunk/ca-recv	2004-03-24 18:15:58 UTC (rev 114)
+++ trunk/ca-recv	2004-03-25 07:24:53 UTC (rev 115)
@@ -23,7 +23,7 @@
 
 use strict;
 use File::Path;
-use Cabot;
+use Cabot qw(%CONFIG getkeydir ask);
 
 umask(0007);
 

Modified: trunk/ca-sendout
===================================================================
--- trunk/ca-sendout	2004-03-24 18:15:58 UTC (rev 114)
+++ trunk/ca-sendout	2004-03-25 07:24:53 UTC (rev 115)
@@ -26,7 +26,7 @@
 use English;
 use IO::Handle;
 use File::Path;
-use Cabot;
+use Cabot qw(%CONFIG genrandstring getkeydir makekeydir mkfds ask readwritegpg);
 
 my $config = $ENV{'HOME'} . '/.cabotrc';
 -f $config or die "No file $config present.  See ca-config(5).\n";