Commit graph

29982 commits

Author SHA1 Message Date
Joey Hess
1e9e96fa40
followup 2017-03-02 14:00:55 -04:00
Joey Hess
1cd5fc302c
fix format 2017-03-02 13:49:13 -04:00
Joey Hess
701006bd83
clarification 2017-03-02 13:28:31 -04:00
Joey Hess
fe28cbcd9e
comment 2017-03-02 13:23:27 -04:00
Joey Hess
8c1eda75b5
title 2017-03-02 13:20:17 -04:00
Joey Hess
995f58a04c
Merge branch 'master' of ssh://git-annex.branchable.com 2017-03-02 13:19:13 -04:00
Joey Hess
e83a2a2691
comment 2017-03-02 13:18:37 -04:00
Joey Hess
34db79e1a5
Bugfix: Passing a command a filename that does not exist sometimes did not display an error, when a path to a directory was also passed.
It was relying on segmentPaths to work correctly, so when it didn't,
sometimes the file that did not exist got matched up with a non-null
list of results. Fixed by always checking if each parameter exists.

There are two reason segmentPaths might not work correctly.

For one, it assumes that when the original list of paths
has more than 100 paths, it's not worth paying the CPU cost to
preserve input orders.

And then, it fails when a directory such as "." or ".." or
/path/to/repo is in the input list, and the list of found paths
does not start with that same thing. It should probably not be using
dirContains, but something else.

