=== modified file 'Makefile' --- Makefile 2008-08-07 21:45:41 +0000 +++ Makefile 2008-08-08 23:28:55 +0000 @@ -11,11 +11,23 @@ CFLAGS=$(WARN) $(DEBUG) $(FORTIFY) $(COVERAGE) $(OPTIMIZE) $(LANGUAGE) LDFLAGS=$(COVERAGE) +DOCBOOKTOMAN=xsltproc --nonet --param man.charmap.use.subset "0" --param make.year.ranges "1" --param make.single.year.ranges "1" --param man.output.quietly "1" + PROGS=mandos-client plugins.d/password-request plugins.d/password-prompt +DOCS=mandos.8 mandos-client.8mandos plugins.d/password-request.8mandos plugins.d/password-prompt.8mandos mandos.conf.5 mandos-clients.conf.5 objects=$(shell for p in $(PROGS); do echo $${p}.o; done) -all: $(PROGS) +all: $(PROGS) $(DOCS) + +%.5: %.xml + cd $(shell dirname $^); $(DOCBOOKTOMAN) $(shell basename $^) + +%.8: %.xml + cd $(shell dirname $^); $(DOCBOOKTOMAN) $(shell basename $^) + +%.8mandos: %.xml + cd $(shell dirname $^); $(DOCBOOKTOMAN) $(shell basename $^) mandos-client: mandos-client.o $(LINK.o) -lgnutls $(COMMON) $^ $(LOADLIBES) $(LDLIBS) -o $@ @@ -29,7 +41,7 @@ .PHONY : all clean distclean run-client run-server clean: - -rm --force $(PROGS) $(objects) core + -rm --force $(PROGS) $(objects) $(DOCS) core distclean: clean mostlyclean: clean === modified file 'TODO' --- TODO 2008-08-07 21:45:41 +0000 +++ TODO 2008-08-08 23:28:55 +0000 @@ -55,6 +55,8 @@ * Installer ** [#A] Change initrd.img file to not be publically readable ** [#A] Create GPG key ring files in initrd +** [#A] Create mandos user and group for server +** [#A] Create /var/run/mandos directory with perm and ownership #+STARTUP: showall === modified file 'clients.conf' --- clients.conf 2008-07-29 03:35:39 +0000 +++ clients.conf 2008-08-08 01:51:58 +0000 @@ -15,19 +15,21 @@ [braxen_client] fingerprint = 7788 2722 5BA7 DE53 9C5A 7CFA 59CF F7CD BD9A 5920 secret = - hQIOA6QdEjBs2L/HEAf/TCyrDe5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0tVA5crSQmaSotm6KmNLhrFnZ5BxX+TiE+eTUTqSloWRY6VAvqW + QHC7OASxK5E6RXPBuFH5IohUA2Qbk5AHt99pYvsIPX88j2rWauOokoiKZo + t/9leJ8VxO5l3wf/U64IH8bkPIoWmWZfd/nqh4uwGNbCgKMyT+AnvH7kMJ + 3i7DivfWl2mKLV0PyPHUNva0VQxX6yYjcOhj1R6fCr/at8/NSLe2OhLchz + dC+Ls9h+kvJXgF8Sisv+Wk/1RadPLFmraRlqvJwt6Ww21LpiXqXHV2mIgq + WnR98YgSvUi3TJHrUQiNc9YyBzuRo0AjgG2C9qiE3FM+Y28+iQ/sR3+bFs + zYuZKVTObqiIslwXu7imO0cvvFRgJF/6u3HNFQ4LUTGhiM3FQmC6NNlF3/ + vJM2hwRDMcJqDd54Twx90Wh+tYz0z7QMsK4ANXWHHWHR0JchnLWmenzbtW + 5MHdW9AYsNJZAQSOpirE4Xi31CSlWAi9KV+cUCmWF5zOFy1x23P6PjdaRm + 4T2zw4dxS5NswXWU0sVEXxjs6PYxuIiCTL7vdpx8QjBkrPWDrAbcMyBr2O + QlnHIvPzEArRQLo= =iHhv fqdn = localhost interval = 5m === modified file 'mandos' --- mandos 2008-08-08 01:17:17 +0000 +++ mandos 2008-08-08 23:28:55 +0000 @@ -761,6 +761,17 @@ if not debug: daemon() + + pidfilename = "/var/run/mandos/mandos.pid" + pid = os.getpid() + try: + pidfile = open(pidfilename, "w") + pidfile.write(str(pid) + "\n") + pidfile.close() + del pidfile + except IOError, err: + logger.error("Could not write %s file with PID %d", + pidfilename, os.getpid()) def cleanup(): "Cleanup function; run on exit" === added file 'mandos-client.xml' --- mandos-client.xml 1970-01-01 00:00:00 +0000 +++ mandos-client.xml 2008-08-08 01:31:58 +0000 @@ -0,0 +1,194 @@ + + + + +]> + + + + &COMMANDNAME; + + &COMMANDNAME; + &VERSION; + + + Björn + Påhlsson +
+ belorn@fukt.bsnet.se +
+
+ + Teddy + Hogeborn +
+ teddy@fukt.bsnet.se +
+
+
+ + 2008 + Teddy Hogeborn & Björn Påhlsson + + + + This manual page is free software: you can redistribute it + and/or modify it under the terms of the GNU General Public + License as published by the Free Software Foundation, + either version 3 of the License, or (at your option) any + later version. + + + + This manual page is distributed in the hope that it will + be useful, but WITHOUT ANY WARRANTY; without even the + implied warranty of MERCHANTABILITY or FITNESS FOR A + PARTICULAR PURPOSE. See the GNU General Public License + for more details. + + + + You should have received a copy of the GNU General Public + License along with this program; If not, see + . + + +
+ + + &COMMANDNAME; + 8mandos + + + + &COMMANDNAME; + + get password for encrypted rootdisk + + + + + + &COMMANDNAME; + OPTION + + + + + DESCRIPTION + + &COMMANDNAME; is a plugin runner that waits + for any of its plugins to return sucessfull with a password, and + passes it to cryptsetup. plugins is defined as any executables + in the plugins directory will by default will be + /conf/conf.d/mandos/plugins.d. to stdout. + + + + + -g,--global-options + OPTIONS + + + Global options given to all plugins as additional start + arguments. Options are specified with a -o flag followed + by a comma separated string of options. + + + + + + -o, --options-for + PLUGIN:OPTION + + + + Plugin specific options given to the plugin as additional + start arguments. Options are specified with a -o flag + followed by a comma separated string of options. + + + + + + -d, --disable + PLUGIN + + + + Disable a specific plugin + + + + + + --groupid ID + + + + Group ID the plugins will run as + + + + + + --userid ID + + + + User ID the plugins will run as + + + + + + --plugin-dir DIRECTORY + + + + Specify a different plugin directory + + + + + + --debug + + + Debug mode + + + + + + -?, --help + + + Gives a help message + + + + + + --usage + + + Gives a short usage message + + + + + + -V, --version + + + Prints the program version + + + + + +
=== added file 'mandos-clients.conf.xml' --- mandos-clients.conf.xml 1970-01-01 00:00:00 +0000 +++ mandos-clients.conf.xml 2008-08-08 02:33:41 +0000 @@ -0,0 +1,250 @@ + + + + +/etc/mandos/clients.conf"> +]> + + + + &CONFNAME; + + &CONFNAME; + &VERSION; + + + Björn + Påhlsson +
+ belorn@fukt.bsnet.se +
+
+ + Teddy + Hogeborn +
+ teddy@fukt.bsnet.se +
+
+
+ + 2008 + Teddy Hogeborn & Björn Påhlsson + + + + This manual page is free software: you can redistribute it + and/or modify it under the terms of the GNU General Public + License as published by the Free Software Foundation, + either version 3 of the License, or (at your option) any + later version. + + + + This manual page is distributed in the hope that it will + be useful, but WITHOUT ANY WARRANTY; without even the + implied warranty of MERCHANTABILITY or FITNESS FOR A + PARTICULAR PURPOSE. See the GNU General Public License + for more details. + + + + You should have received a copy of the GNU General Public + License along with this program; If not, see + . + + +
+ + + &CONFNAME; + 5 + + + + &CONFNAME; + + Configuration file for Mandos clients + + + + + + &CONFPATH; + + + + + DESCRIPTION + + The file &CONFPATH; is the configuration file for mandos where + each client that will be abel to use the service need to be + specified. The configuration file is looked on at the startup of + the service, so to reenable timedout clients one need to only + restart the server. The format starts with a section under [] + which is eather [DEFAULT] or a client + name. Values is set through the use of VAR = VALUE pair. Values + may not be empty. + + + + + DEFAULTS + + The paramters for [DEFAULT] are: + + + + + + timeout + + + This option allows you to override the default timeout + that clients will get. By default mandos will use 1hr. + + + + + + interval + + + This option allows you to override the default interval + used between checkups for disconnected clients. By default + mandos will use 5m. + + + + + + checker + + + This option allows you to override the default shell + command that the server will use to check up if the client + is still up. By default mandos will "fping -q -- %%(fqdn)s" + + + + + + + + + CLIENTS + + The paramters for clients are: + + + + + + fingerprint + + + This option sets the openpgp fingerprint that identifies + the public certificate that clients authenticates themself + through gnutls. The string need to be in hex-decimal form. + + + + + + secret + + + Base 64 encoded OpenPGP encrypted password encrypted by + the clients openpgp certificate. + + + + + + secfile + + + Base 64 encoded OpenPGP encrypted password encrypted by + the clients openpgp certificate as a binary file. + + + + + + fqdn + + + FQDN, that can be used in for checking that the client is up. + + + + + + checker + + + Shell command that the server will use to check up if a + client is still up. + + + + + + timeout + + + Duration that a client can be down whitout be removed from + the client list. + + + + + + + + + EXAMPLES + + +[DEFAULT] +timeout = 1h +interval = 5m +checker = fping -q -- %%(fqdn)s + +[example_client] +fingerprint = 7788 2722 5BA7 DE53 9C5A 7CFA 59CF F7CD BD9A 5920 + +secret = + hQIOA6QdEjBs2L/HEAf/TCyrDe5Xnm9esa+Pb/vWF9CUqfn4srzVgSu234 + REJMVv7lBSrPE2132Lmd2gqF1HeLKDJRSVxJpt6xoWOChGHg+TMyXDxK+N + Xl89vGvdU1XfhKkVm9MDLOgT5ECDPysDGHFPDhqHOSu3Kaw2DWMV/iH9vz + 3Z20erVNbdcvyBnuojcoWO/6yfB5EQO0BXp7kcyy00USA3CjD5FGZdoQGI + Tb8A/ar0tVA5crSQmaSotm6KmNLhrFnZ5BxX+TiE+eTUTqSloWRY6VAvqW + QHC7OASxK5E6RXPBuFH5IohUA2Qbk5AHt99pYvsIPX88j2rWauOokoiKZo + t/9leJ8VxO5l3wf/U64IH8bkPIoWmWZfd/nqh4uwGNbCgKMyT+AnvH7kMJ + 3i7DivfWl2mKLV0PyPHUNva0VQxX6yYjcOhj1R6fCr/at8/NSLe2OhLchz + dC+Ls9h+kvJXgF8Sisv+Wk/1RadPLFmraRlqvJwt6Ww21LpiXqXHV2mIgq + WnR98YgSvUi3TJHrUQiNc9YyBzuRo0AjgG2C9qiE3FM+Y28+iQ/sR3+bFs + zYuZKVTObqiIslwXu7imO0cvvFRgJF/6u3HNFQ4LUTGhiM3FQmC6NNlF3/ + vJM2hwRDMcJqDd54Twx90Wh+tYz0z7QMsK4ANXWHHWHR0JchnLWmenzbtW + 5MHdW9AYsNJZAQSOpirE4Xi31CSlWAi9KV+cUCmWF5zOFy1x23P6PjdaRm + 4T2zw4dxS5NswXWU0sVEXxjs6PYxuIiCTL7vdpx8QjBkrPWDrAbcMyBr2O + QlnHIvPzEArRQLo= + =iHhv + +fqdn = localhost +interval = 5m + + + + + + FILES + + The file described here is &CONFPATH; + + +
=== added file 'mandos.conf.xml' --- mandos.conf.xml 1970-01-01 00:00:00 +0000 +++ mandos.conf.xml 2008-08-08 01:31:58 +0000 @@ -0,0 +1,189 @@ + + + + +/etc/mandos/mandos.conf"> +]> + + + + &CONFNAME; + + &CONFNAME; + &VERSION; + + + Björn + Påhlsson +
+ belorn@fukt.bsnet.se +
+
+ + Teddy + Hogeborn +
+ teddy@fukt.bsnet.se +
+
+
+ + 2008 + Teddy Hogeborn & Björn Påhlsson + + + + This manual page is free software: you can redistribute it + and/or modify it under the terms of the GNU General Public + License as published by the Free Software Foundation, + either version 3 of the License, or (at your option) any + later version. + + + + This manual page is distributed in the hope that it will + be useful, but WITHOUT ANY WARRANTY; without even the + implied warranty of MERCHANTABILITY or FITNESS FOR A + PARTICULAR PURPOSE. See the GNU General Public License + for more details. + + + + You should have received a copy of the GNU General Public + License along with this program; If not, see + . + + +
+ + + &CONFNAME; + 5 + + + + &CONFNAME; + + Configuration file for Mandos + + + + + + &CONFPATH; + + + + + DESCRIPTION + + The file &CONFPATH; is a simple configuration file for mandos + and is looked on at startup of the service. The configuration + file must start with [server]. The format for + the rest is a simple VAR = VALUE pair. Values may not be empty. + + + + The paramters are: + + + + + interface + + + This option allows you to override the default network + interfaces. By default mandos will not bind to any + specific interface but instead use default avahi-server + behaviour. + + + + + + address + + + This option allows you to override the default network + address. By default mandos will not bind to any + specific address but instead use default avahi-server + behaviour. + + + + + + port + + + This option allows you to override the default port to + listen on. By default mandos will not specify any specific + port and instead use a random port given by the OS from + the use of INADDR_ANY. + + + + + + debug + + + This option allows you to modify debug mode with a true/false + boolean value. By default is debug set to false. + + + + + + priority + + + This option allows you to override the default gnutls + priority that will be used in gnutls session. See + gnutls_priority_init + 3for + more information on gnutls priority strings. + + + + + + servicename + + + This option allows you to override the default Zeroconf + service name use to announce mandos as a avahi service. By + default mandos will use "Mandos". + + + + + + + + + EXAMPLES + + + [server] + # A configuration example + interface = eth0 + address = 2001:DB8: + port = 1025 + debug = true + priority = SECURE256:!CTYPE-X.509:+CTYPE-OPENPGP + servicename = Mandos + + + + + + FILES + + The file described here is &CONFPATH; + + +
=== added file 'mandos.xml' --- mandos.xml 1970-01-01 00:00:00 +0000 +++ mandos.xml 2008-08-08 01:51:58 +0000 @@ -0,0 +1,182 @@ + + + + +]> + + + + &COMMANDNAME; + + &COMMANDNAME; + &VERSION; + + + Björn + Påhlsson +
+ belorn@fukt.bsnet.se +
+
+ + Teddy + Hogeborn +
+ teddy@fukt.bsnet.se +
+
+
+ + 2008 + Teddy Hogeborn & Björn Påhlsson + + + + This manual page is free software: you can redistribute it + and/or modify it under the terms of the GNU General Public + License as published by the Free Software Foundation, + either version 3 of the License, or (at your option) any + later version. + + + + This manual page is distributed in the hope that it will + be useful, but WITHOUT ANY WARRANTY; without even the + implied warranty of MERCHANTABILITY or FITNESS FOR A + PARTICULAR PURPOSE. See the GNU General Public License + for more details. + + + + You should have received a copy of the GNU General Public + License along with this program; If not, see + . + + +
+ + + &COMMANDNAME; + 8 + + + + &COMMANDNAME; + + Sends encrypted passwords to authenticated mandos clients + + + + + + &COMMANDNAME; + OPTION + + + + + DESCRIPTION + + &COMMANDNAME; is a server daemon that handels + incomming passwords request for passwords. Mandos use avahi to + announce the service, and through gnutls authenticates + clients. Any authenticated client is then given its encrypted + password. + + + + + -h, --help + + + show a help message and exit + + + + + + -i, --interface + IF + + + Bind to interface IF + + + + + + -a, --address + ADDRESS + + + Address to listen for requests on + + + + + + -p, --port + PORT + + + Port number to receive requests on + + + + + + --check + + + Run self-test on the server + + + + + + --debug + + + Debug mode + + + + + + --priority + PRIORITY + + + GnuTLS priority string. See + gnutls_priority_init + 3 + + + + + + --servicename NAME + + + + Zeroconf service name + + + + + + --configdir DIR + + + + Directory to search for configuration files + + + + + + +
=== added file 'plugins.d/password-prompt.xml' --- plugins.d/password-prompt.xml 1970-01-01 00:00:00 +0000 +++ plugins.d/password-prompt.xml 2008-08-08 01:31:58 +0000 @@ -0,0 +1,140 @@ + + + + +]> + + + + &COMMANDNAME; + + &COMMANDNAME; + &VERSION; + + + Björn + Påhlsson +
+ belorn@fukt.bsnet.se +
+
+ + Teddy + Hogeborn +
+ teddy@fukt.bsnet.se +
+
+
+ + 2008 + Teddy Hogeborn & Björn Påhlsson + + + + This manual page is free software: you can redistribute it + and/or modify it under the terms of the GNU General Public + License as published by the Free Software Foundation, + either version 3 of the License, or (at your option) any + later version. + + + + This manual page is distributed in the hope that it will + be useful, but WITHOUT ANY WARRANTY; without even the + implied warranty of MERCHANTABILITY or FITNESS FOR A + PARTICULAR PURPOSE. See the GNU General Public License + for more details. + + + + You should have received a copy of the GNU General Public + License along with this program; If not, see + . + + +
+ + + &COMMANDNAME; + 8mandos + + + + &COMMANDNAME; + + Passprompt for luks during boot sequence + + + + + + &COMMANDNAME; + OPTION + + + + + DESCRIPTION + + &COMMANDNAME; is a terminal program that ask for + passwords during boot sequence. It is a plugin to + mandos, and is used as a fallback and + alternative to retriving passwords from a mandos server. During + boot sequence the user is prompted for the disk password, and + when a password is given it then gets forwarded to + LUKS. + + + + + -p, --prefix=PREFIX + + + + Prefix used before the passprompt + + + + + + --debug + + + Debug mode + + + + + + -?, --help + + + Gives a help message + + + + + + --usage + + + Gives a short usage message + + + + + + -V, --version + + + Prints the program version + + + + + +
=== added file 'plugins.d/password-request.xml' --- plugins.d/password-request.xml 1970-01-01 00:00:00 +0000 +++ plugins.d/password-request.xml 2008-08-08 01:31:58 +0000 @@ -0,0 +1,198 @@ + + + + +]> + + + + &COMMANDNAME; + + &COMMANDNAME; + &VERSION; + + + Björn + Påhlsson +
+ belorn@fukt.bsnet.se +
+
+ + Teddy + Hogeborn +
+ teddy@fukt.bsnet.se +
+
+
+ + 2008 + Teddy Hogeborn & Björn Påhlsson + + + + This manual page is free software: you can redistribute it + and/or modify it under the terms of the GNU General Public + License as published by the Free Software Foundation, + either version 3 of the License, or (at your option) any + later version. + + + + This manual page is distributed in the hope that it will + be useful, but WITHOUT ANY WARRANTY; without even the + implied warranty of MERCHANTABILITY or FITNESS FOR A + PARTICULAR PURPOSE. See the GNU General Public License + for more details. + + + + You should have received a copy of the GNU General Public + License along with this program; If not, see + . + + +
+ + + &COMMANDNAME; + 8mandos + + + + &COMMANDNAME; + + Client for mandos + + + + + + &COMMANDNAME; + OPTION + + + + + DESCRIPTION + + &COMMANDNAME; is a mandos plugin that works + like a client program that through avahi detects mandos servers, + sets up a gnutls connect and request a encrypted password. Any + passwords given is automaticly decrypted and passed to + cryptsetup. + + + + + -c, --connect= + IP + + + Connect directly to a sepcified mandos server + + + + + + -d, --keydir= + KEYDIR + + + Directory where the openpgp keyring is + + + + + + -i, --interface= + INTERFACE + + + Interface that Avahi will conntect through + + + + + + -p, --pubkey= + PUBKEY + + + Public openpgp key for gnutls authentication + + + + + + -s, --seckey= + SECKEY + + + Secret openpgp key for gnutls authentication + + + + + + --priority=PRIORITY + + + + GNUTLS priority + + + + + + --dh-bits=BITS + + + + dh-bits to use in gnutls communication + + + + + + --debug + + + Debug mode + + + + + + -?, --help + + + Gives a help message + + + + + + --usage + + + Gives a short usage message + + + + + + -V, --version + + + Prints the program version + + + + + +