]> arthur.barton.de Git - bup.git/commit
Verify permissions in check_repo_or_die()
authorGabriel Filion <lelutin@gmail.com>
Mon, 21 Feb 2011 16:14:38 +0000 (11:14 -0500)
committerAvery Pennarun <apenwarr@gmail.com>
Thu, 10 Mar 2011 18:26:55 +0000 (18:26 +0000)
commit1df0bdd1ad937c8e9079bcdcb19dc68296177fac
treee6559f73563f88fd013c8b30b33b0dea40dc6bf7
parent04fdbc76b89f9d8e786025efdd1758d62259be28
Verify permissions in check_repo_or_die()

Currently, if one doesn't have read or access permission up to
repo('objects/pack'), bup exits with the following error:

error: repo() is not a bup/git repository

(with repo() replaced with the actual path).

This is misleading, since there is possibly really a repository there
but the user can't access it.

Make git.check_repo_or_die() verify that the current user has the
permission to access repo('objects/pack'), and if not, output a
meaningful error message.

As a bonus, we get an error if the bup_dir path is not a directory.

Signed-off-by: Gabriel Filion <lelutin@gmail.com>
Makefile
lib/bup/git.py
lib/bup/t/tgit.py