diff options
author | Joey Hess <joey@kitenet.net> | 2013-11-02 20:15:40 -0400 |
---|---|---|
committer | Joey Hess <joey@kitenet.net> | 2013-11-02 20:15:40 -0400 |
commit | e5729ffd44bef0b19d81dba7523a72a92ab213e0 (patch) | |
tree | 305ae5899317312e98db1a7b708f9d6dae884882 | |
parent | 5d13546a3088559d570d5cd6fd55afc8b52a8a2c (diff) |
Fix enabling of gcrypt repository accessed over ssh; git-annex-shell gcryptsetup had a bug that caused it to fail with permission denied.
-rw-r--r-- | Command/GCryptSetup.hs | 10 | ||||
-rw-r--r-- | debian/changelog | 3 |
2 files changed, 10 insertions, 3 deletions
diff --git a/Command/GCryptSetup.hs b/Command/GCryptSetup.hs index a27e470c1..bdd770f15 100644 --- a/Command/GCryptSetup.hs +++ b/Command/GCryptSetup.hs @@ -23,13 +23,17 @@ seek = [withStrings start] start :: String -> CommandStart start gcryptid = next $ next $ do - g <- gitRepo u <- getUUID + when (u /= NoUUID) $ + error "gcryptsetup refusing to run; this repository already has a git-annex uuid!" + + g <- gitRepo gu <- Remote.GCrypt.getGCryptUUID True g - if u == NoUUID && gu == Nothing + let newgu = genUUIDInNameSpace gCryptNameSpace gcryptid + if gu == Nothing || gu == Just newgu then if Git.repoIsLocalBare g then do void $ Remote.GCrypt.setupRepo gcryptid g return True else error "cannot use gcrypt in a non-bare repository" - else error "gcryptsetup permission denied" + else error "gcryptsetup uuid mismatch" diff --git a/debian/changelog b/debian/changelog index 927b2e00b..4948dbf33 100644 --- a/debian/changelog +++ b/debian/changelog @@ -6,6 +6,9 @@ git-annex (4.20131102) UNRELEASED; urgency=low with no master branch. * gcrypt, bup: Fix bug that prevented using these special remotes with encryption=pubkey. + * Fix enabling of gcrypt repository accessed over ssh; + git-annex-shell gcryptsetup had a bug that caused it to fail + with permission denied. -- Joey Hess <joeyh@debian.org> Sat, 02 Nov 2013 14:54:36 -0400 |