summaryrefslogtreecommitdiff
path: root/src/share/ma/add_certifier
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.
2013-03-09Pass only single commands through su wrapperJonas 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 more than a single command is wrapped together. This patch simplifies convoluted shell calls to contain only one command each.
2010-10-06Fix more calls to gpg_shere, finishing what was started in ↵Jameson Rollins
90166e0bb8e4ebc1c1174d9bc2021c604b7a1bd7 There were another calls to gpg_sphere that were packing everything into a single argument. Since we fixed the need to do that, we fix all these other calls that were fixed in the first round.
2010-01-18canonicalize prompting to prompt if MONKEYSPHERE_PROMPT != 'false'Jameson Rollins
2009-07-11more replacement of read -p with printf; read (re #446)mike castleman
2009-03-22some more pruning of unnecessary usage of cat for the gnupg scripts.Jameson Graef Rollins
2009-03-03quieted down m-a add_certifier: there is no reason why the admin should be ↵Daniel Kahn Gillmor
shown gpg noise.
2009-02-21fix output formatting for cases where multiple fingerprints are found, in ↵Jameson Graef Rollins
functions that are doing that sort of thing
2009-02-21add tests to add_revoker and add_certifier that more than one key was not ↵Jameson Graef Rollins
found when adding by using key ID.
2009-02-20tweak/cleanup some of the prompts.Jameson Graef Rollins
2009-02-20add_revoker fully working. also cleanup of add_certifier.Jameson Graef Rollins
add_revoker and add_certifier to many similar procedures, so I'm trying to keep them in sync as I figure out the right way to handle things.
2009-02-19fix arg parsing in add_certifier to allow of - for stdin read.Jameson Graef Rollins
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-19add some log debug redirectsJameson Graef Rollins
2009-02-19Merge commit 'dkg/master'Jameson Graef Rollins
2009-02-19tweak some of the prompting, to change defaults, and add PROMPT usage where ↵Jameson Graef Rollins
missing
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-19clean up failure messageDaniel Kahn Gillmor
2009-02-19catch pipe failures more cleanly during key importDaniel Kahn Gillmor
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-12fix some things in ma certifier functions:Jameson Graef Rollins
- fix left over bad invocations of gpg_sphere --list-keys - add some more debug log output
2009-02-12add ability to supress confirmation prompt in ma/add_certifierJameson Graef Rollins
fix some logging output
2009-02-09small formatting tweaks to add_certifier functionJameson Graef Rollins
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-01-31move src/subcommands to srv/share, and add common file to src/share (update ↵Jameson Graef Rollins
Makefile as well)