summaryrefslogtreecommitdiff
path: root/src/share/mh/publish_key
AgeCommit message (Collapse)Author
2013-03-09Dual-quote arguments passed to su_monkeysphere_user() when possible.dualquoteJonas 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. Quoting shell-inside-shell is tricky to do right, and gets trickier when the wrapper demands unusually complex quoting. su_monkeysphere_user() expands arguments using "$*" which (unlike "$@") collapses all arguments into a single string, and therefore require "risky" arguments (e.g. ones containing variables that may contain space or other unusual characters) to be dual-quoted for them to not wreak havoc at the inside shell. This patch improves arguments passed to su_monkeysphere_user() by first single-quoting and then double-quoting arguments containing variables. NB! Dynamic arguments are only double-quoted ( "$@" ) which looks safe but effectively is a noop (quoting is lost at wrapper!).
2013-03-09Simplify 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 mostly¹ coollapsed into single strings, and this change is therefore only cosmetic. It does improve clarity, however. Also, it eases switching to safer quoted arguments in the future. ¹As sole excepion ma/update_users line 82 has $STRICT_MODES dual-quoted.
2010-10-02add debugging to monkeysphere-host publish-key, closes: #2289Micah Anderson
2010-05-06do not fail or bail when admin interactively declines to publish a key with m-hDaniel Kahn Gillmor
2010-05-06support x509 anchors for monkeysphere-host, allow shared anchors between m-a ↵Daniel Kahn Gillmor
and mh (closes MS #2288)
2010-01-18canonicalize prompting to prompt if MONKEYSPHERE_PROMPT != 'false'Jameson Rollins
2010-01-15Major rework of monkeysphere-host to handle multiple host keys.Jameson Rollins
This rework removes any assumption that monkeysphere-host is just managing a single host key, or that the keys are used specifically for ssh. The UI is exactly backwards compatible except that hostnames ('example.com') must be replaced by full service names ('ssh://example.com'). This incarnation passes the old tests with those changes only. There are a couple of things that still need to be done: - need to see if a transition script is needed (some local file names have changed) - need to fill in check_service_name function to verify that a specified service name fits the expected format. - update diagnostics appropriately
2009-07-11Merge commit 'mlcastle/master'Jameson Graef Rollins
2009-07-11more replacement of read -p with printf; read (re #446)mike castleman
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-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-19tweak some of the prompting, to change defaults, and add PROMPT usage where ↵Jameson Graef Rollins
missing
2009-02-18new msmktempdir function, to simplify making temporary directories. remove ↵Jameson Graef Rollins
MHTMPDIR, since it's not needed.
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-15fix the publish_key function for new gpg_sphere.Jameson Graef Rollins
2009-02-01some general fixes:Jameson Graef Rollins
- fix some references to old function names - move fingerprint_server_key to be fingerprint_host_key - update diagnostic scripts
2009-01-31move src/subcommands to srv/share, and add common file to src/share (update ↵Jameson Graef Rollins
Makefile as well)