Commit Graph

175 Commits

Author SHA1 Message Date
James Gregory
0626efa7e8 Fixed Alpine compatibility (chmod) (#212) 2017-09-01 05:01:20 -07:00
Patrick Sanders
b483f65c0b direct repobase message to stderr (#204) 2017-08-17 08:57:04 -07:00
Jinn Koriech
c91b29be12 Silence 'not changed' output during keychain import (#200)
Previously the keychain import appears to have redirected stderr to stdout,
silenced lines that indicate a key has 'not changed' then send the output back
to stdout.  This behaviour has been carried over to the new GnuPG-2.1
compatible implementation.
2017-07-04 10:32:48 -04:00
Tom Limoncelli
9966283368 Blackbox should work with Windows better WRT crlf. 2017-06-16 08:16:07 -04:00
Tom Limoncelli
800fe098a6 "gpg --export" should export LANG=C.UTF-8 to be safe. 2017-05-29 19:39:01 -04:00
Robert Taylor
09a62cb1d2 Fixing physical_directory_of function for cases when target directory lives in root. (#194) 2017-05-29 18:00:06 -04:00
Tom Limoncelli
7649c9f00b Fix https://github.com/StackExchange/blackbox/issues/193
Add unit tests to tools/confidence_test.sh to verify admin operations work.
2017-05-15 11:10:01 -04:00
tlimoncelli@stackoverflow.com
4bc97049ab tools/confidence_test.sh: now works with gnupg-2.0 and gnupg-2.1 2017-05-14 18:48:59 -04:00
tlimoncelli@stackoverflow.com
50ac1697c3 tools/confidence_test.sh: now works with gnupg-2.0 again 2017-05-14 17:52:27 -04:00
tlimoncelli@stackoverflow.com
9c6f13fb80 blackbox_shred_all_files: BUGFIX: Does not shred files with spaces. 2017-05-13 11:12:05 -04:00
tlimoncelli@stackoverflow.com
849ec3138b blackbox_removeadmin: Disable gpg's confirmation. 2017-05-13 11:11:39 -04:00
Matthew
be425ed76c shred_file() outputs warning message to stderr. (#192) 2017-05-02 06:33:07 -04:00
Simon Gate
8728290122 Don't complain about GPG_AGENT_INFO if using newer gpg-agent (#189) 2017-04-26 08:34:20 -04:00
Graham Lyons
44c9934293 Use the rm command with -P as a shred fallback (#179)
* Use the `rm` command with `-P` as a shred fallback

The newer versions of OSX (Sierra) have neither `shred` nor `srm`.
They do have `rm` with the `-P` option, so we can fall back to that
before resorting to plain old `rm`.

* Add double-quotes and braces to the shell variable.

We should treat the variable as a string, and we should also be safe
when interpolating it.
2017-03-10 08:20:43 -05:00
Tom Limoncelli
5df0d21be6 make_tempdir must create shorter paths. 2017-02-20 12:15:05 -05:00
Tino Breddin
bd0fcd181c [FreeBSD] Fix use of chmod (#180)
LGTM

Thanks for the fix!
2017-01-20 17:12:57 -05:00
Ben Watson
818db98506 Requiring a file to be entered to finish editing (#175)
* Requiring a file to be entered to finish editing

Running blackbox_edit_end without an argument doesn't currently print out a warning that no files are being changed. A developer in my team who was new to Blackbox committed a decrypted file (and made no changes to the GPG file) as they didn't realise the command hadn't worked.

The check I've added should help to avoid these errors.

* Adding argument check to start editing
2016-12-12 14:07:33 +00:00
Joseph Herlant
1b7c8c880b Remove the key from the keyring when removing an admin (#173)
Thanks for the submission!
2016-11-22 13:43:08 -05:00
Tino Breddin
fba77f092a Add FreeBSD support (#172) 2016-11-08 13:49:42 -05:00
tlimoncelli@stackexchange.com
57dc69a928 Merge branch 'feature-listadmins' of https://github.com/jvanasco/blackbox into jvanasco-feature-listadmins 2016-10-07 16:19:13 -04:00
Jason Price
598896ef48 Add list admins commandline tool. (#170)
* adding a list_admins command

* updating README and V2 ideas to include list_admins

* fix documentation misses

* add list_admins to the toolchain
2016-10-06 11:26:43 -04:00
Dave Jachimiak
31cf506684 ignore backup files and secring.gpg in $BLACKBOXDATA (#169) 2016-09-23 09:26:22 -04:00
Jon Bardin
4fe27a04c9 Allow parallel shredding of files (#167)
* to log which files were shredded
* allow parallel shredding of files ot lower time to shred
2016-08-31 09:29:54 -04:00
Jose Diaz-Gonzalez
21c0b68213 Check return value contents
Closes #156
2016-05-26 11:54:14 -04:00
jonathan vanasco
435a3c073f added blackbox_listadmins, which just displays active admins via cat "$BB_ADMINS" 2016-04-25 12:53:36 -04:00
jonathan vanasco
f8c1653e09 some updates for subversion 2016-04-22 17:30:28 -04:00
Dan Slimmon
fc63e24dcf Warn user if there isn't a secure deletion utility
Otherwise, somebody with neither shred nor srm installed could blithely
go on using Blackbox assuming that their working copies are getting
securely deleted.
2016-03-14 18:53:29 +00:00
tlimoncelli@stackoverflow.com
a9dc14c7b0 _stack_lib.sh: Take upstream changes. 2016-02-29 17:22:12 +00:00
Tom Limoncelli
88e9e99f57 Merge pull request #132 from StackExchange/tlim_gitignore
When updating .gitignore, "git add" it.
2016-01-06 12:10:07 -05:00
tlimoncelli@stackoverflow.com
c394b964e8 When updating .gitignore, "git add" it. 2015-12-30 14:41:22 +00:00
Chandler Melton
4ea164fbd3 remove unencrypted file from .gitignore when deregistering 2015-12-16 15:54:28 -06:00
Espen Riskedal
372a35036f Add support for Git for Windows / MINGW users
If you install Git for Windows (https://git-for-windows.github.io/) you get a console
,either CMD or MINTT, which returns MINGW* for uname -s. So if you run blackbox_addadmin
or the other commands, you'll get: "ERROR: Unknown OS. Exiting."

I've simply added MINGW* to the Linux and CYGWIN checks and it seems to work fine.

NOTE: I didn't touch tools/test_functions.sh allthough it should probably be updated as well.
2015-10-29 12:10:58 +01:00
LE Manh Cuong
65ae375828 Fix some minor issues:
- Missing double quote
 - Replace `echo -n` with `printf "%s"` for more
 portability and reliability
2015-10-19 16:52:26 +07:00
LE Manh Cuong
0355095a59 Fix missing quote 2015-10-17 08:49:29 +07:00
David Reuss
ece750b710 Be consistent when creating tmpfiles in stacklib
Use same naming scheme as elsewhere when creating tempfiles.

This fixes deregistering files, when seeing:

```
mktemp: too few X's in template ‘_stacklib_’
```
2015-10-16 14:59:15 +02:00
Tor Arvid Lund
ca2cc76bcd Support having an $EDITOR value with arguments
If a user has $EDITOR set to e.g "subl --wait", then "$EDITOR" (with
quotes) will fail with error "command not found: subl --wait". In other
words, it looks for an executable containing the space and the --wait in
it.

Simply removing the quotes seems to work fine.
2015-08-26 16:15:29 +02:00
Nextraztus
fd78fb5ed3 replace vcs_relative_path with non-python, fixes #115 2015-08-07 08:22:18 -06:00
tal@whatexit.org
7c73009461 Improve Cygwin compatibility. 2015-08-04 11:53:25 -04:00
tlimoncelli@stackexchange.com
343b85a34c Fix issue on OS X when creating a temporary file
This prevents the "mktemp: too few X's in template
_stacklib_" error message from appearing when
adding another admin to blackbox and allows the command to successfully
execute.

    Related:
    rtomayko/shocco#5
    http://unix.stackexchange.com/q/87638/63283
2015-07-28 08:21:52 -04:00
tlimoncelli@stackexchange.com
1f2d99436d Fixed #83 blackbox_edit* scripts should accept multiple filenames 2015-07-24 09:57:34 -04:00
tlimoncelli@stackexchange.com
5ae47a69ea Clean up after cp_permission test 2015-07-24 13:13:51 +00:00
tlimoncelli@stackexchange.com
59685d580b Improve comments. 2015-07-24 13:04:23 +00:00
tlimoncelli@stackexchange.com
aee22fc99d Reorganize tests
* Split out test helper functions into tools/test_functions.sh
  * bin/_blackbox_common_test.sh: Unit-tests for functions.
  * blackbox_postdeploy: Use cp_permissions instead of chmod --reference
2015-07-24 09:01:00 -04:00
Maxime Poulin
649a75e459 File permissions now persits 2015-07-23 10:14:39 -04:00
Bob Example
1d6d65af13 resolution to past zeal with double quotes. 2015-07-10 21:16:12 -04:00
Dan OBoyle
1d4edfaa10 Fix change_to_vcs_root in issue #105 2015-07-10 18:34:37 -04:00
Tom Limoncelli
01a6758ab8 Merge pull request #102 from selfcommit/master
Steps towards recursive repos
2015-07-05 12:11:47 -04:00
Dan OBoyle
76884eb396 better logic in enumerate_blackbox_repos 2015-07-03 17:50:00 -04:00
Dan OBoyle
96c71e3254 Better logic for change_to_vcs_root 2015-07-03 17:46:18 -04:00
Dan OBoyle
53c686fc57 document is_blackbox_repo 2015-07-03 17:41:46 -04:00