Simplification/refactoring of key/file processing
authorJameson Rollins <jrollins@finestructure.net>
Mon, 18 Oct 2010 13:55:53 +0000 (09:55 -0400)
committerJameson Rollins <jrollins@finestructure.net>
Mon, 18 Oct 2010 20:34:32 +0000 (16:34 -0400)
commitdf882c1e7e63fc658d0296dbd272499923fc4c69
treee9e7e364780bc6429e09340d74e1bf7dc580be33
parent7f20193196c87b2cff0bf95d5ec53b5be3bdabb8
Simplification/refactoring of key/file processing

This is a fairly major overhaul to greatly reduce the number of
redundant code paths.  We here created a new process_keys_for_file
function that processes key from a userid for a given key file.  All
the main top elevel functions now call this one function.

The main top level monkeysphere functions for updating the user's
authorized_keys and known_hosts files are now moved to their own
sourced files, which greatly reduces the amount of code sourced with
common.

monkeysphere now updates authorized_keys and known_hosts in temporary
files that are then atomically moved into place upon completion.

Finally, removed the confusing return codes in the key/file processing
functions that were based on number of valid/invalid keys processed.
It was confusing in the presence of actual errors that stopped
processing.
src/monkeysphere
src/share/common
src/share/m/keys_for_userid [new file with mode: 0644]
src/share/m/ssh_proxycommand
src/share/m/update_authorized_keys [new file with mode: 0644]
src/share/m/update_known_hosts [new file with mode: 0644]
src/share/ma/update_users