summaryrefslogtreecommitdiff
path: root/src/monkeysphere-authentication
AgeCommit message (Collapse)Author
2013-03-13Simplify arguments passed to su_monkeysphere_user() and gpg_sphereJonas Smedegaard
It is a healthy coding practice to keep each argument separate when executing system calls, i.e. quote each variable separately instead of relying on whitespace to indicate argument separation. This patch improves argument passing like this: a) Each argument is passed individually (not all as a single string) b) Arguments containing no variables are not quoted c) Dynamic arguments are double-quoted ( "$@" ) Due to su_monkeysphere_user() expanding arguments using "$*" (not "$@") arguments are collapsed into single strings, and this change is therefore mostly¹ cosmetic. It does improve clarity, however. Also, it eases switching to safer quoted arguments in the future. ¹ma/update_users had $STRICT_MODES properly dual-quoted line 82 which is dropped with this change (to keep patches simple). Next patch will restore proper quoting generally (i.e. including this one now relaxed).
2010-11-13universalize and consolidate on --fixed-list-modeDaniel Kahn Gillmor
2010-10-18add check for argument in keys-for-userJameson Rollins
2010-10-17fix keys-for-userJameson Rollins
This function now properly outputs to stdout exactly what would have been written to the monkeysphere-controlled authorized_keys file, but without actually touching it.
2010-10-17add 'k' as shortcut for keys-for-userJameson Rollins
2010-10-04fix need for only single argument to gpg_sphereJameson Rollins
The use of $* instead of $@ in the call to su_monkeysphere_user is what we want to not split the input to the bash subcalls into separate words.
2010-09-14fix *all* install paths, including in man pages and transition scriptsJameson Rollins
2010-09-14fix specification of install directories in top level scripts.Jameson Rollins
Various install paths were hard coded in the top level scripts. This was causing problems for non-standard install locations. Also added use of LOCALSTATEDIR variable to specify /var/lib path.
2010-07-04add keys-for-user subcommand to monkeysphere-authenticationJameson Rollins
This subcommand will output all valid key for a given user. The user's authorized_user_ids file will be read for OpenPGP user IDs, one per line. The ssh-formated RSA keys will be output to stdout. Also included is a simple script that takes the user as it's one argument and exec's this command. This is something that would be suitable for the proposed sshd AuthorizedKeysCommand.
2010-02-02add some useful shortcuts for some common commandsJameson Rollins
2010-01-19accepting "--version" as well as "version" subcommand for monkeysphere-host ↵Daniel Kahn Gillmor
and monkeysphere-authentication
2010-01-11normalize output for monkeysphere when no subcommand is issued or when an ↵Daniel Kahn Gillmor
unknown subcommand is issued
2010-01-11fix invocation without subcommands to call usage function and exit 1 explicitllyJameson Rollins
2010-01-10Merge branch 'master' of git://labs.riseup.net/~micah/monkeysphereMatthew James Goins
2010-01-10Clean up REQUIRED_KEY_CAPABILITY option passing to process_user_id.Jameson Rollins
Get rid of 'MODE' stuff, since it was not very clear and wasn't really being used.
2010-01-04Its more useful and standard to actually output the 'help' output whenMicah Anderson
an improper number of arguments is passed, rather output a line telling the user how to get the help output.
2009-07-26added MONKEYSPHERE_STRICT_MODES environment option to disable permissions ↵Daniel Kahn Gillmor
checking.
2009-07-18add refresh-keys subcommand to monkeysphere-authenticationJameson Graef Rollins
2009-07-11improve function to get primary group to make it more portableJameson Graef Rollins
2009-07-11explicitly set MONKEYSPHERE_GROUPJameson Graef Rollins
The monkeysphere group is now determined from the system "groups" command, and then MONKEYSPHERE_GROUP is explicitly set from this, and then used when setting group ownership.
2009-03-07fix the marginal ui output so that it's not prefixed by theJameson Graef Rollins
LOG_PREFIX. also make sure to always export the LOG_PREFIX, so that it gets passed to subprocces su_monkeysphere_user.
2009-03-03fix to logging to prefix all log output with log prefix, and allow changing ↵Jameson Graef Rollins
of log prefix.
2009-03-03quieted down m-a add_certifier: there is no reason why the admin should be ↵Daniel Kahn Gillmor
shown gpg noise.
2009-03-02usage review/tweaks for m-a and m-hDaniel Kahn Gillmor
2009-03-02very small tweaks to usages.Jameson Graef Rollins
2009-03-01break out default variables into their own file: defaultenvJameson Graef Rollins
this allows the common file to be sourced without reseting variables to their defaults, which was causing a problem with su_monkeysphere_user. also added some more debug messages.
2009-02-22fix some return code setting stuf that was no longer being used, and change ↵Jameson Graef Rollins
name of return code variable in update_users, since all-caps variables should be reserved for global vars.
2009-02-22Fix how version number is saved/retrieved. Version is now stored inJameson Graef Rollins
VERSION file, which is created in the tarball target. This is then installed at /usr/share/monkeysphere/VERSION, and cat'ed when the version number is requested by the front-end ui. No more manual setting of version number required (to avoid future problems, aka "0.23.1"). This system is also more flexible, as the VERSION file could potentially hold more info than just the release number.
2009-02-19Modify/cleanup add_certifier and add_revoker, so that their code baseJameson Graef Rollins
is more similar, and so that they can read keys from stdin instead of just from a file. Also fix the permissions on the tempdir in publish_key.
2009-02-19small usage changesJameson Graef Rollins
2009-02-19Merge commit 'dkg/master'Jameson Graef Rollins
2009-02-19made gpg_sphere use --quiet again, and now doing more explicit extraction of ↵Daniel Kahn Gillmor
key fingerprint during add-certifier from file.
2009-02-19Cleanup how variables are specified and loaded:Jameson Graef Rollins
- define more common variables in share/common - cleanup how defaults are specified - fix how CHECK_KEYSERVER was determined in monkeysphere Fix calls to update_known_hosts and update_authorized_keys in monkeysphere so that some of the checks are done within the functions themselves, as opposed in the monkeysphere wrapper, so that other functions can call them easier. Fix ssh-proxycommand that had some left over cruft from the transition.
2009-02-19removing --quiet from this invocation seems to avoid an add-id-certifier ↵Daniel Kahn Gillmor
failure.
2009-02-18add no-tty, quiet, and no-greeting to gpg wrapper invocations to supress as ↵Jameson Graef Rollins
much gpg output as possible. then cleanup gpg invocations.
2009-02-17fix ma so that the setup command is folded into the other commands, soJameson Graef Rollins
it's never needed to be run manually, and can therefore be supressed in the usage/documentation. Also, add setup to the postinst script so that it's setup on installation. Also add pipefail to ma, and try to supress unnecessary gpg output, and redirect other to log debug.
2009-02-17add ability to bypass prompting with a MONKEYSPHERE_PROMPT variable,Jameson Graef Rollins
for functions that prompt for confirmation. Also fix publish_key function (NOT TESTED).
2009-02-17add some checks about setup to authenticationJameson Graef Rollins
2009-02-17fix a couple of left over references to expertJameson Graef Rollins
2009-02-16REMOVE GEN_KEY. The gen_key function is entirely removed. DecidedJameson Graef Rollins
this was OK now that import_key works, and we can't really see a reason to keep it around. We can resurect it down the line if need be. Also, removed "expert" subcommand, after promting import_key, since it may be need semi-regularly. The other "expert" commands are now just not listed in the usage.
2009-02-16fix a bad reference to MATMPDIRJameson Graef Rollins
2009-02-12fix some calls to gpg_sphere that where not putting all arguments into a ↵Jameson Graef Rollins
single argument, as required by the strange su requirements.
2009-02-12Fix the ma/setup function:Jameson Graef Rollins
- fix reference to MONKEYSPHERE_USER for GNUPGHOME_SPHERE - break out core_fingerprint function - export core key to sphere keyring (necessary) - fix some logging (add more debug) and formatting
2009-02-09break su_monkeysphere_user into common function, since it will likelyJameson Graef Rollins
be needed by both m-host and m-auth for communicating with keyservers.
2009-02-02add ability to specify key length of core secret key, so the test scripts ↵Jameson Graef Rollins
can specify something smaller than the default.
2009-02-01new function to export signatures from core to sphere keyrings. thisJameson Graef Rollins
is so that the sphere does not have to read the core pubring to get the certifier ltsigs, and we can therefore keep tighter permissions on the core keyring files. updated some comments/documentation as well.
2009-02-01fix a bunch of directory references to the new data/share dirsJameson Graef Rollins
2009-02-01add setup subcommand call to ms-authentication, and more fixes to testsJameson Graef Rollins
2009-01-31some more fixes and tweaks to get things working in the new setupJameson Graef Rollins
2009-01-31Merge commit 'micah/master'Jameson Graef Rollins