But, it's not clear how to handle this fully. Consider
when [".", "subdir"] has been expanded by git ls-files to
["subdir/1", "subdir/2"]
-- Both of the inputs contained those results, so there's
no one right answer for segmentPaths. All these would be equally valid:
	[["subdir/1", "subdir/2"], []]
	[[], ["subdir/1", "subdir/2"]]
	[["subdir/1"], [""subdir/2"]]

So I've not tried to improve segmentPaths.
2017-03-02 13:06:20 -04:00
git-annex@31849d241f10c295b30a9707352ae5c7d743adb7
2468e69354 Added a comment 2017-03-02 16:16:05 +00:00
git-annex@31849d241f10c295b30a9707352ae5c7d743adb7
273decc078 removed 2017-03-02 16:15:44 +00:00
git-annex@31849d241f10c295b30a9707352ae5c7d743adb7
fcdc72f807 Added a comment 2017-03-02 16:14:52 +00:00
Michel
6e6a90805d 2017-03-02 09:20:15 +00:00
Joey Hess
e3a03af24e
github mirror has been removed due to their horrible new anti-free-software TOS 2017-03-01 13:28:02 -04:00
Joey Hess
463dda3879
add news item for git-annex 6.20170301.1 2017-03-01 12:51:18 -04:00
Joey Hess
a9e1e17d40
releasing package git-annex version 6.20170301.1 2017-03-01 12:46:26 -04:00
Joey Hess
5383340691
improve layout 2017-03-01 12:46:01 -04:00
Joey Hess
ea1f812ebf
Fix reversion in yesterday's release that made SHA1E and MD5E backends not work. 2017-03-01 12:43:15 -04:00
Joey Hess
de43d1d407
convert error to giveup 2017-03-01 12:35:16 -04:00
Joey Hess
bd5b277c11
add news item for git-annex 6.20170301 2017-03-01 12:10:20 -04:00
Joey Hess
32da1bb2f1
Merge branch 'master' of ssh://git-annex.branchable.com 2017-03-01 12:07:07 -04:00
Joey Hess
254b57aef7
6.20170301 version for hackage
No changes from 6.20170228; a new version number was needed due to a problem with Hackage.
2017-03-01 12:06:10 -04:00
yarikoptic
bc768d96a9 initial whining 2017-03-01 14:34:35 +00:00
dvicory
e4642a2452 Added a comment: Security of P2P repo is unclear 2017-02-28 20:30:31 +00:00
Joey Hess
739aa3a38e
add news item for git-annex 6.20170228 2017-02-28 14:42:28 -04:00
Joey Hess
444278156c
releasing package git-annex version 6.20170228 2017-02-28 14:41:57 -04:00
Joey Hess
ddf68b7c48
improve display of checking known urls
Display it as a separate action, so it ends with a newline
2017-02-28 14:41:08 -04:00
Joey Hess
a62802af08
remove old debug print 2017-02-28 14:41:00 -04:00
Joey Hess
627dc6036e
remove unused import 2017-02-28 14:08:56 -04:00
Joey Hess
b5d21e884c
release prep 2017-02-28 13:31:17 -04:00
Joey Hess
7a32e08c4a
fix bug introduced in 07f1e638ee
Just totally wrong logic, oops. Caught by test suite.
2017-02-28 13:24:26 -04:00
Joey Hess
75029536e5
squelch a couple of warnings about moveAnnex return code 2017-02-28 12:49:17 -04:00
Joey Hess
3690e9b071
fix osxapp deps 2017-02-28 12:46:00 -04:00
Joey Hess
2e52fae07e
Merge branch 'master' of ssh://git-annex.branchable.com 2017-02-28 12:45:58 -04:00
Joey Hess
f9627479b0
fix build with old ghc 2017-02-28 12:44:33 -04:00
zpeters
a21c1ddbe6 Added a comment: RE: choosing remotes and annex-cost-command 2017-02-28 01:10:05 +00:00
Joey Hess
2c281baf00
better headings 2017-02-27 16:18:20 -04:00
Joey Hess
3f876f72e3
larger headings 2017-02-27 16:17:19 -04:00
Joey Hess
b78703ca4e
devblog 2017-02-27 16:11:35 -04:00
Joey Hess
e53070c1ff
inheritable annex.securehashesonly
* init: When annex.securehashesonly has been set with git-annex config,
  copy that value to the annex.securehashesonly git config.
* config --set: As well as setting value in git-annex branch,
  set local gitconfig. This is needed especially for
  annex.securehashesonly, which is read only from local gitconfig and not
  the git-annex branch.

doc/todo/sha1_collision_embedding_in_git-annex_keys.mdwn has the
rationalle for doing it this way. There's no perfect solution; this
seems to be the least-bad one.

This commit was supported by the NSF-funded DataLad project.
2017-02-27 16:08:23 -04:00
Joey Hess
6e0e7d885c
update 2017-02-27 15:32:04 -04:00
Joey Hess
c33363dfa7
early cancelation of transfer that annex.securehashesonly prohibits
This avoids sending all the data to a remote, only to have it reject it
because it has annex.securehashesonly set. It assumes that local and
remote will have the same annex.securehashesonly setting in most cases.
If a remote does not have that set, and local does, the remote won't get
some content it would otherwise accept.

Also avoids downloading data that will not be added to the local object
store due to annex.securehashesonly.

Note that, while encrypted special remotes use a GPGHMAC key variety,
which is not collisiton resistent, Transfers are not used for such
keys, so this check is avoided. Which is what we want, so encrypted
special remotes still work.

This commit was sponsored by Ewen McNeill.
2017-02-27 15:21:24 -04:00
Joey Hess
9db064f50c
reorg 2017-02-27 15:04:03 -04:00
Joey Hess
49114cf4ea
securehash matching
Added --securehash option to match files using a secure hash function, and
corresponding securehash preferred content expression.

This commit was sponsored by Ethan Aubin.
2017-02-27 15:02:44 -04:00
Joey Hess
31275754f5
mapM_ = sequence_ . map 2017-02-27 14:48:07 -04:00
Joey Hess
942e0174b3
make fsck check annex.securehashesonly, and new tip for working around SHA1 collisions with git-annex
This commit was sponsored by andrea rota.
2017-02-27 13:55:15 -04:00
Joey Hess
07f1e638ee
annex.securehashesonly
Cryptographically secure hashes can be forced to be used in a repository,
by setting annex.securehashesonly. This does not prevent the git repository
from containing files with insecure hashes, but it does prevent the content
of such files from being pulled into .git/annex/objects from another
repository.

We want to make sure that at no point does git-annex accept content into
.git/annex/objects that is hashed with an insecure key. Here's how it
was done:

* .git/annex/objects/xx/yy/KEY/ is kept frozen, so nothing can be
  written to it normally
* So every place that writes content must call, thawContent or modifyContent.
  We can audit for these, and be sure we've considered all cases.
* The main functions are moveAnnex, and linkToAnnex; these were made to
  check annex.securehashesonly, and are the main security boundary
  for annex.securehashesonly.
* Most other calls to modifyContent deal with other files in the KEY
  directory (inode cache etc). The other ones that mess with the content
  are:
	- Annex.Direct.toDirectGen, in which content already in the
	  annex directory is moved to the direct mode file, so not relevant.
	- fix and lock, which don't add new content
	- Command.ReKey.linkKey, which manually unlocks it to make a
	  copy.
* All other calls to thawContent appear safe.

Made moveAnnex return a Bool, so checked all callsites and made them
deal with a failure in appropriate ways.

linkToAnnex simply returns LinkAnnexFailed; all callsites already deal
with it failing in appropriate ways.

This commit was sponsored by Riku Voipio.
2017-02-27 13:33:59 -04:00
Joey Hess
0fda7c08d0
add cryptographicallySecure
Note that GPGHMAC keys are not cryptographically secure, because their
content has no relation to the name of the key. So, things that use this
function to avoid sending keys to a remote will need to special case in
support for those keys. If GPGHMAC keys were accepted as
cryptographically secure, symlinks using them could be committed to a
git repo, and their content would be accepted into the repo, with no
guarantee that two repos got the same content, which is what we're aiming
to prevent.
2017-02-27 12:54:06 -04:00
Joey Hess
5e24e3ffe7
Merge branch 'master' of ssh://git-annex.branchable.com 2017-02-26 14:55:11 -04:00
Joey Hess
1dcd68a149
fix osxapp target
Broken by recent changes to other targets
2017-02-26 14:54:24 -04:00
michalrus
b4f7979391 Added a comment 2017-02-26 00:59:21 +00:00