[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[minion-cvs] Sunday"s hacks, today! More work towards clean, usable...



Update of /home/minion/cvsroot/src/minion
In directory moria.seul.org:/tmp/cvs-serv31913

Modified Files:
	HACKING Makefile TODO setup.py 
Log Message:
Sunday's hacks, today!  More work towards clean, usable, testable server
logic.

HACKING:
	Bring up to date

Makefile, setup:
	Make it work on macos X

Common:
	Move in createPrivateDirs from servermain
	Document log severities

MMTPServer:
	Track retriable and non-retriable failures better; add failure
	   callback

Modules:
	Document classes
	Add per-module queues
	Begin new processMessage method (incomplete)
	Simplify DropModule
	Switch MBOX to use SMTPlib.
	
Queue:
	Add convenience methods to pickle and unpickle objects
	Add DeliveryQueue class to encapsulate queue/send/retry logic
	Add MixQueue to implement Cottrell mixing.
	
ServerMain:
	Adopt some (but not yet all) of above improvements

aes_ctr.c:
	Fix big-endian *_U32 macros
	Add INCR_U32 macro to improve performance on big-endian machines
	Rewrite code to use INCR_ macros




Index: HACKING
===================================================================
RCS file: /home/minion/cvsroot/src/minion/HACKING,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -d -r1.6 -r1.7
--- HACKING	5 Jul 2002 23:34:32 -0000	1.6
+++ HACKING	12 Aug 2002 18:12:24 -0000	1.7
@@ -13,7 +13,7 @@
 	Get the source.
 	Unpack openssl 0.9.7 into minion/contrib/openssl.
 	cd minion/contrib/openssl; ./config; make
-	
+
 Things to try:
 	make
 	make test
@@ -79,11 +79,12 @@
       we should migrate to libnss entirely.
 
 PORTING TO NON-LINUX PLATFORMS:
-    - If you need to run on a system without /dev/urandom, you'll need
-      to write an acceptable fallback for mixminion.Crypto.trng() to
-      use.  
+    - If you need to run on a system without an acceptable /dev/*random, 
+      you'll nee to write an acceptable fallback for mixminion.Crypto.trng() 
+      to use.  
     - We assume the existence of a /usr/bin/shred to securely delete
-      files.  This should be made configurable, but isn't yet.
+      files.  This is now configurable, but I'd like to know a few other
+      alternatives.
 
 CAVEATS:
     - If I haven't got a test for it in tests.py, assume it doesn't work.

Index: Makefile
===================================================================
RCS file: /home/minion/cvsroot/src/minion/Makefile,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- Makefile	24 Jun 2002 20:28:18 -0000	1.3
+++ Makefile	12 Aug 2002 18:12:24 -0000	1.4
@@ -30,5 +30,5 @@
 	wc -l src/*.[ch] lib/*/*.py
 
 xxxx:
-	find . -type f | grep -v \.py.$ | grep -v \.so$        \
-	    | grep -v \.o$ | xargs grep 'XXXX\|FFFF|\?\?\?\?'
+	find lib src \( -name '*.py' -or -name '*.[ch]' \) -print0 \
+	   | xargs -0 grep 'XXXX\|FFFF|\?\?\?\?'

Index: TODO
===================================================================
RCS file: /home/minion/cvsroot/src/minion/TODO,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -d -r1.13 -r1.14
--- TODO	6 Aug 2002 16:09:20 -0000	1.13
+++ TODO	12 Aug 2002 18:12:24 -0000	1.14
@@ -8,7 +8,29 @@
 
 NEEDS TO BE WRITTEN
 
-FOR 0.0.1: (The rough edges release)
+FOR 0.0.1: (The first alpha)
+	- Refactor brokenness
+		- Key sets are their own class
+		- Queue sets are their own class
+		- A server is its own class, and has a better method breakdown
+		- Clean out deleted stuff every so often
+		o Configuration stuff should go into servermain/clientmain.
+		   Forget this broken system of today.
+		o Reset logic should also go into servermain/clientmain.
+		o Document changes to Queue, MMTPServer
+		. Document and refactor ModuleManager (it needs to know about
+                  queues).
+		- Make individualized queues into special classes.
+		. DeliveryQueue
+			- Tests for Queue.*Object*
+			o Implement
+			o Document
+			- Test
+		. MixQueue
+			o Implement
+			- Test
+		- Document all changes; resolve XXXXs
+	o Need hooks for undeliverable messages in MMTPServer.
 	. Module system
 		o Stub classes
 		o Modules are configurable
@@ -22,9 +44,13 @@
 			*- Implement
 			*- Test
 	*- Server
-		- Main loop for server
-		- Startup, config
-		- Load keys
+		. Main loop for server
+		. Startup, config
+		. Load keys
+		. Receive messages
+		. Process messages
+		- Deliver MBOX messages.
+		- Better debugging logs
 		o Design directory layout
 	*- CLI for server
 		*- Run server
@@ -42,9 +68,7 @@
 		- Validation function for client
 		- Validation function for server		
 	- Clean shutdown for server
-
 	- MMTP	
-		- Code to send junk
 		. Tests for all cases:
 			- Junk
 			- Multiple senders
@@ -60,9 +84,11 @@
 FOR 0.0.2: (The first hacker release)
 	- Key rotation and expiry
 	- MMTP
+		- Code to send junk
 SPEC!!		- Timeout old connections
 		- Test new features
 	- Very clean build process
+		- Get SSL as needed
 	- RPMS
 	- Key management
 	- Test on other (non-redhat, non-linux) systems

Index: setup.py
===================================================================
RCS file: /home/minion/cvsroot/src/minion/setup.py,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -d -r1.5 -r1.6
--- setup.py	27 Jun 2002 23:32:18 -0000	1.5
+++ setup.py	12 Aug 2002 18:12:24 -0000	1.6
@@ -18,10 +18,13 @@
 if USE_OPENSSL:
     # For now, we assume that openssl-0.9.7 hasn't been released.  When this
     # changes, we can fix this rigamarole.
-    LIB_DIRS=["contrib/openssl"]
-    INCLUDE_DIRS=["contrib/openssl/include"]
+    openssl_lib = os.environ.get("MM_OPENSSL_LIB", "./contrib/openssl")
+    openssl_inc = os.environ.get("MM_OPENSSL_INCLUDE", 
+				 "./contrib/openssl/include")
+    LIB_DIRS=[openssl_lib]
+    INCLUDE_DIRS=[openssl_inc]
     LIBRARIES=['ssl','crypto']
-    
+    STATIC_LIBS=['./contrib/openssl/libssl.a', './contrib/openssl/libcrypto.a']
 
 MACROS=[]
 MODULES=[]
@@ -64,10 +67,9 @@
 extmodule = Extension("mixminion._minionlib",
                       ["src/crypt.c", "src/aes_ctr.c", "src/main.c",
                        "src/tls.c" ],
-                      library_dirs=LIB_DIRS,
                       include_dirs=INCLUDE_DIRS,
-                      libraries=LIBRARIES,
-                      extra_compile_args=["-Wno-strict-prototypes", ],
+                      extra_objects=STATIC_LIBS,
+                      extra_compile_args=["-Wno-strict-prototypes" ],
                       define_macros=MACROS)
 
 setup(name='Mixminion',