diff options
author | Pierre Schmitz <pierre@archlinux.de> | 2010-08-13 08:20:27 +0200 |
---|---|---|
committer | Pierre Schmitz <pierre@archlinux.de> | 2010-08-13 08:20:27 +0200 |
commit | e2c005b490df6762e23da3223944151c17d1de80 (patch) | |
tree | bb9619cb292a76a09eb0d6604d9871e35ebbb8ba /db-move | |
parent | af4f86808e8cd45cc171f55a1ec15bf30d858a0d (diff) | |
download | dbscripts-e2c005b490df6762e23da3223944151c17d1de80.tar.gz dbscripts-e2c005b490df6762e23da3223944151c17d1de80.tar.xz |
Check permission before any action
Added a function to check if user has permission to alter the repos
and db files.
Diffstat (limited to 'db-move')
-rwxr-xr-x | db-move | 5 |
1 files changed, 5 insertions, 0 deletions
@@ -23,6 +23,11 @@ ftppath_to="$FTP_BASE/$repoto/os/" svnrepo_from="$repofrom-$arch" svnrepo_to="$repoto-$arch" +if ! check_repo_permission $repoto || ! check_repo_permission $repofrom; then + echo "Error: You don't have permission to move packages from ${repofrom} to ${repoto}" + exit 1 +fi + repo_lock $repoto $arch || exit 1 repo_lock $repofrom $arch || exit 1 |