cjdelisle/cjdns — pull request #307 by hartzler (2013-08-25 17:12:08+00:00)
Title: Admin interface to remove passwords / disconnect peers

Allows you to from the admin interface to:
* disconnect a peer by public key
* remove AuthorizedPassword by user string
* show user string in peerStats for incoming connections

I changed the notion of the CryptoAuth user object from something that was passed in to a String that is copied on addUser. I did this because I couldn't figure out how to get (or if I even wanted) an allocator for a set of persistent String objects I could later compare / pass-in. What I really wanted was simply to compare by string, not by address.

In that process, we lose the notion of "context" for which CryptoAuth's are setup, making it impossible for example to flush all users added from the AuthorizedPasswords caller, so that now all CryptoAuth users (including the Beacon user) are removed on flush(). I could add back in the notion of "context" as an additional compare by address parameter that groups calls to addUser, passing what used to be used for the void* user as that parameter.

Addresses #290