Commits on Source (32)
-
Daniel Kahn Gillmor authored
-
Daniel Kahn Gillmor authored
-
Daniel Kahn Gillmor authored
-
Daniel Kahn Gillmor authored
See https://bugs.debian.org/920038 for more information about why this additional debugging information might be useful.
-
Daniel Kahn Gillmor authored
Since monkeysphere-authentication typically relies on runuser, and ISC cron typically sets only PATH=/usr/bin:/bin So we need to include the expected superuser's $PATH when crontab entry.
-
Daniel Kahn Gillmor authored
Since util-linux 2.31, runuser has has support (sometimes undocumented) for defense against terminal hijacking via TIOCSTI or other techniques, by passing a --pty argument. That option is [no longer experimental](https://github.com/karelzak/util-linux/issues/760 ), so monkeysphere-authentication should use it if it is available. This defends against a compromised monkeysphere user being able to attack the superuser when invoked under a controlling terminal. Signed-off-by:
Daniel Kahn Gillmor <dkg@fifthhorseman.net>
-
Daniel Kahn Gillmor authored
When bash 5.0 uses process replacement [0], the main process gets invoked with child processes already present. This wreaks havoc with our understanding of what "wait" does, and can make the test suite hang (see https://bugs.debian.org/920038). So we introduce this check to make sure that there are no running subprocesses. This is particularly problematic because debian's autopkgtest *does* invoke the test suite in this way. Note that there might be some weird race condition here -- we allow there to be 1 subprocess, which is the spawned "ps" program itself. but how ps works on a given platform, and whether it will notice (and count) itself, i don't know. But it WorksForMe™ on debian buster. [0] e.g., bash's process replacement looks like this: tests/keytrans > >(tee $TMPDIR/stdout)
-
Daniel Kahn Gillmor authored
-
Daniel Kahn Gillmor authored
Our "fix" to https://bugs.debian.org/909700 in d8fc9f28 just avoided testing the actual typical default output of ssh-keygen. While this was fair to do in tests/keytrans, where it is exercised on pem2openpgp (which is explicitly defined as only accepting PEM input), this is inappropriate for testing monkeysphere in general. So now, the test suite breaks again, but we need to provide a proper fix.
-
Daniel Kahn Gillmor authored
This interface stabilized in GnuPG 2.1.17, so we increase our versioned dependency.
-
Daniel Kahn Gillmor authored
These subcommands are explicitly undocumented and unmaintained, and we are no longer using them. Get rid of the cruft.
-
Daniel Kahn Gillmor authored
This directly fixes the problem that monkeysphere-host was failing to import the style of SSH host key that was generated by default by ssh-keygen. As a side effect, we can now support all the host key algorithms that are supported by both gpg-agent (in its ssh-agent implementation) and ssh-add. The lockfile and the dancing around the gpg-agent run in $GNUPGHOME_HOST is a bit awkward. It would be nicer to use an ephemeral GnuPG homedir as recommended in the "Unattended Usage" section of the gnupg info pages, but to do that we'd need to be able to extract the secret key, which is blocked by https://dev.gnupg.org/T4490
-
Daniel Kahn Gillmor authored
This is no longer being used, we can rip it out.
-
Daniel Kahn Gillmor authored
-
Daniel Kahn Gillmor authored
Now that we're depending on ssh-keygen, we can just ask it to do the fingerprinting directly. This removes all the unsupported/unmaintained subcommands from keytrans, and leaves monkeysphere dependent only on the documented interfaces of keytrans (pem2openpgp, in particular, as well as openpgp2ssh in examples/make-x509-certreqs).
-
Daniel Kahn Gillmor authored
Ideally, we could just rely on gpgsm to generate the appropriate certificate request. However, that's not currently possible (see https://dev.gnupg.org/T4503). Note that this codebase doesn't yet work on systems where monkeysphere-host had initially imported keys from classic GnuPG (version 1.4), since gpgsm does not share secret key material with classic GnuPG. Fixing that properly would require an upgrade/transition step that detects the older pubring.gpg and secring.gpg and imports them correctly (possibly managing ownertrust at the same time).
-
Daniel Kahn Gillmor authored
https://dev.gnupg.org/T4489 represents the best way to ensure that something like import-subkey works given the current implementation of monkeysphere. If that works, and we can adopt it by increasing the versioned dependency on GnuPG, then we can add this feature, but currently we should not keep unimplemented code lingering.
-
Daniel Kahn Gillmor authored
modern gpg permits clean, quiet key generation; by using it here, we reduce our dependency on pem2openpgp.
-
Daniel Kahn Gillmor authored
since ssh-add as of OpenSSH 6.0 can use - as stdin, we depend on that codepath for all cases. This removes the final dependence on keytrans for the standard monkeysphere interface.
-
Daniel Kahn Gillmor authored
In general, chown is risky business. On most systems it can only be done as root. Even riskier is chowning a file in a directory that is already owned by a non-privileged user, because (depending on kernel, system configuration, filesystem boundaries, etc) it's possible that the non-privileged user could control the file pointed to, and the superuser accidentally chowns a file they didn't intend. Attacks here are often racy (TOCTOU) and subtly depend on interactions with other system parts (e.g. gaining r/w control over a specific file in /var/lib/dpkg/ or /var/lib/). Better to avoid these risks entirely where possible.
-
Daniel Kahn Gillmor authored
This reverts commit 97ade311. With this changeset, we find that "monkeysphere setup" hangs indefinitely as the superuser -- runuser --pty doesn't terminate as it should when its child process exits, so this isn't an appropriate change to try to ship.
-
Daniel Kahn Gillmor authored
-
Daniel Kahn Gillmor authored
Neither the test suite nor the README should be encouraging people to install Crypt::OpenSSL, since it's no longer necessary.
-
Daniel Kahn Gillmor authored
-
Daniel Kahn Gillmor authored
-
Daniel Kahn Gillmor authored
We implement checkperms using bash and POSIX-style find. This is the last bit of perl dependency that remains.
-
Daniel Kahn Gillmor authored
Since at least 2.1.16 (maybe earlier), "gpgconf --list-dirs $foo" works just as well as "gpgconf --list-dirs | grep ^$foo: | cut -f2 -d:" So we go with the simpler option. It would be even better to avoid the shell that popen() invokes for future improvement, but this is a win anyway.
-
Daniel Kahn Gillmor authored
This commit cuts out one unnecessary shell execution that happens in popen, at the cost of having to maintain our own error handling for the pipe back from gpgconf.
-
Daniel Kahn Gillmor authored
-
Daniel Kahn Gillmor authored
Tagging Monkeysphere 0.44
-
Daniel Kahn Gillmor authored
-
Daniel Kahn Gillmor authored
debian/patches/series
deleted
100644 → 0
src/share/checkperms
deleted
100755 → 0